@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.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
 
3
3
  // src/components/LumirEditor.tsx
4
- import { useEffect as useEffect11, useMemo as useMemo8, useCallback as useCallback21, useState as useState12, useRef as useRef12 } from "react";
4
+ import { useEffect as useEffect12, useMemo as useMemo8, useCallback as useCallback21, useState as useState12, useRef as useRef12 } from "react";
5
5
  import {
6
6
  useCreateBlockNote,
7
7
  SideMenu as BlockSideMenu,
@@ -1537,15 +1537,22 @@ var Column = createStronglyTypedTiptapNode2({
1537
1537
  });
1538
1538
 
1539
1539
  // src/styles/FontSizeStyle.tsx
1540
- import { createReactStyleSpec } from "@blocknote/react";
1541
- import { jsx as jsx3 } from "react/jsx-runtime";
1542
- var FontSize = createReactStyleSpec(
1540
+ import { createStyleSpec } from "@blocknote/core";
1541
+ var FontSize = createStyleSpec(
1543
1542
  {
1544
1543
  type: "fontSize",
1545
1544
  propSchema: "string"
1546
1545
  },
1547
1546
  {
1548
- render: (props) => /* @__PURE__ */ jsx3("span", { style: { fontSize: props.value }, ref: props.contentRef })
1547
+ // 바닐라(동기) 스타일 스펙: DOM을 직접 반환한다.
1548
+ // createReactStyleSpec는 span 내용이 비동기 렌더되어, 적용 직후 동기 시점에
1549
+ // 선택 영역의 DOM 좌표가 (0,0)으로 잡혀 BlockNote 포매팅 툴바가 좌상단으로
1550
+ // 튀는 문제가 있었다(굵게/기울임 등 네이티브 마크는 동기 렌더라 정상).
1551
+ render: (value) => {
1552
+ const span = document.createElement("span");
1553
+ span.style.fontSize = value;
1554
+ return { dom: span, contentDOM: span };
1555
+ }
1549
1556
  }
1550
1557
  );
1551
1558
  var FONT_SIZE_PRESETS = [
@@ -1558,10 +1565,58 @@ var FONT_SIZE_PRESETS = [
1558
1565
  "24px",
1559
1566
  "28px"
1560
1567
  ];
1568
+ var FONT_SIZE_MIN = 8;
1569
+ var FONT_SIZE_MAX = 96;
1570
+ var FONT_SIZE_DEFAULT_PX = 14;
1571
+ var FONT_SIZE_STEP = 1;
1572
+ function parseFontSizePx(size) {
1573
+ const n = parseInt(size, 10);
1574
+ return Number.isFinite(n) ? n : FONT_SIZE_DEFAULT_PX;
1575
+ }
1576
+ function clampFontSizePx(px) {
1577
+ return Math.min(FONT_SIZE_MAX, Math.max(FONT_SIZE_MIN, Math.round(px)));
1578
+ }
1579
+ function toFontSizeValue(px) {
1580
+ return `${clampFontSizePx(px)}px`;
1581
+ }
1582
+ function readSelectionFontSize(editor) {
1583
+ const ed = editor;
1584
+ const fallback = () => {
1585
+ try {
1586
+ return ed?.getActiveStyles?.().fontSize || "";
1587
+ } catch {
1588
+ return "";
1589
+ }
1590
+ };
1591
+ try {
1592
+ const tt = ed._tiptapEditor;
1593
+ const state = tt?.state;
1594
+ if (!state) return fallback();
1595
+ const sel = state.selection;
1596
+ if (sel.empty) {
1597
+ const marks = state.storedMarks || sel.$to.marks();
1598
+ const m = marks?.find?.((mk) => mk.type?.name === "fontSize");
1599
+ return m?.attrs?.stringValue || "";
1600
+ }
1601
+ let value = null;
1602
+ let mixed = false;
1603
+ state.doc.nodesBetween(sel.from, sel.to, (node) => {
1604
+ if (mixed || !node.isText) return !mixed;
1605
+ const m = node.marks?.find?.((mk) => mk.type?.name === "fontSize");
1606
+ const v = m?.attrs?.stringValue || "";
1607
+ if (value === null) value = v;
1608
+ else if (value !== v) mixed = true;
1609
+ return !mixed;
1610
+ });
1611
+ return mixed ? "" : value || "";
1612
+ } catch {
1613
+ return fallback();
1614
+ }
1615
+ }
1561
1616
 
1562
1617
  // src/blocks/HtmlPreview.tsx
1563
1618
  import { useState as useState3, useRef as useRef3, useCallback as useCallback3, useEffect as useEffect3 } from "react";
1564
- import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
1619
+ import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
1565
1620
  var MIN_HEIGHT = 100;
1566
1621
  var MAX_HEIGHT = 1200;
1567
1622
  var ensureCharset = (html) => {
@@ -1736,7 +1791,7 @@ var HtmlPreviewBlock = createReactBlockSpec3(
1736
1791
  },
1737
1792
  onClick: () => setIsExpanded(!isExpanded),
1738
1793
  children: [
1739
- /* @__PURE__ */ jsx4(
1794
+ /* @__PURE__ */ jsx3(
1740
1795
  "svg",
1741
1796
  {
1742
1797
  width: "16",
@@ -1751,15 +1806,15 @@ var HtmlPreviewBlock = createReactBlockSpec3(
1751
1806
  transform: isExpanded ? "rotate(180deg)" : "rotate(0deg)",
1752
1807
  transition: "transform 0.2s"
1753
1808
  },
1754
- children: /* @__PURE__ */ jsx4("polyline", { points: "6 9 12 15 18 9" })
1809
+ children: /* @__PURE__ */ jsx3("polyline", { points: "6 9 12 15 18 9" })
1755
1810
  }
1756
1811
  ),
1757
- /* @__PURE__ */ jsx4("span", { style: { fontWeight: 500, fontSize: "14px" }, children: fileName })
1812
+ /* @__PURE__ */ jsx3("span", { style: { fontWeight: 500, fontSize: "14px" }, children: fileName })
1758
1813
  ]
1759
1814
  }
1760
1815
  ),
1761
1816
  /* @__PURE__ */ jsxs3("div", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [
1762
- /* @__PURE__ */ jsx4(
1817
+ /* @__PURE__ */ jsx3(
1763
1818
  "button",
1764
1819
  {
1765
1820
  onClick: handleOpenNewWindow,
@@ -1794,15 +1849,15 @@ var HtmlPreviewBlock = createReactBlockSpec3(
1794
1849
  strokeLinecap: "round",
1795
1850
  strokeLinejoin: "round",
1796
1851
  children: [
1797
- /* @__PURE__ */ jsx4("path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }),
1798
- /* @__PURE__ */ jsx4("polyline", { points: "15 3 21 3 21 9" }),
1799
- /* @__PURE__ */ jsx4("line", { x1: "10", y1: "14", x2: "21", y2: "3" })
1852
+ /* @__PURE__ */ jsx3("path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }),
1853
+ /* @__PURE__ */ jsx3("polyline", { points: "15 3 21 3 21 9" }),
1854
+ /* @__PURE__ */ jsx3("line", { x1: "10", y1: "14", x2: "21", y2: "3" })
1800
1855
  ]
1801
1856
  }
1802
1857
  )
1803
1858
  }
1804
1859
  ),
1805
- /* @__PURE__ */ jsx4(
1860
+ /* @__PURE__ */ jsx3(
1806
1861
  "button",
1807
1862
  {
1808
1863
  onClick: handleExport,
@@ -1837,9 +1892,9 @@ var HtmlPreviewBlock = createReactBlockSpec3(
1837
1892
  strokeLinecap: "round",
1838
1893
  strokeLinejoin: "round",
1839
1894
  children: [
1840
- /* @__PURE__ */ jsx4("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
1841
- /* @__PURE__ */ jsx4("polyline", { points: "7 10 12 15 17 10" }),
1842
- /* @__PURE__ */ jsx4("line", { x1: "12", y1: "15", x2: "12", y2: "3" })
1895
+ /* @__PURE__ */ jsx3("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
1896
+ /* @__PURE__ */ jsx3("polyline", { points: "7 10 12 15 17 10" }),
1897
+ /* @__PURE__ */ jsx3("line", { x1: "12", y1: "15", x2: "12", y2: "3" })
1843
1898
  ]
1844
1899
  }
1845
1900
  )
@@ -1858,7 +1913,7 @@ var HtmlPreviewBlock = createReactBlockSpec3(
1858
1913
  position: "relative"
1859
1914
  },
1860
1915
  children: [
1861
- /* @__PURE__ */ jsx4(
1916
+ /* @__PURE__ */ jsx3(
1862
1917
  "iframe",
1863
1918
  {
1864
1919
  src: blobUrl || "about:blank",
@@ -1875,7 +1930,7 @@ var HtmlPreviewBlock = createReactBlockSpec3(
1875
1930
  loading: "lazy"
1876
1931
  }
1877
1932
  ),
1878
- /* @__PURE__ */ jsx4(
1933
+ /* @__PURE__ */ jsx3(
1879
1934
  "div",
1880
1935
  {
1881
1936
  onMouseDown: handleResizeStart,
@@ -1900,7 +1955,7 @@ var HtmlPreviewBlock = createReactBlockSpec3(
1900
1955
  e.currentTarget.style.backgroundColor = "transparent";
1901
1956
  }
1902
1957
  },
1903
- children: /* @__PURE__ */ jsx4(
1958
+ children: /* @__PURE__ */ jsx3(
1904
1959
  "div",
1905
1960
  {
1906
1961
  style: {
@@ -1949,57 +2004,57 @@ var schema = BlockNoteSchema.create({
1949
2004
  import { useState as useState8, useEffect as useEffect8, useRef as useRef9 } from "react";
1950
2005
 
1951
2006
  // src/components/FloatingMenu/Icons.tsx
1952
- import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
2007
+ import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
1953
2008
  var Icons = {
1954
- undo: /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ jsx5("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" }) }),
1955
- redo: /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ jsx5("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" }) }),
1956
- bold: /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ jsx5("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" }) }),
1957
- italic: /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ jsx5("path", { d: "M10 4v3h2.21l-3.42 8H6v3h8v-3h-2.21l3.42-8H18V4z" }) }),
1958
- underline: /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ jsx5("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" }) }),
1959
- strikethrough: /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ jsx5("path", { d: "M10 19h4v-3h-4v3zM5 4v3h5v3h4V7h5V4H5zM3 14h18v-2H3v2z" }) }),
1960
- alignLeft: /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ jsx5("path", { d: "M15 15H3v2h12v-2zm0-8H3v2h12V7zM3 13h18v-2H3v2zm0 8h18v-2H3v2zM3 3v2h18V3H3z" }) }),
1961
- alignCenter: /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ jsx5("path", { d: "M7 15v2h10v-2H7zm-4 6h18v-2H3v2zm0-8h18v-2H3v2zm4-6v2h10V7H7zM3 3v2h18V3H3z" }) }),
1962
- alignRight: /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ jsx5("path", { d: "M3 21h18v-2H3v2zm6-4h12v-2H9v2zm-6-4h18v-2H3v2zm6-4h12V7H9v2zM3 3v2h18V3H3z" }) }),
1963
- bulletList: /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ jsx5("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" }) }),
1964
- numberedList: /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ jsx5("path", { d: "M2 17h2v.5H3v1h1v.5H2v1h3v-4H2v1zm1-9h1V4H2v1h1v3zm-1 3h1.8L2 13.1v.9h3v-1H3.2L5 10.9V10H2v1zm5-6v2h14V5H7zm0 14h14v-2H7v2zm0-6h14v-2H7v2z" }) }),
1965
- image: /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ jsx5("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" }) }),
1966
- expandMore: /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "18", height: "18", children: /* @__PURE__ */ jsx5("path", { d: "M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z" }) }),
1967
- textColor: /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ jsx5("path", { d: "M11 3L5.5 17h2.25l1.12-3h6.25l1.12 3h2.25L13 3h-2zm-1.38 9L12 5.67 14.38 12H9.62z" }) }),
2009
+ undo: /* @__PURE__ */ jsx4("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ jsx4("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" }) }),
2010
+ redo: /* @__PURE__ */ jsx4("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ jsx4("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" }) }),
2011
+ bold: /* @__PURE__ */ jsx4("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ jsx4("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" }) }),
2012
+ italic: /* @__PURE__ */ jsx4("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ jsx4("path", { d: "M10 4v3h2.21l-3.42 8H6v3h8v-3h-2.21l3.42-8H18V4z" }) }),
2013
+ underline: /* @__PURE__ */ jsx4("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ jsx4("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" }) }),
2014
+ strikethrough: /* @__PURE__ */ jsx4("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ jsx4("path", { d: "M10 19h4v-3h-4v3zM5 4v3h5v3h4V7h5V4H5zM3 14h18v-2H3v2z" }) }),
2015
+ alignLeft: /* @__PURE__ */ jsx4("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ jsx4("path", { d: "M15 15H3v2h12v-2zm0-8H3v2h12V7zM3 13h18v-2H3v2zm0 8h18v-2H3v2zM3 3v2h18V3H3z" }) }),
2016
+ alignCenter: /* @__PURE__ */ jsx4("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ jsx4("path", { d: "M7 15v2h10v-2H7zm-4 6h18v-2H3v2zm0-8h18v-2H3v2zm4-6v2h10V7H7zM3 3v2h18V3H3z" }) }),
2017
+ alignRight: /* @__PURE__ */ jsx4("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ jsx4("path", { d: "M3 21h18v-2H3v2zm6-4h12v-2H9v2zm-6-4h18v-2H3v2zm6-4h12V7H9v2zM3 3v2h18V3H3z" }) }),
2018
+ bulletList: /* @__PURE__ */ jsx4("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ jsx4("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" }) }),
2019
+ numberedList: /* @__PURE__ */ jsx4("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ jsx4("path", { d: "M2 17h2v.5H3v1h1v.5H2v1h3v-4H2v1zm1-9h1V4H2v1h1v3zm-1 3h1.8L2 13.1v.9h3v-1H3.2L5 10.9V10H2v1zm5-6v2h14V5H7zm0 14h14v-2H7v2zm0-6h14v-2H7v2z" }) }),
2020
+ image: /* @__PURE__ */ jsx4("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ jsx4("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" }) }),
2021
+ expandMore: /* @__PURE__ */ jsx4("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "18", height: "18", children: /* @__PURE__ */ jsx4("path", { d: "M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z" }) }),
2022
+ textColor: /* @__PURE__ */ jsx4("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ jsx4("path", { d: "M11 3L5.5 17h2.25l1.12-3h6.25l1.12 3h2.25L13 3h-2zm-1.38 9L12 5.67 14.38 12H9.62z" }) }),
1968
2023
  bgColor: /* @__PURE__ */ jsxs4("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: [
1969
- /* @__PURE__ */ jsx5("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" }),
1970
- /* @__PURE__ */ jsx5("path", { fillOpacity: ".36", d: "M0 20h24v4H0z" })
2024
+ /* @__PURE__ */ jsx4("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" }),
2025
+ /* @__PURE__ */ jsx4("path", { fillOpacity: ".36", d: "M0 20h24v4H0z" })
1971
2026
  ] }),
1972
- link: /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ jsx5("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" }) }),
1973
- chevronRight: /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ jsx5("path", { d: "M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" }) }),
1974
- chevronLeft: /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ jsx5("path", { d: "M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z" }) }),
1975
- table: /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ jsx5("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" }) }),
1976
- htmlFile: /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ jsx5("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" }) })
2027
+ link: /* @__PURE__ */ jsx4("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ jsx4("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" }) }),
2028
+ chevronRight: /* @__PURE__ */ jsx4("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ jsx4("path", { d: "M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" }) }),
2029
+ chevronLeft: /* @__PURE__ */ jsx4("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ jsx4("path", { d: "M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z" }) }),
2030
+ table: /* @__PURE__ */ jsx4("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ jsx4("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" }) }),
2031
+ htmlFile: /* @__PURE__ */ jsx4("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ jsx4("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" }) })
1977
2032
  };
1978
2033
  var BlockTypeIcons = {
1979
- paragraph: /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ jsx5("path", { d: "M5 5h14v2H5zM5 11h14v2H5zM5 17h10v2H5z" }) }),
1980
- h1: /* @__PURE__ */ jsx5("span", { className: "lumir-block-icon-text", children: "H1" }),
1981
- h2: /* @__PURE__ */ jsx5("span", { className: "lumir-block-icon-text", children: "H2" }),
1982
- h3: /* @__PURE__ */ jsx5("span", { className: "lumir-block-icon-text", children: "H3" }),
1983
- h4: /* @__PURE__ */ jsx5("span", { className: "lumir-block-icon-text", children: "H4" }),
1984
- h5: /* @__PURE__ */ jsx5("span", { className: "lumir-block-icon-text", children: "H5" }),
1985
- h6: /* @__PURE__ */ jsx5("span", { className: "lumir-block-icon-text", children: "H6" }),
2034
+ paragraph: /* @__PURE__ */ jsx4("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ jsx4("path", { d: "M5 5h14v2H5zM5 11h14v2H5zM5 17h10v2H5z" }) }),
2035
+ h1: /* @__PURE__ */ jsx4("span", { className: "lumir-block-icon-text", children: "H1" }),
2036
+ h2: /* @__PURE__ */ jsx4("span", { className: "lumir-block-icon-text", children: "H2" }),
2037
+ h3: /* @__PURE__ */ jsx4("span", { className: "lumir-block-icon-text", children: "H3" }),
2038
+ h4: /* @__PURE__ */ jsx4("span", { className: "lumir-block-icon-text", children: "H4" }),
2039
+ h5: /* @__PURE__ */ jsx4("span", { className: "lumir-block-icon-text", children: "H5" }),
2040
+ h6: /* @__PURE__ */ jsx4("span", { className: "lumir-block-icon-text", children: "H6" }),
1986
2041
  toggleH1: /* @__PURE__ */ jsxs4("span", { className: "lumir-block-icon-toggle", children: [
1987
- /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "8", height: "8", children: /* @__PURE__ */ jsx5("path", { d: "M8 5v14l11-7z" }) }),
1988
- /* @__PURE__ */ jsx5("span", { children: "H1" })
2042
+ /* @__PURE__ */ jsx4("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "8", height: "8", children: /* @__PURE__ */ jsx4("path", { d: "M8 5v14l11-7z" }) }),
2043
+ /* @__PURE__ */ jsx4("span", { children: "H1" })
1989
2044
  ] }),
1990
2045
  toggleH2: /* @__PURE__ */ jsxs4("span", { className: "lumir-block-icon-toggle", children: [
1991
- /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "8", height: "8", children: /* @__PURE__ */ jsx5("path", { d: "M8 5v14l11-7z" }) }),
1992
- /* @__PURE__ */ jsx5("span", { children: "H2" })
2046
+ /* @__PURE__ */ jsx4("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "8", height: "8", children: /* @__PURE__ */ jsx4("path", { d: "M8 5v14l11-7z" }) }),
2047
+ /* @__PURE__ */ jsx4("span", { children: "H2" })
1993
2048
  ] }),
1994
2049
  toggleH3: /* @__PURE__ */ jsxs4("span", { className: "lumir-block-icon-toggle", children: [
1995
- /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "8", height: "8", children: /* @__PURE__ */ jsx5("path", { d: "M8 5v14l11-7z" }) }),
1996
- /* @__PURE__ */ jsx5("span", { children: "H3" })
2050
+ /* @__PURE__ */ jsx4("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "8", height: "8", children: /* @__PURE__ */ jsx4("path", { d: "M8 5v14l11-7z" }) }),
2051
+ /* @__PURE__ */ jsx4("span", { children: "H3" })
1997
2052
  ] }),
1998
- quote: /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ jsx5("path", { d: "M6 17h3l2-4V7H5v6h3zm8 0h3l2-4V7h-6v6h3z" }) }),
1999
- codeBlock: /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ jsx5("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" }) }),
2053
+ quote: /* @__PURE__ */ jsx4("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ jsx4("path", { d: "M6 17h3l2-4V7H5v6h3zm8 0h3l2-4V7h-6v6h3z" }) }),
2054
+ codeBlock: /* @__PURE__ */ jsx4("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ jsx4("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" }) }),
2000
2055
  toggleList: /* @__PURE__ */ jsxs4("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: [
2001
- /* @__PURE__ */ jsx5("path", { d: "M10 6h10v2H10zM10 11h10v2H10zM10 16h10v2H10z" }),
2002
- /* @__PURE__ */ jsx5(
2056
+ /* @__PURE__ */ jsx4("path", { d: "M10 6h10v2H10zM10 11h10v2H10zM10 16h10v2H10z" }),
2057
+ /* @__PURE__ */ jsx4(
2003
2058
  "path",
2004
2059
  {
2005
2060
  d: "M4 8l4 4-4 4",
@@ -2012,14 +2067,14 @@ var BlockTypeIcons = {
2012
2067
  )
2013
2068
  ] }),
2014
2069
  bulletList: /* @__PURE__ */ jsxs4("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: [
2015
- /* @__PURE__ */ jsx5("circle", { cx: "4", cy: "6", r: "1.5" }),
2016
- /* @__PURE__ */ jsx5("circle", { cx: "4", cy: "12", r: "1.5" }),
2017
- /* @__PURE__ */ jsx5("circle", { cx: "4", cy: "18", r: "1.5" }),
2018
- /* @__PURE__ */ jsx5("path", { d: "M8 5h12v2H8zM8 11h12v2H8zM8 17h12v2H8z" })
2070
+ /* @__PURE__ */ jsx4("circle", { cx: "4", cy: "6", r: "1.5" }),
2071
+ /* @__PURE__ */ jsx4("circle", { cx: "4", cy: "12", r: "1.5" }),
2072
+ /* @__PURE__ */ jsx4("circle", { cx: "4", cy: "18", r: "1.5" }),
2073
+ /* @__PURE__ */ jsx4("path", { d: "M8 5h12v2H8zM8 11h12v2H8zM8 17h12v2H8z" })
2019
2074
  ] }),
2020
- numberedList: /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ jsx5("path", { d: "M2 17h2v.5H3v1h1v.5H2v1h3v-4H2v1zm1-9h1V4H2v1h1v3zm-1 3h1.8L2 13.1v.9h3v-1H3.2L5 10.9V10H2v1zm5-6v2h14V5H7zm0 14h14v-2H7v2zm0-6h14v-2H7v2z" }) }),
2075
+ numberedList: /* @__PURE__ */ jsx4("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ jsx4("path", { d: "M2 17h2v.5H3v1h1v.5H2v1h3v-4H2v1zm1-9h1V4H2v1h1v3zm-1 3h1.8L2 13.1v.9h3v-1H3.2L5 10.9V10H2v1zm5-6v2h14V5H7zm0 14h14v-2H7v2zm0-6h14v-2H7v2z" }) }),
2021
2076
  checkList: /* @__PURE__ */ jsxs4("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: [
2022
- /* @__PURE__ */ jsx5(
2077
+ /* @__PURE__ */ jsx4(
2023
2078
  "rect",
2024
2079
  {
2025
2080
  x: "3",
@@ -2032,7 +2087,7 @@ var BlockTypeIcons = {
2032
2087
  strokeWidth: "1.5"
2033
2088
  }
2034
2089
  ),
2035
- /* @__PURE__ */ jsx5(
2090
+ /* @__PURE__ */ jsx4(
2036
2091
  "path",
2037
2092
  {
2038
2093
  d: "M4.5 7l1.5 1.5 3-3",
@@ -2043,8 +2098,8 @@ var BlockTypeIcons = {
2043
2098
  strokeLinejoin: "round"
2044
2099
  }
2045
2100
  ),
2046
- /* @__PURE__ */ jsx5("path", { d: "M12 6h8v2h-8z" }),
2047
- /* @__PURE__ */ jsx5(
2101
+ /* @__PURE__ */ jsx4("path", { d: "M12 6h8v2h-8z" }),
2102
+ /* @__PURE__ */ jsx4(
2048
2103
  "rect",
2049
2104
  {
2050
2105
  x: "3",
@@ -2057,17 +2112,17 @@ var BlockTypeIcons = {
2057
2112
  strokeWidth: "1.5"
2058
2113
  }
2059
2114
  ),
2060
- /* @__PURE__ */ jsx5("path", { d: "M12 16h8v2h-8z" })
2115
+ /* @__PURE__ */ jsx4("path", { d: "M12 16h8v2h-8z" })
2061
2116
  ] })
2062
2117
  };
2063
2118
 
2064
2119
  // src/components/FloatingMenu/components/ToolbarDivider.tsx
2065
- import { jsx as jsx6 } from "react/jsx-runtime";
2066
- var ToolbarDivider = () => /* @__PURE__ */ jsx6("div", { className: "lumir-toolbar-divider" });
2120
+ import { jsx as jsx5 } from "react/jsx-runtime";
2121
+ var ToolbarDivider = () => /* @__PURE__ */ jsx5("div", { className: "lumir-toolbar-divider" });
2067
2122
 
2068
2123
  // src/components/FloatingMenu/components/UndoRedoButtons.tsx
2069
2124
  import { useCallback as useCallback4 } from "react";
2070
- import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
2125
+ import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
2071
2126
  var UndoRedoButtons = ({ editor }) => {
2072
2127
  const handleUndo = useCallback4(() => {
2073
2128
  try {
@@ -2087,7 +2142,7 @@ var UndoRedoButtons = ({ editor }) => {
2087
2142
  e.preventDefault();
2088
2143
  }, []);
2089
2144
  return /* @__PURE__ */ jsxs5("div", { className: "lumir-toolbar-group", children: [
2090
- /* @__PURE__ */ jsx7(
2145
+ /* @__PURE__ */ jsx6(
2091
2146
  "button",
2092
2147
  {
2093
2148
  className: "lumir-toolbar-btn",
@@ -2098,7 +2153,7 @@ var UndoRedoButtons = ({ editor }) => {
2098
2153
  children: Icons.undo
2099
2154
  }
2100
2155
  ),
2101
- /* @__PURE__ */ jsx7(
2156
+ /* @__PURE__ */ jsx6(
2102
2157
  "button",
2103
2158
  {
2104
2159
  className: "lumir-toolbar-btn",
@@ -2114,7 +2169,7 @@ var UndoRedoButtons = ({ editor }) => {
2114
2169
 
2115
2170
  // src/components/FloatingMenu/components/TextStyleButton.tsx
2116
2171
  import { useCallback as useCallback5 } from "react";
2117
- import { jsx as jsx8 } from "react/jsx-runtime";
2172
+ import { jsx as jsx7 } from "react/jsx-runtime";
2118
2173
  var iconMap = {
2119
2174
  bold: Icons.bold,
2120
2175
  italic: Icons.italic,
@@ -2150,7 +2205,7 @@ var TextStyleButton = ({
2150
2205
  const handleMouseDown2 = useCallback5((e) => {
2151
2206
  e.preventDefault();
2152
2207
  }, []);
2153
- return /* @__PURE__ */ jsx8(
2208
+ return /* @__PURE__ */ jsx7(
2154
2209
  "button",
2155
2210
  {
2156
2211
  className: cn("lumir-toolbar-btn", isActive && "is-active"),
@@ -2260,7 +2315,7 @@ function getTableAlignment(editor, blockId) {
2260
2315
  }
2261
2316
 
2262
2317
  // src/components/FloatingMenu/components/AlignButton.tsx
2263
- import { jsx as jsx9 } from "react/jsx-runtime";
2318
+ import { jsx as jsx8 } from "react/jsx-runtime";
2264
2319
  var iconMap2 = {
2265
2320
  left: Icons.alignLeft,
2266
2321
  center: Icons.alignCenter,
@@ -2303,7 +2358,7 @@ var AlignButton = ({
2303
2358
  const handleMouseDown2 = useCallback6((e) => {
2304
2359
  e.preventDefault();
2305
2360
  }, []);
2306
- return /* @__PURE__ */ jsx9(
2361
+ return /* @__PURE__ */ jsx8(
2307
2362
  "button",
2308
2363
  {
2309
2364
  className: cn("lumir-toolbar-btn", isActive && "is-active"),
@@ -2318,7 +2373,7 @@ var AlignButton = ({
2318
2373
 
2319
2374
  // src/components/FloatingMenu/components/ListButton.tsx
2320
2375
  import { useCallback as useCallback7 } from "react";
2321
- import { jsx as jsx10 } from "react/jsx-runtime";
2376
+ import { jsx as jsx9 } from "react/jsx-runtime";
2322
2377
  var iconMap3 = {
2323
2378
  bullet: Icons.bulletList,
2324
2379
  numbered: Icons.numberedList
@@ -2353,7 +2408,7 @@ var ListButton = ({ editor, type }) => {
2353
2408
  const handleMouseDown2 = useCallback7((e) => {
2354
2409
  e.preventDefault();
2355
2410
  }, []);
2356
- return /* @__PURE__ */ jsx10(
2411
+ return /* @__PURE__ */ jsx9(
2357
2412
  "button",
2358
2413
  {
2359
2414
  className: cn("lumir-toolbar-btn", isActive && "is-active"),
@@ -2368,7 +2423,7 @@ var ListButton = ({ editor, type }) => {
2368
2423
 
2369
2424
  // src/components/FloatingMenu/components/ImageButton.tsx
2370
2425
  import { useCallback as useCallback8 } from "react";
2371
- import { jsx as jsx11 } from "react/jsx-runtime";
2426
+ import { jsx as jsx10 } from "react/jsx-runtime";
2372
2427
  var ImageButton = ({
2373
2428
  editor,
2374
2429
  onImageUpload
@@ -2401,7 +2456,7 @@ var ImageButton = ({
2401
2456
  const handleMouseDown2 = useCallback8((e) => {
2402
2457
  e.preventDefault();
2403
2458
  }, []);
2404
- return /* @__PURE__ */ jsx11(
2459
+ return /* @__PURE__ */ jsx10(
2405
2460
  "button",
2406
2461
  {
2407
2462
  className: "lumir-toolbar-btn",
@@ -2449,7 +2504,7 @@ var getHexFromColorValue = (value, type) => {
2449
2504
  };
2450
2505
 
2451
2506
  // src/components/FloatingMenu/components/ColorButton.tsx
2452
- import { jsx as jsx12, jsxs as jsxs6 } from "react/jsx-runtime";
2507
+ import { jsx as jsx11, jsxs as jsxs6 } from "react/jsx-runtime";
2453
2508
  var ColorButton = ({ editor, type }) => {
2454
2509
  const [isOpen, setIsOpen] = useState4(false);
2455
2510
  const [currentColor, setCurrentColor] = useState4("default");
@@ -2519,7 +2574,7 @@ var ColorButton = ({ editor, type }) => {
2519
2574
  type: "button",
2520
2575
  children: [
2521
2576
  type === "text" ? Icons.textColor : Icons.bgColor,
2522
- /* @__PURE__ */ jsx12(
2577
+ /* @__PURE__ */ jsx11(
2523
2578
  "span",
2524
2579
  {
2525
2580
  className: "lumir-color-indicator",
@@ -2531,7 +2586,7 @@ var ColorButton = ({ editor, type }) => {
2531
2586
  ]
2532
2587
  }
2533
2588
  ),
2534
- isOpen && /* @__PURE__ */ jsx12("div", { className: "lumir-dropdown-menu lumir-color-menu", children: /* @__PURE__ */ jsx12("div", { className: "lumir-color-grid", children: colors.map((color) => /* @__PURE__ */ jsx12(
2589
+ isOpen && /* @__PURE__ */ jsx11("div", { className: "lumir-dropdown-menu lumir-color-menu", children: /* @__PURE__ */ jsx11("div", { className: "lumir-color-grid", children: colors.map((color) => /* @__PURE__ */ jsx11(
2535
2590
  "button",
2536
2591
  {
2537
2592
  className: cn(
@@ -2551,20 +2606,27 @@ var ColorButton = ({ editor, type }) => {
2551
2606
 
2552
2607
  // src/components/FloatingMenu/components/FontSizeButton.tsx
2553
2608
  import { useState as useState5, useEffect as useEffect5, useRef as useRef5, useCallback as useCallback10 } from "react";
2554
- import { jsx as jsx13, jsxs as jsxs7 } from "react/jsx-runtime";
2609
+ import { jsx as jsx12, jsxs as jsxs7 } from "react/jsx-runtime";
2555
2610
  var DEFAULT_LABEL = "\uAE30\uBCF8";
2556
2611
  var toLabel = (size) => size.replace(/px$/, "");
2557
2612
  var FontSizeButton = ({ editor }) => {
2558
2613
  const [isOpen, setIsOpen] = useState5(false);
2559
2614
  const dropdownRef = useRef5(null);
2560
- const getCurrentSize = () => {
2561
- try {
2562
- return editor?.getActiveStyles?.()?.fontSize || "";
2563
- } catch {
2564
- return "";
2565
- }
2566
- };
2567
- const currentSize = getCurrentSize();
2615
+ const live = readSelectionFontSize(editor);
2616
+ const [optimistic, setOptimistic] = useState5(null);
2617
+ const lastLiveRef = useRef5(live);
2618
+ useEffect5(() => {
2619
+ if (live !== lastLiveRef.current) {
2620
+ lastLiveRef.current = live;
2621
+ setOptimistic(null);
2622
+ }
2623
+ }, [live]);
2624
+ const currentSize = optimistic ?? live;
2625
+ const currentPx = parseFontSizePx(currentSize);
2626
+ const [inputValue, setInputValue] = useState5(String(currentPx));
2627
+ useEffect5(() => {
2628
+ setInputValue(String(currentPx));
2629
+ }, [currentPx]);
2568
2630
  useEffect5(() => {
2569
2631
  const handleClickOutside = (e) => {
2570
2632
  if (dropdownRef.current && !dropdownRef.current.contains(e.target)) {
@@ -2580,8 +2642,10 @@ var FontSizeButton = ({ editor }) => {
2580
2642
  if (!editor) return;
2581
2643
  if (size === "") {
2582
2644
  editor.removeStyles?.({ fontSize: "" });
2645
+ setOptimistic(null);
2583
2646
  } else {
2584
2647
  editor.addStyles?.({ fontSize: size });
2648
+ setOptimistic(size);
2585
2649
  }
2586
2650
  setIsOpen(false);
2587
2651
  setTimeout(() => editor.focus?.());
@@ -2591,6 +2655,32 @@ var FontSizeButton = ({ editor }) => {
2591
2655
  },
2592
2656
  [editor]
2593
2657
  );
2658
+ const stepBy = useCallback10(
2659
+ (delta) => {
2660
+ try {
2661
+ const value = toFontSizeValue(currentPx + delta);
2662
+ editor?.addStyles?.({ fontSize: value });
2663
+ setOptimistic(value);
2664
+ } catch (err) {
2665
+ console.error("Font size step failed:", err);
2666
+ }
2667
+ },
2668
+ [editor, currentPx]
2669
+ );
2670
+ const applyInput = useCallback10(() => {
2671
+ const n = parseInt(inputValue, 10);
2672
+ if (Number.isFinite(n)) {
2673
+ try {
2674
+ const value = toFontSizeValue(n);
2675
+ editor?.addStyles?.({ fontSize: value });
2676
+ setOptimistic(value);
2677
+ } catch (err) {
2678
+ console.error("Font size apply failed:", err);
2679
+ }
2680
+ } else {
2681
+ setInputValue(String(currentPx));
2682
+ }
2683
+ }, [editor, inputValue, currentPx]);
2594
2684
  const handleMouseDown2 = useCallback10((e) => {
2595
2685
  e.preventDefault();
2596
2686
  }, []);
@@ -2604,13 +2694,64 @@ var FontSizeButton = ({ editor }) => {
2604
2694
  title: "\uAE00\uC790 \uD06C\uAE30",
2605
2695
  type: "button",
2606
2696
  children: [
2607
- /* @__PURE__ */ jsx13("span", { className: "lumir-font-size-label", children: currentSize ? toLabel(currentSize) : DEFAULT_LABEL }),
2697
+ /* @__PURE__ */ jsx12("span", { className: "lumir-font-size-label", children: currentSize ? toLabel(currentSize) : DEFAULT_LABEL }),
2608
2698
  Icons.expandMore
2609
2699
  ]
2610
2700
  }
2611
2701
  ),
2612
2702
  isOpen && /* @__PURE__ */ jsxs7("div", { className: "lumir-dropdown-menu lumir-font-size-menu", children: [
2613
- /* @__PURE__ */ jsx13(
2703
+ /* @__PURE__ */ jsxs7("div", { className: "lumir-fs-stepper", children: [
2704
+ /* @__PURE__ */ jsx12(
2705
+ "button",
2706
+ {
2707
+ type: "button",
2708
+ className: "lumir-fs-stepper-btn",
2709
+ "aria-label": "\uAE00\uC790 \uD06C\uAE30 1px \uC904\uC774\uAE30",
2710
+ disabled: currentPx <= FONT_SIZE_MIN,
2711
+ onMouseDown: handleMouseDown2,
2712
+ onClick: () => stepBy(-1),
2713
+ children: "\u2212"
2714
+ }
2715
+ ),
2716
+ /* @__PURE__ */ jsx12(
2717
+ "input",
2718
+ {
2719
+ className: "lumir-fs-stepper-input",
2720
+ type: "text",
2721
+ inputMode: "numeric",
2722
+ "aria-label": "\uAE00\uC790 \uD06C\uAE30 \uC785\uB825",
2723
+ value: inputValue,
2724
+ onChange: (e) => setInputValue(e.target.value.replace(/[^0-9]/g, "")),
2725
+ onKeyDown: (e) => {
2726
+ e.stopPropagation();
2727
+ if (e.key === "Enter") {
2728
+ e.preventDefault();
2729
+ applyInput();
2730
+ } else if (e.key === "ArrowUp") {
2731
+ e.preventDefault();
2732
+ stepBy(1);
2733
+ } else if (e.key === "ArrowDown") {
2734
+ e.preventDefault();
2735
+ stepBy(-1);
2736
+ }
2737
+ },
2738
+ onBlur: applyInput
2739
+ }
2740
+ ),
2741
+ /* @__PURE__ */ jsx12(
2742
+ "button",
2743
+ {
2744
+ type: "button",
2745
+ className: "lumir-fs-stepper-btn",
2746
+ "aria-label": "\uAE00\uC790 \uD06C\uAE30 1px \uB298\uB9AC\uAE30",
2747
+ disabled: currentPx >= FONT_SIZE_MAX,
2748
+ onMouseDown: handleMouseDown2,
2749
+ onClick: () => stepBy(1),
2750
+ children: "+"
2751
+ }
2752
+ )
2753
+ ] }),
2754
+ /* @__PURE__ */ jsx12(
2614
2755
  "button",
2615
2756
  {
2616
2757
  className: cn(
@@ -2623,7 +2764,7 @@ var FontSizeButton = ({ editor }) => {
2623
2764
  children: DEFAULT_LABEL
2624
2765
  }
2625
2766
  ),
2626
- FONT_SIZE_PRESETS.map((size) => /* @__PURE__ */ jsx13(
2767
+ FONT_SIZE_PRESETS.map((size) => /* @__PURE__ */ jsx12(
2627
2768
  "button",
2628
2769
  {
2629
2770
  className: cn(
@@ -2643,7 +2784,7 @@ var FontSizeButton = ({ editor }) => {
2643
2784
 
2644
2785
  // src/components/FloatingMenu/components/LinkButton.tsx
2645
2786
  import { useState as useState6, useEffect as useEffect6, useRef as useRef6, useCallback as useCallback11 } from "react";
2646
- import { jsx as jsx14, jsxs as jsxs8 } from "react/jsx-runtime";
2787
+ import { jsx as jsx13, jsxs as jsxs8 } from "react/jsx-runtime";
2647
2788
  var isDangerousProtocol = (url) => {
2648
2789
  const trimmedUrl = url.trim().toLowerCase();
2649
2790
  const dangerousPatterns = [
@@ -2743,7 +2884,7 @@ var LinkButton = ({ editor }) => {
2743
2884
  [handleSubmit, handleCancel]
2744
2885
  );
2745
2886
  return /* @__PURE__ */ jsxs8("div", { className: "lumir-dropdown-wrapper", ref: dropdownRef, children: [
2746
- /* @__PURE__ */ jsx14(
2887
+ /* @__PURE__ */ jsx13(
2747
2888
  "button",
2748
2889
  {
2749
2890
  className: "lumir-toolbar-btn",
@@ -2754,8 +2895,8 @@ var LinkButton = ({ editor }) => {
2754
2895
  children: Icons.link
2755
2896
  }
2756
2897
  ),
2757
- isOpen && /* @__PURE__ */ jsx14("div", { className: "lumir-dropdown-menu lumir-link-menu", children: /* @__PURE__ */ jsxs8("form", { onSubmit: handleSubmit, className: "lumir-link-form", children: [
2758
- /* @__PURE__ */ jsx14(
2898
+ isOpen && /* @__PURE__ */ jsx13("div", { className: "lumir-dropdown-menu lumir-link-menu", children: /* @__PURE__ */ jsxs8("form", { onSubmit: handleSubmit, className: "lumir-link-form", children: [
2899
+ /* @__PURE__ */ jsx13(
2759
2900
  "input",
2760
2901
  {
2761
2902
  ref: inputRef,
@@ -2771,7 +2912,7 @@ var LinkButton = ({ editor }) => {
2771
2912
  onMouseDown: handleMouseDown2
2772
2913
  }
2773
2914
  ),
2774
- errorMsg && /* @__PURE__ */ jsx14(
2915
+ errorMsg && /* @__PURE__ */ jsx13(
2775
2916
  "div",
2776
2917
  {
2777
2918
  style: {
@@ -2784,7 +2925,7 @@ var LinkButton = ({ editor }) => {
2784
2925
  }
2785
2926
  ),
2786
2927
  /* @__PURE__ */ jsxs8("div", { className: "lumir-link-actions", children: [
2787
- /* @__PURE__ */ jsx14(
2928
+ /* @__PURE__ */ jsx13(
2788
2929
  "button",
2789
2930
  {
2790
2931
  type: "button",
@@ -2794,7 +2935,7 @@ var LinkButton = ({ editor }) => {
2794
2935
  children: "\uCDE8\uC18C"
2795
2936
  }
2796
2937
  ),
2797
- /* @__PURE__ */ jsx14(
2938
+ /* @__PURE__ */ jsx13(
2798
2939
  "button",
2799
2940
  {
2800
2941
  type: "submit",
@@ -2811,7 +2952,7 @@ var LinkButton = ({ editor }) => {
2811
2952
 
2812
2953
  // src/components/FloatingMenu/components/TableButton.tsx
2813
2954
  import { useCallback as useCallback12 } from "react";
2814
- import { jsx as jsx15 } from "react/jsx-runtime";
2955
+ import { jsx as jsx14 } from "react/jsx-runtime";
2815
2956
  var TableButton = ({ editor }) => {
2816
2957
  const handleClick = useCallback12(() => {
2817
2958
  try {
@@ -2838,7 +2979,7 @@ var TableButton = ({ editor }) => {
2838
2979
  const handleMouseDown2 = useCallback12((e) => {
2839
2980
  e.preventDefault();
2840
2981
  }, []);
2841
- return /* @__PURE__ */ jsx15(
2982
+ return /* @__PURE__ */ jsx14(
2842
2983
  "button",
2843
2984
  {
2844
2985
  className: "lumir-toolbar-btn",
@@ -2853,7 +2994,7 @@ var TableButton = ({ editor }) => {
2853
2994
 
2854
2995
  // src/components/FloatingMenu/components/HTMLImportButton.tsx
2855
2996
  import { useCallback as useCallback13, useRef as useRef7 } from "react";
2856
- import { Fragment as Fragment3, jsx as jsx16, jsxs as jsxs9 } from "react/jsx-runtime";
2997
+ import { Fragment as Fragment3, jsx as jsx15, jsxs as jsxs9 } from "react/jsx-runtime";
2857
2998
  var HTMLImportButton = ({
2858
2999
  editor
2859
3000
  }) => {
@@ -2901,7 +3042,7 @@ var HTMLImportButton = ({
2901
3042
  e.preventDefault();
2902
3043
  }, []);
2903
3044
  return /* @__PURE__ */ jsxs9(Fragment3, { children: [
2904
- /* @__PURE__ */ jsx16(
3045
+ /* @__PURE__ */ jsx15(
2905
3046
  "input",
2906
3047
  {
2907
3048
  ref: fileInputRef,
@@ -2911,7 +3052,7 @@ var HTMLImportButton = ({
2911
3052
  style: { display: "none" }
2912
3053
  }
2913
3054
  ),
2914
- /* @__PURE__ */ jsx16(
3055
+ /* @__PURE__ */ jsx15(
2915
3056
  "button",
2916
3057
  {
2917
3058
  className: "lumir-toolbar-btn",
@@ -2927,7 +3068,7 @@ var HTMLImportButton = ({
2927
3068
 
2928
3069
  // src/components/FloatingMenu/components/BlockTypeSelect.tsx
2929
3070
  import { useState as useState7, useEffect as useEffect7, useRef as useRef8, useCallback as useCallback14 } from "react";
2930
- import { jsx as jsx17, jsxs as jsxs10 } from "react/jsx-runtime";
3071
+ import { jsx as jsx16, jsxs as jsxs10 } from "react/jsx-runtime";
2931
3072
  var blockTypeCategories = [
2932
3073
  {
2933
3074
  category: "Headings",
@@ -3039,14 +3180,14 @@ var BlockTypeSelect = ({ editor }) => {
3039
3180
  onMouseDown: handleMouseDown2,
3040
3181
  type: "button",
3041
3182
  children: [
3042
- /* @__PURE__ */ jsx17("span", { className: "lumir-block-icon", children: BlockTypeIcons[getCurrentIcon()] }),
3043
- /* @__PURE__ */ jsx17("span", { className: "lumir-block-label", children: getCurrentLabel() }),
3183
+ /* @__PURE__ */ jsx16("span", { className: "lumir-block-icon", children: BlockTypeIcons[getCurrentIcon()] }),
3184
+ /* @__PURE__ */ jsx16("span", { className: "lumir-block-label", children: getCurrentLabel() }),
3044
3185
  Icons.expandMore
3045
3186
  ]
3046
3187
  }
3047
3188
  ),
3048
- isOpen && /* @__PURE__ */ jsx17("div", { className: "lumir-dropdown-menu lumir-block-menu", children: blockTypeCategories.map((category) => /* @__PURE__ */ jsxs10("div", { className: "lumir-block-category", children: [
3049
- /* @__PURE__ */ jsx17("div", { className: "lumir-block-category-title", children: category.category }),
3189
+ isOpen && /* @__PURE__ */ jsx16("div", { className: "lumir-dropdown-menu lumir-block-menu", children: blockTypeCategories.map((category) => /* @__PURE__ */ jsxs10("div", { className: "lumir-block-category", children: [
3190
+ /* @__PURE__ */ jsx16("div", { className: "lumir-block-category-title", children: category.category }),
3050
3191
  category.items.map((bt) => /* @__PURE__ */ jsxs10(
3051
3192
  "button",
3052
3193
  {
@@ -3057,8 +3198,8 @@ var BlockTypeSelect = ({ editor }) => {
3057
3198
  onClick: () => handleTypeChange(bt.type, bt.level, bt.isToggle),
3058
3199
  onMouseDown: handleMouseDown2,
3059
3200
  children: [
3060
- /* @__PURE__ */ jsx17("span", { className: "lumir-block-icon", children: BlockTypeIcons[bt.icon] }),
3061
- /* @__PURE__ */ jsx17("span", { className: "lumir-block-item-title", children: bt.label })
3201
+ /* @__PURE__ */ jsx16("span", { className: "lumir-block-icon", children: BlockTypeIcons[bt.icon] }),
3202
+ /* @__PURE__ */ jsx16("span", { className: "lumir-block-item-title", children: bt.label })
3062
3203
  ]
3063
3204
  },
3064
3205
  bt.icon
@@ -3068,7 +3209,7 @@ var BlockTypeSelect = ({ editor }) => {
3068
3209
  };
3069
3210
 
3070
3211
  // src/components/FloatingMenu/index.tsx
3071
- import { Fragment as Fragment4, jsx as jsx18, jsxs as jsxs11 } from "react/jsx-runtime";
3212
+ import { Fragment as Fragment4, jsx as jsx17, jsxs as jsxs11 } from "react/jsx-runtime";
3072
3213
  var COMPACT_BREAKPOINT = 700;
3073
3214
  var MINIMIZED_BREAKPOINT = 400;
3074
3215
  var FloatingMenu = ({
@@ -3122,7 +3263,7 @@ var FloatingMenu = ({
3122
3263
  return () => resizeObserver.disconnect();
3123
3264
  }, []);
3124
3265
  const MinimizedLayout = () => /* @__PURE__ */ jsxs11(Fragment4, { children: [
3125
- /* @__PURE__ */ jsx18(
3266
+ /* @__PURE__ */ jsx17(
3126
3267
  "button",
3127
3268
  {
3128
3269
  className: "lumir-toolbar-button lumir-toggle-button",
@@ -3134,119 +3275,119 @@ var FloatingMenu = ({
3134
3275
  }
3135
3276
  ),
3136
3277
  !isMinimized && /* @__PURE__ */ jsxs11(Fragment4, { children: [
3137
- /* @__PURE__ */ jsx18(ToolbarDivider, {}),
3138
- /* @__PURE__ */ jsx18(UndoRedoButtons, { editor }),
3139
- /* @__PURE__ */ jsx18(ToolbarDivider, {}),
3140
- /* @__PURE__ */ jsx18("div", { className: "lumir-toolbar-group", children: /* @__PURE__ */ jsx18(BlockTypeSelect, { editor }) }),
3141
- /* @__PURE__ */ jsx18(ToolbarDivider, {}),
3278
+ /* @__PURE__ */ jsx17(ToolbarDivider, {}),
3279
+ /* @__PURE__ */ jsx17(UndoRedoButtons, { editor }),
3280
+ /* @__PURE__ */ jsx17(ToolbarDivider, {}),
3281
+ /* @__PURE__ */ jsx17("div", { className: "lumir-toolbar-group", children: /* @__PURE__ */ jsx17(BlockTypeSelect, { editor }) }),
3282
+ /* @__PURE__ */ jsx17(ToolbarDivider, {}),
3142
3283
  /* @__PURE__ */ jsxs11("div", { className: "lumir-toolbar-group", children: [
3143
- /* @__PURE__ */ jsx18(TextStyleButton, { editor, style: "bold" }),
3144
- /* @__PURE__ */ jsx18(TextStyleButton, { editor, style: "italic" }),
3145
- /* @__PURE__ */ jsx18(TextStyleButton, { editor, style: "underline" }),
3146
- /* @__PURE__ */ jsx18(TextStyleButton, { editor, style: "strike" })
3284
+ /* @__PURE__ */ jsx17(TextStyleButton, { editor, style: "bold" }),
3285
+ /* @__PURE__ */ jsx17(TextStyleButton, { editor, style: "italic" }),
3286
+ /* @__PURE__ */ jsx17(TextStyleButton, { editor, style: "underline" }),
3287
+ /* @__PURE__ */ jsx17(TextStyleButton, { editor, style: "strike" })
3147
3288
  ] }),
3148
- /* @__PURE__ */ jsx18(ToolbarDivider, {}),
3289
+ /* @__PURE__ */ jsx17(ToolbarDivider, {}),
3149
3290
  /* @__PURE__ */ jsxs11("div", { className: "lumir-toolbar-group", children: [
3150
- /* @__PURE__ */ jsx18(AlignButton, { editor, alignment: "left" }),
3151
- /* @__PURE__ */ jsx18(AlignButton, { editor, alignment: "center" }),
3152
- /* @__PURE__ */ jsx18(AlignButton, { editor, alignment: "right" })
3291
+ /* @__PURE__ */ jsx17(AlignButton, { editor, alignment: "left" }),
3292
+ /* @__PURE__ */ jsx17(AlignButton, { editor, alignment: "center" }),
3293
+ /* @__PURE__ */ jsx17(AlignButton, { editor, alignment: "right" })
3153
3294
  ] }),
3154
- /* @__PURE__ */ jsx18(ToolbarDivider, {}),
3295
+ /* @__PURE__ */ jsx17(ToolbarDivider, {}),
3155
3296
  /* @__PURE__ */ jsxs11("div", { className: "lumir-toolbar-group", children: [
3156
- /* @__PURE__ */ jsx18(ListButton, { editor, type: "bullet" }),
3157
- /* @__PURE__ */ jsx18(ListButton, { editor, type: "numbered" })
3297
+ /* @__PURE__ */ jsx17(ListButton, { editor, type: "bullet" }),
3298
+ /* @__PURE__ */ jsx17(ListButton, { editor, type: "numbered" })
3158
3299
  ] }),
3159
- /* @__PURE__ */ jsx18(ToolbarDivider, {}),
3300
+ /* @__PURE__ */ jsx17(ToolbarDivider, {}),
3160
3301
  /* @__PURE__ */ jsxs11("div", { className: "lumir-toolbar-group", children: [
3161
- /* @__PURE__ */ jsx18(FontSizeButton, { editor }),
3162
- /* @__PURE__ */ jsx18(ColorButton, { editor, type: "text" }),
3163
- /* @__PURE__ */ jsx18(ColorButton, { editor, type: "background" })
3302
+ /* @__PURE__ */ jsx17(FontSizeButton, { editor }),
3303
+ /* @__PURE__ */ jsx17(ColorButton, { editor, type: "text" }),
3304
+ /* @__PURE__ */ jsx17(ColorButton, { editor, type: "background" })
3164
3305
  ] }),
3165
- /* @__PURE__ */ jsx18(ToolbarDivider, {}),
3306
+ /* @__PURE__ */ jsx17(ToolbarDivider, {}),
3166
3307
  /* @__PURE__ */ jsxs11("div", { className: "lumir-toolbar-group", children: [
3167
- /* @__PURE__ */ jsx18(ImageButton, { editor, onImageUpload }),
3168
- /* @__PURE__ */ jsx18(LinkButton, { editor }),
3169
- /* @__PURE__ */ jsx18(TableButton, { editor }),
3170
- /* @__PURE__ */ jsx18(HTMLImportButton, { editor })
3308
+ /* @__PURE__ */ jsx17(ImageButton, { editor, onImageUpload }),
3309
+ /* @__PURE__ */ jsx17(LinkButton, { editor }),
3310
+ /* @__PURE__ */ jsx17(TableButton, { editor }),
3311
+ /* @__PURE__ */ jsx17(HTMLImportButton, { editor })
3171
3312
  ] })
3172
3313
  ] })
3173
3314
  ] });
3174
3315
  const SingleRowLayout = () => /* @__PURE__ */ jsxs11(Fragment4, { children: [
3175
- /* @__PURE__ */ jsx18(UndoRedoButtons, { editor }),
3176
- /* @__PURE__ */ jsx18(ToolbarDivider, {}),
3177
- /* @__PURE__ */ jsx18("div", { className: "lumir-toolbar-group", children: /* @__PURE__ */ jsx18(BlockTypeSelect, { editor }) }),
3178
- /* @__PURE__ */ jsx18(ToolbarDivider, {}),
3316
+ /* @__PURE__ */ jsx17(UndoRedoButtons, { editor }),
3317
+ /* @__PURE__ */ jsx17(ToolbarDivider, {}),
3318
+ /* @__PURE__ */ jsx17("div", { className: "lumir-toolbar-group", children: /* @__PURE__ */ jsx17(BlockTypeSelect, { editor }) }),
3319
+ /* @__PURE__ */ jsx17(ToolbarDivider, {}),
3179
3320
  /* @__PURE__ */ jsxs11("div", { className: "lumir-toolbar-group", children: [
3180
- /* @__PURE__ */ jsx18(TextStyleButton, { editor, style: "bold" }),
3181
- /* @__PURE__ */ jsx18(TextStyleButton, { editor, style: "italic" }),
3182
- /* @__PURE__ */ jsx18(TextStyleButton, { editor, style: "underline" }),
3183
- /* @__PURE__ */ jsx18(TextStyleButton, { editor, style: "strike" })
3321
+ /* @__PURE__ */ jsx17(TextStyleButton, { editor, style: "bold" }),
3322
+ /* @__PURE__ */ jsx17(TextStyleButton, { editor, style: "italic" }),
3323
+ /* @__PURE__ */ jsx17(TextStyleButton, { editor, style: "underline" }),
3324
+ /* @__PURE__ */ jsx17(TextStyleButton, { editor, style: "strike" })
3184
3325
  ] }),
3185
- /* @__PURE__ */ jsx18(ToolbarDivider, {}),
3326
+ /* @__PURE__ */ jsx17(ToolbarDivider, {}),
3186
3327
  /* @__PURE__ */ jsxs11("div", { className: "lumir-toolbar-group", children: [
3187
- /* @__PURE__ */ jsx18(AlignButton, { editor, alignment: "left" }),
3188
- /* @__PURE__ */ jsx18(AlignButton, { editor, alignment: "center" }),
3189
- /* @__PURE__ */ jsx18(AlignButton, { editor, alignment: "right" })
3328
+ /* @__PURE__ */ jsx17(AlignButton, { editor, alignment: "left" }),
3329
+ /* @__PURE__ */ jsx17(AlignButton, { editor, alignment: "center" }),
3330
+ /* @__PURE__ */ jsx17(AlignButton, { editor, alignment: "right" })
3190
3331
  ] }),
3191
- /* @__PURE__ */ jsx18(ToolbarDivider, {}),
3332
+ /* @__PURE__ */ jsx17(ToolbarDivider, {}),
3192
3333
  /* @__PURE__ */ jsxs11("div", { className: "lumir-toolbar-group", children: [
3193
- /* @__PURE__ */ jsx18(ListButton, { editor, type: "bullet" }),
3194
- /* @__PURE__ */ jsx18(ListButton, { editor, type: "numbered" })
3334
+ /* @__PURE__ */ jsx17(ListButton, { editor, type: "bullet" }),
3335
+ /* @__PURE__ */ jsx17(ListButton, { editor, type: "numbered" })
3195
3336
  ] }),
3196
- /* @__PURE__ */ jsx18(ToolbarDivider, {}),
3337
+ /* @__PURE__ */ jsx17(ToolbarDivider, {}),
3197
3338
  /* @__PURE__ */ jsxs11("div", { className: "lumir-toolbar-group", children: [
3198
- /* @__PURE__ */ jsx18(FontSizeButton, { editor }),
3199
- /* @__PURE__ */ jsx18(ColorButton, { editor, type: "text" }),
3200
- /* @__PURE__ */ jsx18(ColorButton, { editor, type: "background" })
3339
+ /* @__PURE__ */ jsx17(FontSizeButton, { editor }),
3340
+ /* @__PURE__ */ jsx17(ColorButton, { editor, type: "text" }),
3341
+ /* @__PURE__ */ jsx17(ColorButton, { editor, type: "background" })
3201
3342
  ] }),
3202
- /* @__PURE__ */ jsx18(ToolbarDivider, {}),
3343
+ /* @__PURE__ */ jsx17(ToolbarDivider, {}),
3203
3344
  /* @__PURE__ */ jsxs11("div", { className: "lumir-toolbar-group", children: [
3204
- /* @__PURE__ */ jsx18(ImageButton, { editor, onImageUpload }),
3205
- /* @__PURE__ */ jsx18(LinkButton, { editor }),
3206
- /* @__PURE__ */ jsx18(TableButton, { editor }),
3207
- /* @__PURE__ */ jsx18(HTMLImportButton, { editor })
3345
+ /* @__PURE__ */ jsx17(ImageButton, { editor, onImageUpload }),
3346
+ /* @__PURE__ */ jsx17(LinkButton, { editor }),
3347
+ /* @__PURE__ */ jsx17(TableButton, { editor }),
3348
+ /* @__PURE__ */ jsx17(HTMLImportButton, { editor })
3208
3349
  ] })
3209
3350
  ] });
3210
3351
  const TwoRowLayout = () => /* @__PURE__ */ jsxs11(Fragment4, { children: [
3211
3352
  /* @__PURE__ */ jsxs11("div", { className: "lumir-toolbar-row", children: [
3212
- /* @__PURE__ */ jsx18(UndoRedoButtons, { editor }),
3213
- /* @__PURE__ */ jsx18(ToolbarDivider, {}),
3353
+ /* @__PURE__ */ jsx17(UndoRedoButtons, { editor }),
3354
+ /* @__PURE__ */ jsx17(ToolbarDivider, {}),
3214
3355
  /* @__PURE__ */ jsxs11("div", { className: "lumir-toolbar-group", children: [
3215
- /* @__PURE__ */ jsx18(TextStyleButton, { editor, style: "bold" }),
3216
- /* @__PURE__ */ jsx18(TextStyleButton, { editor, style: "italic" }),
3217
- /* @__PURE__ */ jsx18(TextStyleButton, { editor, style: "underline" }),
3218
- /* @__PURE__ */ jsx18(TextStyleButton, { editor, style: "strike" })
3356
+ /* @__PURE__ */ jsx17(TextStyleButton, { editor, style: "bold" }),
3357
+ /* @__PURE__ */ jsx17(TextStyleButton, { editor, style: "italic" }),
3358
+ /* @__PURE__ */ jsx17(TextStyleButton, { editor, style: "underline" }),
3359
+ /* @__PURE__ */ jsx17(TextStyleButton, { editor, style: "strike" })
3219
3360
  ] }),
3220
- /* @__PURE__ */ jsx18(ToolbarDivider, {}),
3361
+ /* @__PURE__ */ jsx17(ToolbarDivider, {}),
3221
3362
  /* @__PURE__ */ jsxs11("div", { className: "lumir-toolbar-group", children: [
3222
- /* @__PURE__ */ jsx18(AlignButton, { editor, alignment: "left" }),
3223
- /* @__PURE__ */ jsx18(AlignButton, { editor, alignment: "center" }),
3224
- /* @__PURE__ */ jsx18(AlignButton, { editor, alignment: "right" })
3363
+ /* @__PURE__ */ jsx17(AlignButton, { editor, alignment: "left" }),
3364
+ /* @__PURE__ */ jsx17(AlignButton, { editor, alignment: "center" }),
3365
+ /* @__PURE__ */ jsx17(AlignButton, { editor, alignment: "right" })
3225
3366
  ] }),
3226
- /* @__PURE__ */ jsx18(ToolbarDivider, {}),
3367
+ /* @__PURE__ */ jsx17(ToolbarDivider, {}),
3227
3368
  /* @__PURE__ */ jsxs11("div", { className: "lumir-toolbar-group", children: [
3228
- /* @__PURE__ */ jsx18(ListButton, { editor, type: "bullet" }),
3229
- /* @__PURE__ */ jsx18(ListButton, { editor, type: "numbered" })
3369
+ /* @__PURE__ */ jsx17(ListButton, { editor, type: "bullet" }),
3370
+ /* @__PURE__ */ jsx17(ListButton, { editor, type: "numbered" })
3230
3371
  ] })
3231
3372
  ] }),
3232
3373
  /* @__PURE__ */ jsxs11("div", { className: "lumir-toolbar-row", children: [
3233
- /* @__PURE__ */ jsx18("div", { className: "lumir-toolbar-group", children: /* @__PURE__ */ jsx18(BlockTypeSelect, { editor }) }),
3234
- /* @__PURE__ */ jsx18(ToolbarDivider, {}),
3374
+ /* @__PURE__ */ jsx17("div", { className: "lumir-toolbar-group", children: /* @__PURE__ */ jsx17(BlockTypeSelect, { editor }) }),
3375
+ /* @__PURE__ */ jsx17(ToolbarDivider, {}),
3235
3376
  /* @__PURE__ */ jsxs11("div", { className: "lumir-toolbar-group", children: [
3236
- /* @__PURE__ */ jsx18(FontSizeButton, { editor }),
3237
- /* @__PURE__ */ jsx18(ColorButton, { editor, type: "text" }),
3238
- /* @__PURE__ */ jsx18(ColorButton, { editor, type: "background" })
3377
+ /* @__PURE__ */ jsx17(FontSizeButton, { editor }),
3378
+ /* @__PURE__ */ jsx17(ColorButton, { editor, type: "text" }),
3379
+ /* @__PURE__ */ jsx17(ColorButton, { editor, type: "background" })
3239
3380
  ] }),
3240
- /* @__PURE__ */ jsx18(ToolbarDivider, {}),
3381
+ /* @__PURE__ */ jsx17(ToolbarDivider, {}),
3241
3382
  /* @__PURE__ */ jsxs11("div", { className: "lumir-toolbar-group", children: [
3242
- /* @__PURE__ */ jsx18(ImageButton, { editor, onImageUpload }),
3243
- /* @__PURE__ */ jsx18(LinkButton, { editor }),
3244
- /* @__PURE__ */ jsx18(TableButton, { editor }),
3245
- /* @__PURE__ */ jsx18(HTMLImportButton, { editor })
3383
+ /* @__PURE__ */ jsx17(ImageButton, { editor, onImageUpload }),
3384
+ /* @__PURE__ */ jsx17(LinkButton, { editor }),
3385
+ /* @__PURE__ */ jsx17(TableButton, { editor }),
3386
+ /* @__PURE__ */ jsx17(HTMLImportButton, { editor })
3246
3387
  ] })
3247
3388
  ] })
3248
3389
  ] });
3249
- return /* @__PURE__ */ jsx18(
3390
+ return /* @__PURE__ */ jsx17(
3250
3391
  "div",
3251
3392
  {
3252
3393
  ref: wrapperRef,
@@ -3256,7 +3397,7 @@ var FloatingMenu = ({
3256
3397
  className
3257
3398
  ),
3258
3399
  "data-position": position,
3259
- children: /* @__PURE__ */ jsx18(
3400
+ children: /* @__PURE__ */ jsx17(
3260
3401
  "div",
3261
3402
  {
3262
3403
  className: cn(
@@ -3265,7 +3406,7 @@ var FloatingMenu = ({
3265
3406
  isMinimizable && "is-minimizable",
3266
3407
  isMinimized && "is-minimized"
3267
3408
  ),
3268
- children: isMinimizable ? /* @__PURE__ */ jsx18(MinimizedLayout, {}) : isCompact ? /* @__PURE__ */ jsx18(TwoRowLayout, {}) : /* @__PURE__ */ jsx18(SingleRowLayout, {})
3409
+ children: isMinimizable ? /* @__PURE__ */ jsx17(MinimizedLayout, {}) : isCompact ? /* @__PURE__ */ jsx17(TwoRowLayout, {}) : /* @__PURE__ */ jsx17(SingleRowLayout, {})
3269
3410
  }
3270
3411
  )
3271
3412
  }
@@ -4133,8 +4274,67 @@ var TableSelectAllExtension = Extension4.create({
4133
4274
  }
4134
4275
  });
4135
4276
 
4277
+ // src/extensions/InactiveSelectionExtension.ts
4278
+ import { Extension as Extension5 } from "@tiptap/core";
4279
+ import { Plugin as Plugin7, PluginKey as PluginKey7, TextSelection } from "prosemirror-state";
4280
+ import { Decoration as Decoration5, DecorationSet as DecorationSet5 } from "prosemirror-view";
4281
+ var inactiveSelectionKey = new PluginKey7("lumirInactiveSelection");
4282
+ var InactiveSelectionExtension = Extension5.create({
4283
+ name: "lumirInactiveSelection",
4284
+ addProseMirrorPlugins() {
4285
+ return [
4286
+ new Plugin7({
4287
+ key: inactiveSelectionKey,
4288
+ // 플러그인 state = 에디터 포커스 여부
4289
+ state: {
4290
+ init: () => false,
4291
+ apply: (tr, value) => {
4292
+ const meta = tr.getMeta(inactiveSelectionKey);
4293
+ return typeof meta === "boolean" ? meta : value;
4294
+ }
4295
+ },
4296
+ props: {
4297
+ decorations(state) {
4298
+ const hasFocus = inactiveSelectionKey.getState(state);
4299
+ if (hasFocus) {
4300
+ return null;
4301
+ }
4302
+ const { selection } = state;
4303
+ if (selection.empty || !(selection instanceof TextSelection)) {
4304
+ return null;
4305
+ }
4306
+ return DecorationSet5.create(state.doc, [
4307
+ Decoration5.inline(selection.from, selection.to, {
4308
+ class: "bn-inactive-selection"
4309
+ })
4310
+ ]);
4311
+ }
4312
+ },
4313
+ view(view) {
4314
+ const sync = () => {
4315
+ const has = view.hasFocus();
4316
+ if (inactiveSelectionKey.getState(view.state) !== has) {
4317
+ view.dispatch(view.state.tr.setMeta(inactiveSelectionKey, has));
4318
+ }
4319
+ };
4320
+ view.dom.addEventListener("focus", sync);
4321
+ view.dom.addEventListener("blur", sync);
4322
+ const raf = requestAnimationFrame(sync);
4323
+ return {
4324
+ destroy() {
4325
+ cancelAnimationFrame(raf);
4326
+ view.dom.removeEventListener("focus", sync);
4327
+ view.dom.removeEventListener("blur", sync);
4328
+ }
4329
+ };
4330
+ }
4331
+ })
4332
+ ];
4333
+ }
4334
+ });
4335
+
4136
4336
  // src/blocks/columns/insertColumns.ts
4137
- import { TextSelection } from "prosemirror-state";
4337
+ import { TextSelection as TextSelection2 } from "prosemirror-state";
4138
4338
  function insertTwoColumns(editor, showDivider = false) {
4139
4339
  const tiptap = editor?._tiptapEditor;
4140
4340
  if (!tiptap) {
@@ -4166,7 +4366,7 @@ function insertTwoColumns(editor, showDivider = false) {
4166
4366
  try {
4167
4367
  let tr = state.tr.insert(insertPos, list);
4168
4368
  try {
4169
- tr = tr.setSelection(TextSelection.create(tr.doc, insertPos + 4));
4369
+ tr = tr.setSelection(TextSelection2.create(tr.doc, insertPos + 4));
4170
4370
  } catch {
4171
4371
  }
4172
4372
  tiptap.view.dispatch(tr.scrollIntoView());
@@ -4205,12 +4405,12 @@ import {
4205
4405
  useBlockNoteEditor,
4206
4406
  useSelectedBlocks
4207
4407
  } from "@blocknote/react";
4208
- import { jsx as jsx19 } from "react/jsx-runtime";
4408
+ import { jsx as jsx18 } from "react/jsx-runtime";
4209
4409
  var icons = {
4210
- left: /* @__PURE__ */ jsx19("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", width: "18", height: "18", children: /* @__PURE__ */ jsx19("path", { d: "M15 15H3v2h12v-2zm0-8H3v2h12V7zM3 13h18v-2H3v2zm0 8h18v-2H3v2zM3 3v2h18V3H3z" }) }),
4211
- center: /* @__PURE__ */ jsx19("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", width: "18", height: "18", children: /* @__PURE__ */ jsx19("path", { d: "M7 15v2h10v-2H7zm-4 6h18v-2H3v2zm0-8h18v-2H3v2zm4-6v2h10V7H7zM3 3v2h18V3H3z" }) }),
4212
- right: /* @__PURE__ */ jsx19("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", width: "18", height: "18", children: /* @__PURE__ */ jsx19("path", { d: "M3 21h18v-2H3v2zm6-4h12v-2H9v2zm-6-4h18v-2H3v2zm6-4h12V7H9v2zM3 3v2h18V3H3z" }) }),
4213
- justify: /* @__PURE__ */ jsx19("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", width: "18", height: "18", children: /* @__PURE__ */ jsx19("path", { d: "M3 21h18v-2H3v2zm0-4h18v-2H3v2zm0-4h18v-2H3v2zm0-4h18V7H3v2zM3 3v2h18V3H3z" }) })
4410
+ left: /* @__PURE__ */ jsx18("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", width: "18", height: "18", children: /* @__PURE__ */ jsx18("path", { d: "M15 15H3v2h12v-2zm0-8H3v2h12V7zM3 13h18v-2H3v2zm0 8h18v-2H3v2zM3 3v2h18V3H3z" }) }),
4411
+ center: /* @__PURE__ */ jsx18("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", width: "18", height: "18", children: /* @__PURE__ */ jsx18("path", { d: "M7 15v2h10v-2H7zm-4 6h18v-2H3v2zm0-8h18v-2H3v2zm4-6v2h10V7H7zM3 3v2h18V3H3z" }) }),
4412
+ right: /* @__PURE__ */ jsx18("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", width: "18", height: "18", children: /* @__PURE__ */ jsx18("path", { d: "M3 21h18v-2H3v2zm6-4h12v-2H9v2zm-6-4h18v-2H3v2zm6-4h12V7H9v2zM3 3v2h18V3H3z" }) }),
4413
+ justify: /* @__PURE__ */ jsx18("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", width: "18", height: "18", children: /* @__PURE__ */ jsx18("path", { d: "M3 21h18v-2H3v2zm0-4h18v-2H3v2zm0-4h18v-2H3v2zm0-4h18V7H3v2zM3 3v2h18V3H3z" }) })
4214
4414
  };
4215
4415
  var tooltipMap = {
4216
4416
  left: "\uC67C\uCABD \uC815\uB82C",
@@ -4282,7 +4482,7 @@ var TextAlignButtonWithVA = (props) => {
4282
4482
  if (!show || !editor.isEditable) {
4283
4483
  return null;
4284
4484
  }
4285
- return /* @__PURE__ */ jsx19(
4485
+ return /* @__PURE__ */ jsx18(
4286
4486
  Components.FormattingToolbar.Button,
4287
4487
  {
4288
4488
  className: "bn-button",
@@ -4303,19 +4503,19 @@ import {
4303
4503
  useComponentsContext as useComponentsContext2,
4304
4504
  useSelectedBlocks as useSelectedBlocks2
4305
4505
  } from "@blocknote/react";
4306
- import { jsx as jsx20, jsxs as jsxs12 } from "react/jsx-runtime";
4506
+ import { jsx as jsx19, jsxs as jsxs12 } from "react/jsx-runtime";
4307
4507
  var icons2 = {
4308
4508
  top: /* @__PURE__ */ jsxs12("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: [
4309
- /* @__PURE__ */ jsx20("rect", { x: "2", y: "2", width: "12", height: "12", rx: "1" }),
4310
- /* @__PURE__ */ jsx20("line", { x1: "5", y1: "5", x2: "11", y2: "5" })
4509
+ /* @__PURE__ */ jsx19("rect", { x: "2", y: "2", width: "12", height: "12", rx: "1" }),
4510
+ /* @__PURE__ */ jsx19("line", { x1: "5", y1: "5", x2: "11", y2: "5" })
4311
4511
  ] }),
4312
4512
  middle: /* @__PURE__ */ jsxs12("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: [
4313
- /* @__PURE__ */ jsx20("rect", { x: "2", y: "2", width: "12", height: "12", rx: "1" }),
4314
- /* @__PURE__ */ jsx20("line", { x1: "5", y1: "8", x2: "11", y2: "8" })
4513
+ /* @__PURE__ */ jsx19("rect", { x: "2", y: "2", width: "12", height: "12", rx: "1" }),
4514
+ /* @__PURE__ */ jsx19("line", { x1: "5", y1: "8", x2: "11", y2: "8" })
4315
4515
  ] }),
4316
4516
  bottom: /* @__PURE__ */ jsxs12("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: [
4317
- /* @__PURE__ */ jsx20("rect", { x: "2", y: "2", width: "12", height: "12", rx: "1" }),
4318
- /* @__PURE__ */ jsx20("line", { x1: "5", y1: "11", x2: "11", y2: "11" })
4517
+ /* @__PURE__ */ jsx19("rect", { x: "2", y: "2", width: "12", height: "12", rx: "1" }),
4518
+ /* @__PURE__ */ jsx19("line", { x1: "5", y1: "11", x2: "11", y2: "11" })
4319
4519
  ] })
4320
4520
  };
4321
4521
  var tooltips = {
@@ -4371,7 +4571,7 @@ var VerticalAlignButton = (props) => {
4371
4571
  if (!isInTable || !editor.isEditable) {
4372
4572
  return null;
4373
4573
  }
4374
- return /* @__PURE__ */ jsx20(
4574
+ return /* @__PURE__ */ jsx19(
4375
4575
  Components.FormattingToolbar.Button,
4376
4576
  {
4377
4577
  className: "bn-button",
@@ -4392,22 +4592,22 @@ import {
4392
4592
  useComponentsContext as useComponentsContext3,
4393
4593
  useSelectedBlocks as useSelectedBlocks3
4394
4594
  } from "@blocknote/react";
4395
- import { jsx as jsx21, jsxs as jsxs13 } from "react/jsx-runtime";
4595
+ import { jsx as jsx20, jsxs as jsxs13 } from "react/jsx-runtime";
4396
4596
  var icons3 = {
4397
4597
  left: /* @__PURE__ */ jsxs13("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.4", children: [
4398
- /* @__PURE__ */ jsx21("rect", { x: "1.5", y: "4", width: "7", height: "8", rx: "1", fill: "currentColor", stroke: "none" }),
4399
- /* @__PURE__ */ jsx21("line", { x1: "1.5", y1: "1.5", x2: "14.5", y2: "1.5" }),
4400
- /* @__PURE__ */ jsx21("line", { x1: "1.5", y1: "14.5", x2: "14.5", y2: "14.5" })
4598
+ /* @__PURE__ */ jsx20("rect", { x: "1.5", y: "4", width: "7", height: "8", rx: "1", fill: "currentColor", stroke: "none" }),
4599
+ /* @__PURE__ */ jsx20("line", { x1: "1.5", y1: "1.5", x2: "14.5", y2: "1.5" }),
4600
+ /* @__PURE__ */ jsx20("line", { x1: "1.5", y1: "14.5", x2: "14.5", y2: "14.5" })
4401
4601
  ] }),
4402
4602
  center: /* @__PURE__ */ jsxs13("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.4", children: [
4403
- /* @__PURE__ */ jsx21("rect", { x: "4.5", y: "4", width: "7", height: "8", rx: "1", fill: "currentColor", stroke: "none" }),
4404
- /* @__PURE__ */ jsx21("line", { x1: "1.5", y1: "1.5", x2: "14.5", y2: "1.5" }),
4405
- /* @__PURE__ */ jsx21("line", { x1: "1.5", y1: "14.5", x2: "14.5", y2: "14.5" })
4603
+ /* @__PURE__ */ jsx20("rect", { x: "4.5", y: "4", width: "7", height: "8", rx: "1", fill: "currentColor", stroke: "none" }),
4604
+ /* @__PURE__ */ jsx20("line", { x1: "1.5", y1: "1.5", x2: "14.5", y2: "1.5" }),
4605
+ /* @__PURE__ */ jsx20("line", { x1: "1.5", y1: "14.5", x2: "14.5", y2: "14.5" })
4406
4606
  ] }),
4407
4607
  right: /* @__PURE__ */ jsxs13("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.4", children: [
4408
- /* @__PURE__ */ jsx21("rect", { x: "7.5", y: "4", width: "7", height: "8", rx: "1", fill: "currentColor", stroke: "none" }),
4409
- /* @__PURE__ */ jsx21("line", { x1: "1.5", y1: "1.5", x2: "14.5", y2: "1.5" }),
4410
- /* @__PURE__ */ jsx21("line", { x1: "1.5", y1: "14.5", x2: "14.5", y2: "14.5" })
4608
+ /* @__PURE__ */ jsx20("rect", { x: "7.5", y: "4", width: "7", height: "8", rx: "1", fill: "currentColor", stroke: "none" }),
4609
+ /* @__PURE__ */ jsx20("line", { x1: "1.5", y1: "1.5", x2: "14.5", y2: "1.5" }),
4610
+ /* @__PURE__ */ jsx20("line", { x1: "1.5", y1: "14.5", x2: "14.5", y2: "14.5" })
4411
4611
  ] })
4412
4612
  };
4413
4613
  var tooltips2 = {
@@ -4435,7 +4635,7 @@ var TableAlignButton = (props) => {
4435
4635
  if (!tableBlock || !editor.isEditable) {
4436
4636
  return null;
4437
4637
  }
4438
- return /* @__PURE__ */ jsx21(
4638
+ return /* @__PURE__ */ jsx20(
4439
4639
  Components.FormattingToolbar.Button,
4440
4640
  {
4441
4641
  className: "bn-button",
@@ -4456,12 +4656,12 @@ import {
4456
4656
  useEditorContentOrSelectionChange,
4457
4657
  useSelectedBlocks as useSelectedBlocks4
4458
4658
  } from "@blocknote/react";
4459
- import { useCallback as useCallback18, useMemo as useMemo4, useState as useState9 } from "react";
4460
- import { jsx as jsx22, jsxs as jsxs14 } from "react/jsx-runtime";
4659
+ import { useCallback as useCallback18, useEffect as useEffect9, useMemo as useMemo4, useState as useState9 } from "react";
4660
+ import { jsx as jsx21, jsxs as jsxs14 } from "react/jsx-runtime";
4461
4661
  var DEFAULT_LABEL2 = "\uAE30\uBCF8";
4462
4662
  var toLabel2 = (size) => size.replace(/px$/, "");
4463
4663
  function FontSizeIcon({ size }) {
4464
- return /* @__PURE__ */ jsx22(
4664
+ return /* @__PURE__ */ jsx21(
4465
4665
  "span",
4466
4666
  {
4467
4667
  style: {
@@ -4483,13 +4683,18 @@ function FontSizeButton2() {
4483
4683
  const fontSizeInSchema = styleSchema.fontSize?.type === "fontSize" && styleSchema.fontSize?.propSchema === "string";
4484
4684
  const selectedBlocks = useSelectedBlocks4(editor);
4485
4685
  const [currentSize, setCurrentSize] = useState9(
4486
- fontSizeInSchema ? ed.getActiveStyles().fontSize || "" : ""
4686
+ fontSizeInSchema ? readSelectionFontSize(editor) : ""
4487
4687
  );
4488
4688
  useEditorContentOrSelectionChange(() => {
4489
4689
  if (fontSizeInSchema) {
4490
- setCurrentSize(ed.getActiveStyles().fontSize || "");
4690
+ setCurrentSize(readSelectionFontSize(editor));
4491
4691
  }
4492
4692
  }, editor);
4693
+ const currentPx = parseFontSizePx(currentSize);
4694
+ const [inputValue, setInputValue] = useState9(String(currentPx));
4695
+ useEffect9(() => {
4696
+ setInputValue(String(currentPx));
4697
+ }, [currentPx]);
4493
4698
  const setFontSize = useCallback18(
4494
4699
  (size) => {
4495
4700
  size === "" ? ed.removeStyles({ fontSize: "" }) : ed.addStyles({ fontSize: size });
@@ -4498,6 +4703,25 @@ function FontSizeButton2() {
4498
4703
  // eslint-disable-next-line react-hooks/exhaustive-deps
4499
4704
  [editor]
4500
4705
  );
4706
+ const stepBy = useCallback18(
4707
+ (delta) => {
4708
+ const value = toFontSizeValue(currentPx + delta);
4709
+ ed.addStyles({ fontSize: value });
4710
+ setCurrentSize(value);
4711
+ },
4712
+ // eslint-disable-next-line react-hooks/exhaustive-deps
4713
+ [currentPx]
4714
+ );
4715
+ const applyInput = useCallback18(() => {
4716
+ const n = parseInt(inputValue, 10);
4717
+ if (Number.isFinite(n)) {
4718
+ const value = toFontSizeValue(n);
4719
+ ed.addStyles({ fontSize: value });
4720
+ setCurrentSize(value);
4721
+ } else {
4722
+ setInputValue(String(currentPx));
4723
+ }
4724
+ }, [inputValue, currentPx]);
4501
4725
  const show = useMemo4(() => {
4502
4726
  if (!fontSizeInSchema) {
4503
4727
  return false;
@@ -4513,20 +4737,76 @@ function FontSizeButton2() {
4513
4737
  return null;
4514
4738
  }
4515
4739
  const tooltip = "\uAE00\uC790 \uD06C\uAE30";
4740
+ const preventBlur = (e) => e.preventDefault();
4516
4741
  return /* @__PURE__ */ jsxs14(Components.Generic.Menu.Root, { children: [
4517
- /* @__PURE__ */ jsx22(Components.Generic.Menu.Trigger, { children: /* @__PURE__ */ jsx22(
4742
+ /* @__PURE__ */ jsx21(Components.Generic.Menu.Trigger, { children: /* @__PURE__ */ jsx21(
4518
4743
  Components.FormattingToolbar.Button,
4519
4744
  {
4520
4745
  className: "bn-button",
4521
4746
  "data-test": "font-size",
4522
4747
  label: tooltip,
4523
4748
  mainTooltip: tooltip,
4524
- icon: /* @__PURE__ */ jsx22(FontSizeIcon, { size: currentSize })
4749
+ icon: /* @__PURE__ */ jsx21(FontSizeIcon, { size: currentSize })
4525
4750
  }
4526
4751
  ) }),
4527
4752
  /* @__PURE__ */ jsxs14(Components.Generic.Menu.Dropdown, { className: "bn-menu-dropdown", children: [
4528
- /* @__PURE__ */ jsx22(Components.Generic.Menu.Label, { children: "\uAE00\uC790 \uD06C\uAE30" }),
4529
- /* @__PURE__ */ jsx22(
4753
+ /* @__PURE__ */ jsx21(Components.Generic.Menu.Label, { children: "\uAE00\uC790 \uD06C\uAE30" }),
4754
+ /* @__PURE__ */ jsxs14("div", { className: "lumir-fs-stepper", children: [
4755
+ /* @__PURE__ */ jsx21(
4756
+ "button",
4757
+ {
4758
+ type: "button",
4759
+ className: "lumir-fs-stepper-btn",
4760
+ "aria-label": "\uAE00\uC790 \uD06C\uAE30 1px \uC904\uC774\uAE30",
4761
+ "data-test": "font-size-decrease",
4762
+ disabled: currentPx <= FONT_SIZE_MIN,
4763
+ onMouseDown: preventBlur,
4764
+ onClick: () => stepBy(-1),
4765
+ children: "\u2212"
4766
+ }
4767
+ ),
4768
+ /* @__PURE__ */ jsx21(
4769
+ "input",
4770
+ {
4771
+ className: "lumir-fs-stepper-input",
4772
+ type: "text",
4773
+ inputMode: "numeric",
4774
+ "aria-label": "\uAE00\uC790 \uD06C\uAE30 \uC785\uB825",
4775
+ "data-test": "font-size-input",
4776
+ value: inputValue,
4777
+ onChange: (e) => setInputValue(e.target.value.replace(/[^0-9]/g, "")),
4778
+ onClick: (e) => e.stopPropagation(),
4779
+ onKeyDown: (e) => {
4780
+ e.stopPropagation();
4781
+ if (e.key === "Enter") {
4782
+ e.preventDefault();
4783
+ applyInput();
4784
+ } else if (e.key === "ArrowUp") {
4785
+ e.preventDefault();
4786
+ stepBy(1);
4787
+ } else if (e.key === "ArrowDown") {
4788
+ e.preventDefault();
4789
+ stepBy(-1);
4790
+ }
4791
+ },
4792
+ onBlur: applyInput
4793
+ }
4794
+ ),
4795
+ /* @__PURE__ */ jsx21(
4796
+ "button",
4797
+ {
4798
+ type: "button",
4799
+ className: "lumir-fs-stepper-btn",
4800
+ "aria-label": "\uAE00\uC790 \uD06C\uAE30 1px \uB298\uB9AC\uAE30",
4801
+ "data-test": "font-size-increase",
4802
+ disabled: currentPx >= FONT_SIZE_MAX,
4803
+ onMouseDown: preventBlur,
4804
+ onClick: () => stepBy(1),
4805
+ children: "+"
4806
+ }
4807
+ )
4808
+ ] }),
4809
+ /* @__PURE__ */ jsx21(
4530
4810
  Components.Generic.Menu.Item,
4531
4811
  {
4532
4812
  onClick: () => setFontSize(""),
@@ -4536,7 +4816,7 @@ function FontSizeButton2() {
4536
4816
  },
4537
4817
  "font-size-default"
4538
4818
  ),
4539
- FONT_SIZE_PRESETS.map((size) => /* @__PURE__ */ jsx22(
4819
+ FONT_SIZE_PRESETS.map((size) => /* @__PURE__ */ jsx21(
4540
4820
  Components.Generic.Menu.Item,
4541
4821
  {
4542
4822
  onClick: () => setFontSize(size),
@@ -4564,7 +4844,7 @@ import {
4564
4844
  useSelectedBlocks as useSelectedBlocks5
4565
4845
  } from "@blocknote/react";
4566
4846
  import { useCallback as useCallback19, useMemo as useMemo5, useRef as useRef10, useState as useState10 } from "react";
4567
- import { Fragment as Fragment5, jsx as jsx23, jsxs as jsxs15 } from "react/jsx-runtime";
4847
+ import { Fragment as Fragment5, jsx as jsx22, jsxs as jsxs15 } from "react/jsx-runtime";
4568
4848
  var COLORS = [
4569
4849
  "default",
4570
4850
  "gray",
@@ -4581,7 +4861,7 @@ function ColorIcon(props) {
4581
4861
  const textColor = props.textColor || "default";
4582
4862
  const backgroundColor = props.backgroundColor || "default";
4583
4863
  const size = props.size || 16;
4584
- return /* @__PURE__ */ jsx23(
4864
+ return /* @__PURE__ */ jsx22(
4585
4865
  "div",
4586
4866
  {
4587
4867
  className: "bn-color-icon",
@@ -4600,7 +4880,7 @@ function ColorIcon(props) {
4600
4880
  );
4601
4881
  }
4602
4882
  function CellFillIcon({ size = 18 }) {
4603
- return /* @__PURE__ */ jsx23(
4883
+ return /* @__PURE__ */ jsx22(
4604
4884
  "svg",
4605
4885
  {
4606
4886
  width: size,
@@ -4609,7 +4889,7 @@ function CellFillIcon({ size = 18 }) {
4609
4889
  fill: "currentColor",
4610
4890
  style: { pointerEvents: "none" },
4611
4891
  "aria-hidden": "true",
4612
- children: /* @__PURE__ */ jsx23("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" })
4892
+ children: /* @__PURE__ */ jsx22("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" })
4613
4893
  }
4614
4894
  );
4615
4895
  }
@@ -4618,8 +4898,8 @@ function LumirColorPicker(props) {
4618
4898
  const dict = useDictionary();
4619
4899
  return /* @__PURE__ */ jsxs15(Fragment5, { children: [
4620
4900
  props.text ? /* @__PURE__ */ jsxs15(Fragment5, { children: [
4621
- /* @__PURE__ */ jsx23(Components.Generic.Menu.Label, { children: props.textTitle ?? dict.color_picker.text_title }),
4622
- COLORS.map((color) => /* @__PURE__ */ jsx23(
4901
+ /* @__PURE__ */ jsx22(Components.Generic.Menu.Label, { children: props.textTitle ?? dict.color_picker.text_title }),
4902
+ COLORS.map((color) => /* @__PURE__ */ jsx22(
4623
4903
  Components.Generic.Menu.Item,
4624
4904
  {
4625
4905
  onClick: () => {
@@ -4627,7 +4907,7 @@ function LumirColorPicker(props) {
4627
4907
  props.text.setColor(color);
4628
4908
  },
4629
4909
  "data-test": "text-color-" + color,
4630
- icon: /* @__PURE__ */ jsx23(ColorIcon, { textColor: color, size: props.iconSize }),
4910
+ icon: /* @__PURE__ */ jsx22(ColorIcon, { textColor: color, size: props.iconSize }),
4631
4911
  checked: props.text.color === color,
4632
4912
  children: dict.color_picker.colors[color]
4633
4913
  },
@@ -4635,8 +4915,8 @@ function LumirColorPicker(props) {
4635
4915
  ))
4636
4916
  ] }) : null,
4637
4917
  props.background ? /* @__PURE__ */ jsxs15(Fragment5, { children: [
4638
- /* @__PURE__ */ jsx23(Components.Generic.Menu.Label, { children: props.backgroundTitle ?? dict.color_picker.background_title }),
4639
- COLORS.map((color) => /* @__PURE__ */ jsx23(
4918
+ /* @__PURE__ */ jsx22(Components.Generic.Menu.Label, { children: props.backgroundTitle ?? dict.color_picker.background_title }),
4919
+ COLORS.map((color) => /* @__PURE__ */ jsx22(
4640
4920
  Components.Generic.Menu.Item,
4641
4921
  {
4642
4922
  onClick: () => {
@@ -4644,7 +4924,7 @@ function LumirColorPicker(props) {
4644
4924
  props.background.setColor(color);
4645
4925
  },
4646
4926
  "data-test": "background-color-" + color,
4647
- icon: /* @__PURE__ */ jsx23(ColorIcon, { backgroundColor: color, size: props.iconSize }),
4927
+ icon: /* @__PURE__ */ jsx22(ColorIcon, { backgroundColor: color, size: props.iconSize }),
4648
4928
  checked: props.background.color === color,
4649
4929
  children: dict.color_picker.colors[color]
4650
4930
  },
@@ -4708,14 +4988,14 @@ function LumirColorStyleButton() {
4708
4988
  }
4709
4989
  const tooltip = "\uD14D\uC2A4\uD2B8 \uC0C9\xB7\uBC30\uACBD";
4710
4990
  return /* @__PURE__ */ jsxs15(Components.Generic.Menu.Root, { children: [
4711
- /* @__PURE__ */ jsx23(Components.Generic.Menu.Trigger, { children: /* @__PURE__ */ jsx23(
4991
+ /* @__PURE__ */ jsx22(Components.Generic.Menu.Trigger, { children: /* @__PURE__ */ jsx22(
4712
4992
  Components.FormattingToolbar.Button,
4713
4993
  {
4714
4994
  className: "bn-button",
4715
4995
  "data-test": "colors",
4716
4996
  label: tooltip,
4717
4997
  mainTooltip: tooltip,
4718
- icon: /* @__PURE__ */ jsx23(
4998
+ icon: /* @__PURE__ */ jsx22(
4719
4999
  ColorIcon,
4720
5000
  {
4721
5001
  textColor: currentTextColor,
@@ -4725,11 +5005,11 @@ function LumirColorStyleButton() {
4725
5005
  )
4726
5006
  }
4727
5007
  ) }),
4728
- /* @__PURE__ */ jsx23(
5008
+ /* @__PURE__ */ jsx22(
4729
5009
  Components.Generic.Menu.Dropdown,
4730
5010
  {
4731
5011
  className: "bn-menu-dropdown bn-color-picker-dropdown",
4732
- children: /* @__PURE__ */ jsx23(
5012
+ children: /* @__PURE__ */ jsx22(
4733
5013
  LumirColorPicker,
4734
5014
  {
4735
5015
  textTitle: "\uD14D\uC2A4\uD2B8 \uC0C9",
@@ -4776,21 +5056,21 @@ function LumirCellColorToolbarButton() {
4776
5056
  }
4777
5057
  },
4778
5058
  children: [
4779
- /* @__PURE__ */ jsx23(Components.Generic.Menu.Trigger, { children: /* @__PURE__ */ jsx23(
5059
+ /* @__PURE__ */ jsx22(Components.Generic.Menu.Trigger, { children: /* @__PURE__ */ jsx22(
4780
5060
  Components.FormattingToolbar.Button,
4781
5061
  {
4782
5062
  className: "bn-button",
4783
5063
  "data-test": "cell-colors",
4784
5064
  label: tooltip,
4785
5065
  mainTooltip: tooltip,
4786
- icon: /* @__PURE__ */ jsx23(CellFillIcon, { size: 18 })
5066
+ icon: /* @__PURE__ */ jsx22(CellFillIcon, { size: 18 })
4787
5067
  }
4788
5068
  ) }),
4789
- /* @__PURE__ */ jsx23(
5069
+ /* @__PURE__ */ jsx22(
4790
5070
  Components.Generic.Menu.Dropdown,
4791
5071
  {
4792
5072
  className: "bn-menu-dropdown bn-color-picker-dropdown",
4793
- children: /* @__PURE__ */ jsx23(
5073
+ children: /* @__PURE__ */ jsx22(
4794
5074
  LumirColorPicker,
4795
5075
  {
4796
5076
  backgroundTitle: "\uC140 \uBC30\uACBD",
@@ -4827,13 +5107,13 @@ function LumirCellColorPickerButton(props) {
4827
5107
  return null;
4828
5108
  }
4829
5109
  return /* @__PURE__ */ jsxs15(Components.Generic.Menu.Root, { position: "right", sub: true, children: [
4830
- /* @__PURE__ */ jsx23(Components.Generic.Menu.Trigger, { sub: true, children: /* @__PURE__ */ jsx23(Components.Generic.Menu.Item, { className: "bn-menu-item", subTrigger: true, children: "\uC140 \uC0C9\xB7\uBC30\uACBD" }) }),
4831
- /* @__PURE__ */ jsx23(
5110
+ /* @__PURE__ */ jsx22(Components.Generic.Menu.Trigger, { sub: true, children: /* @__PURE__ */ jsx22(Components.Generic.Menu.Item, { className: "bn-menu-item", subTrigger: true, children: "\uC140 \uC0C9\xB7\uBC30\uACBD" }) }),
5111
+ /* @__PURE__ */ jsx22(
4832
5112
  Components.Generic.Menu.Dropdown,
4833
5113
  {
4834
5114
  sub: true,
4835
5115
  className: "bn-menu-dropdown bn-color-picker-dropdown",
4836
- children: /* @__PURE__ */ jsx23(
5116
+ children: /* @__PURE__ */ jsx22(
4837
5117
  LumirColorPicker,
4838
5118
  {
4839
5119
  iconSize: 18,
@@ -4855,12 +5135,12 @@ function LumirCellColorPickerButton(props) {
4855
5135
  }
4856
5136
  function LumirTableCellMenu(props) {
4857
5137
  const Components = useComponentsContext5();
4858
- return /* @__PURE__ */ jsx23(
5138
+ return /* @__PURE__ */ jsx22(
4859
5139
  Components.Generic.Menu.Dropdown,
4860
5140
  {
4861
5141
  className: "bn-menu-dropdown bn-drag-handle-menu",
4862
5142
  children: props.children || /* @__PURE__ */ jsxs15(Fragment5, { children: [
4863
- /* @__PURE__ */ jsx23(
5143
+ /* @__PURE__ */ jsx22(
4864
5144
  SplitButton,
4865
5145
  {
4866
5146
  block: props.block,
@@ -4868,7 +5148,7 @@ function LumirTableCellMenu(props) {
4868
5148
  colIndex: props.colIndex
4869
5149
  }
4870
5150
  ),
4871
- /* @__PURE__ */ jsx23(
5151
+ /* @__PURE__ */ jsx22(
4872
5152
  LumirCellColorPickerButton,
4873
5153
  {
4874
5154
  block: props.block,
@@ -4882,78 +5162,78 @@ function LumirTableCellMenu(props) {
4882
5162
  }
4883
5163
 
4884
5164
  // src/components/CustomFormattingToolbar.tsx
4885
- import { jsx as jsx24, jsxs as jsxs16 } from "react/jsx-runtime";
5165
+ import { jsx as jsx23, jsxs as jsxs16 } from "react/jsx-runtime";
4886
5166
  var CustomFormattingToolbar = () => {
4887
5167
  return /* @__PURE__ */ jsxs16(FormattingToolbar, { children: [
4888
- /* @__PURE__ */ jsx24(BlockTypeSelect2, {}, "blockTypeSelect"),
4889
- /* @__PURE__ */ jsx24(TableCellMergeButton, {}, "tableCellMergeButton"),
4890
- /* @__PURE__ */ jsx24(FileCaptionButton, {}, "fileCaptionButton"),
4891
- /* @__PURE__ */ jsx24(FileReplaceButton, {}, "replaceFileButton"),
4892
- /* @__PURE__ */ jsx24(FileRenameButton, {}, "fileRenameButton"),
4893
- /* @__PURE__ */ jsx24(FileDeleteButton, {}, "fileDeleteButton"),
4894
- /* @__PURE__ */ jsx24(FileDownloadButton, {}, "fileDownloadButton"),
4895
- /* @__PURE__ */ jsx24(FilePreviewButton, {}, "filePreviewButton"),
4896
- /* @__PURE__ */ jsx24(BasicTextStyleButton, { basicTextStyle: "bold" }, "boldStyleButton"),
4897
- /* @__PURE__ */ jsx24(
5168
+ /* @__PURE__ */ jsx23(BlockTypeSelect2, {}, "blockTypeSelect"),
5169
+ /* @__PURE__ */ jsx23(TableCellMergeButton, {}, "tableCellMergeButton"),
5170
+ /* @__PURE__ */ jsx23(FileCaptionButton, {}, "fileCaptionButton"),
5171
+ /* @__PURE__ */ jsx23(FileReplaceButton, {}, "replaceFileButton"),
5172
+ /* @__PURE__ */ jsx23(FileRenameButton, {}, "fileRenameButton"),
5173
+ /* @__PURE__ */ jsx23(FileDeleteButton, {}, "fileDeleteButton"),
5174
+ /* @__PURE__ */ jsx23(FileDownloadButton, {}, "fileDownloadButton"),
5175
+ /* @__PURE__ */ jsx23(FilePreviewButton, {}, "filePreviewButton"),
5176
+ /* @__PURE__ */ jsx23(BasicTextStyleButton, { basicTextStyle: "bold" }, "boldStyleButton"),
5177
+ /* @__PURE__ */ jsx23(
4898
5178
  BasicTextStyleButton,
4899
5179
  {
4900
5180
  basicTextStyle: "italic"
4901
5181
  },
4902
5182
  "italicStyleButton"
4903
5183
  ),
4904
- /* @__PURE__ */ jsx24(
5184
+ /* @__PURE__ */ jsx23(
4905
5185
  BasicTextStyleButton,
4906
5186
  {
4907
5187
  basicTextStyle: "underline"
4908
5188
  },
4909
5189
  "underlineStyleButton"
4910
5190
  ),
4911
- /* @__PURE__ */ jsx24(
5191
+ /* @__PURE__ */ jsx23(
4912
5192
  BasicTextStyleButton,
4913
5193
  {
4914
5194
  basicTextStyle: "strike"
4915
5195
  },
4916
5196
  "strikeStyleButton"
4917
5197
  ),
4918
- /* @__PURE__ */ jsx24(TextAlignButtonWithVA, { textAlignment: "left" }, "textAlignLeftButton"),
4919
- /* @__PURE__ */ jsx24(
5198
+ /* @__PURE__ */ jsx23(TextAlignButtonWithVA, { textAlignment: "left" }, "textAlignLeftButton"),
5199
+ /* @__PURE__ */ jsx23(
4920
5200
  TextAlignButtonWithVA,
4921
5201
  {
4922
5202
  textAlignment: "center"
4923
5203
  },
4924
5204
  "textAlignCenterButton"
4925
5205
  ),
4926
- /* @__PURE__ */ jsx24(TextAlignButtonWithVA, { textAlignment: "right" }, "textAlignRightButton"),
4927
- /* @__PURE__ */ jsx24(
5206
+ /* @__PURE__ */ jsx23(TextAlignButtonWithVA, { textAlignment: "right" }, "textAlignRightButton"),
5207
+ /* @__PURE__ */ jsx23(
4928
5208
  VerticalAlignButton,
4929
5209
  {
4930
5210
  verticalAlignment: "top"
4931
5211
  },
4932
5212
  "verticalAlignTop"
4933
5213
  ),
4934
- /* @__PURE__ */ jsx24(
5214
+ /* @__PURE__ */ jsx23(
4935
5215
  VerticalAlignButton,
4936
5216
  {
4937
5217
  verticalAlignment: "middle"
4938
5218
  },
4939
5219
  "verticalAlignMiddle"
4940
5220
  ),
4941
- /* @__PURE__ */ jsx24(
5221
+ /* @__PURE__ */ jsx23(
4942
5222
  VerticalAlignButton,
4943
5223
  {
4944
5224
  verticalAlignment: "bottom"
4945
5225
  },
4946
5226
  "verticalAlignBottom"
4947
5227
  ),
4948
- /* @__PURE__ */ jsx24(TableAlignButton, { alignment: "left" }, "tableAlignLeft"),
4949
- /* @__PURE__ */ jsx24(TableAlignButton, { alignment: "center" }, "tableAlignCenter"),
4950
- /* @__PURE__ */ jsx24(TableAlignButton, { alignment: "right" }, "tableAlignRight"),
4951
- /* @__PURE__ */ jsx24(FontSizeButton2, {}, "fontSizeButton"),
4952
- /* @__PURE__ */ jsx24(LumirColorStyleButton, {}, "colorStyleButton"),
4953
- /* @__PURE__ */ jsx24(LumirCellColorToolbarButton, {}, "cellColorButton"),
4954
- /* @__PURE__ */ jsx24(NestBlockButton, {}, "nestBlockButton"),
4955
- /* @__PURE__ */ jsx24(UnnestBlockButton, {}, "unnestBlockButton"),
4956
- /* @__PURE__ */ jsx24(CreateLinkButton, {}, "createLinkButton")
5228
+ /* @__PURE__ */ jsx23(TableAlignButton, { alignment: "left" }, "tableAlignLeft"),
5229
+ /* @__PURE__ */ jsx23(TableAlignButton, { alignment: "center" }, "tableAlignCenter"),
5230
+ /* @__PURE__ */ jsx23(TableAlignButton, { alignment: "right" }, "tableAlignRight"),
5231
+ /* @__PURE__ */ jsx23(FontSizeButton2, {}, "fontSizeButton"),
5232
+ /* @__PURE__ */ jsx23(LumirColorStyleButton, {}, "colorStyleButton"),
5233
+ /* @__PURE__ */ jsx23(LumirCellColorToolbarButton, {}, "cellColorButton"),
5234
+ /* @__PURE__ */ jsx23(NestBlockButton, {}, "nestBlockButton"),
5235
+ /* @__PURE__ */ jsx23(UnnestBlockButton, {}, "unnestBlockButton"),
5236
+ /* @__PURE__ */ jsx23(CreateLinkButton, {}, "createLinkButton")
4957
5237
  ] });
4958
5238
  };
4959
5239
 
@@ -4968,22 +5248,22 @@ import {
4968
5248
  useBlockNoteEditor as useBlockNoteEditor6,
4969
5249
  useDictionary as useDictionary2
4970
5250
  } from "@blocknote/react";
4971
- import { Fragment as Fragment6, jsx as jsx25, jsxs as jsxs17 } from "react/jsx-runtime";
5251
+ import { Fragment as Fragment6, jsx as jsx24, jsxs as jsxs17 } from "react/jsx-runtime";
4972
5252
  var TABLE_ALIGN_ICONS = {
4973
5253
  left: /* @__PURE__ */ jsxs17("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.4", children: [
4974
- /* @__PURE__ */ jsx25("rect", { x: "1.5", y: "4", width: "7", height: "8", rx: "1", fill: "currentColor", stroke: "none" }),
4975
- /* @__PURE__ */ jsx25("line", { x1: "1.5", y1: "1.5", x2: "14.5", y2: "1.5" }),
4976
- /* @__PURE__ */ jsx25("line", { x1: "1.5", y1: "14.5", x2: "14.5", y2: "14.5" })
5254
+ /* @__PURE__ */ jsx24("rect", { x: "1.5", y: "4", width: "7", height: "8", rx: "1", fill: "currentColor", stroke: "none" }),
5255
+ /* @__PURE__ */ jsx24("line", { x1: "1.5", y1: "1.5", x2: "14.5", y2: "1.5" }),
5256
+ /* @__PURE__ */ jsx24("line", { x1: "1.5", y1: "14.5", x2: "14.5", y2: "14.5" })
4977
5257
  ] }),
4978
5258
  center: /* @__PURE__ */ jsxs17("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.4", children: [
4979
- /* @__PURE__ */ jsx25("rect", { x: "4.5", y: "4", width: "7", height: "8", rx: "1", fill: "currentColor", stroke: "none" }),
4980
- /* @__PURE__ */ jsx25("line", { x1: "1.5", y1: "1.5", x2: "14.5", y2: "1.5" }),
4981
- /* @__PURE__ */ jsx25("line", { x1: "1.5", y1: "14.5", x2: "14.5", y2: "14.5" })
5259
+ /* @__PURE__ */ jsx24("rect", { x: "4.5", y: "4", width: "7", height: "8", rx: "1", fill: "currentColor", stroke: "none" }),
5260
+ /* @__PURE__ */ jsx24("line", { x1: "1.5", y1: "1.5", x2: "14.5", y2: "1.5" }),
5261
+ /* @__PURE__ */ jsx24("line", { x1: "1.5", y1: "14.5", x2: "14.5", y2: "14.5" })
4982
5262
  ] }),
4983
5263
  right: /* @__PURE__ */ jsxs17("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.4", children: [
4984
- /* @__PURE__ */ jsx25("rect", { x: "7.5", y: "4", width: "7", height: "8", rx: "1", fill: "currentColor", stroke: "none" }),
4985
- /* @__PURE__ */ jsx25("line", { x1: "1.5", y1: "1.5", x2: "14.5", y2: "1.5" }),
4986
- /* @__PURE__ */ jsx25("line", { x1: "1.5", y1: "14.5", x2: "14.5", y2: "14.5" })
5264
+ /* @__PURE__ */ jsx24("rect", { x: "7.5", y: "4", width: "7", height: "8", rx: "1", fill: "currentColor", stroke: "none" }),
5265
+ /* @__PURE__ */ jsx24("line", { x1: "1.5", y1: "1.5", x2: "14.5", y2: "1.5" }),
5266
+ /* @__PURE__ */ jsx24("line", { x1: "1.5", y1: "14.5", x2: "14.5", y2: "14.5" })
4987
5267
  ] })
4988
5268
  };
4989
5269
  var TABLE_ALIGN_LABELS = {
@@ -4998,7 +5278,7 @@ function TableAlignmentItems(props) {
4998
5278
  return null;
4999
5279
  }
5000
5280
  const current = getTableAlignment(editor, props.block.id);
5001
- return /* @__PURE__ */ jsx25(Fragment6, { children: ["left", "center", "right"].map((align) => /* @__PURE__ */ jsx25(
5281
+ return /* @__PURE__ */ jsx24(Fragment6, { children: ["left", "center", "right"].map((align) => /* @__PURE__ */ jsx24(
5002
5282
  Components.Generic.Menu.Item,
5003
5283
  {
5004
5284
  icon: TABLE_ALIGN_ICONS[align],
@@ -5015,11 +5295,11 @@ function TableAlignmentItems(props) {
5015
5295
  var LumirDragHandleMenu = (props) => {
5016
5296
  const dict = useDictionary2();
5017
5297
  return /* @__PURE__ */ jsxs17(DragHandleMenu, { ...props, children: [
5018
- /* @__PURE__ */ jsx25(RemoveBlockItem, { ...props, children: dict.drag_handle.delete_menuitem }),
5019
- /* @__PURE__ */ jsx25(BlockColorsItem, { ...props, children: dict.drag_handle.colors_menuitem }),
5020
- /* @__PURE__ */ jsx25(TableRowHeaderItem, { ...props, children: dict.drag_handle.header_row_menuitem }),
5021
- /* @__PURE__ */ jsx25(TableColumnHeaderItem, { ...props, children: dict.drag_handle.header_column_menuitem }),
5022
- /* @__PURE__ */ jsx25(TableAlignmentItems, { block: props.block })
5298
+ /* @__PURE__ */ jsx24(RemoveBlockItem, { ...props, children: dict.drag_handle.delete_menuitem }),
5299
+ /* @__PURE__ */ jsx24(BlockColorsItem, { ...props, children: dict.drag_handle.colors_menuitem }),
5300
+ /* @__PURE__ */ jsx24(TableRowHeaderItem, { ...props, children: dict.drag_handle.header_row_menuitem }),
5301
+ /* @__PURE__ */ jsx24(TableColumnHeaderItem, { ...props, children: dict.drag_handle.header_column_menuitem }),
5302
+ /* @__PURE__ */ jsx24(TableAlignmentItems, { block: props.block })
5023
5303
  ] });
5024
5304
  };
5025
5305
 
@@ -5034,7 +5314,7 @@ import {
5034
5314
  useUIPluginState
5035
5315
  } from "@blocknote/react";
5036
5316
  import { autoUpdate as autoUpdate2, FloatingPortal } from "@floating-ui/react";
5037
- import { useCallback as useCallback20, useEffect as useEffect10, useMemo as useMemo7, useRef as useRef11, useState as useState11 } from "react";
5317
+ import { useCallback as useCallback20, useEffect as useEffect11, useMemo as useMemo7, useRef as useRef11, useState as useState11 } from "react";
5038
5318
 
5039
5319
  // src/components/hooks/useFocusedCellHandlePositioning.ts
5040
5320
  import {
@@ -5043,7 +5323,7 @@ import {
5043
5323
  useFloating,
5044
5324
  useTransitionStyles
5045
5325
  } from "@floating-ui/react";
5046
- import { useEffect as useEffect9, useMemo as useMemo6 } from "react";
5326
+ import { useEffect as useEffect10, useMemo as useMemo6 } from "react";
5047
5327
  function useFocusedCellHandlePositioning(cellEl, tbodyEl, orientation, show) {
5048
5328
  const { refs, floatingStyles, context, update } = useFloating({
5049
5329
  open: show,
@@ -5058,7 +5338,7 @@ function useFocusedCellHandlePositioning(cellEl, tbodyEl, orientation, show) {
5058
5338
  whileElementsMounted: autoUpdate
5059
5339
  });
5060
5340
  const { isMounted, styles } = useTransitionStyles(context);
5061
- useEffect9(() => {
5341
+ useEffect10(() => {
5062
5342
  if (!show || !tbodyEl) {
5063
5343
  return;
5064
5344
  }
@@ -5066,7 +5346,7 @@ function useFocusedCellHandlePositioning(cellEl, tbodyEl, orientation, show) {
5066
5346
  ro.observe(tbodyEl);
5067
5347
  return () => ro.disconnect();
5068
5348
  }, [show, tbodyEl, update]);
5069
- useEffect9(() => {
5349
+ useEffect10(() => {
5070
5350
  if (!cellEl) {
5071
5351
  refs.setReference(null);
5072
5352
  return;
@@ -5111,7 +5391,7 @@ function useTableCornerPositioning(referencePosTable, show) {
5111
5391
  whileElementsMounted: autoUpdate
5112
5392
  });
5113
5393
  const { isMounted, styles } = useTransitionStyles(context);
5114
- useEffect9(() => {
5394
+ useEffect10(() => {
5115
5395
  if (!referencePosTable) {
5116
5396
  refs.setReference(null);
5117
5397
  return;
@@ -5131,7 +5411,7 @@ function useTableCornerPositioning(referencePosTable, show) {
5131
5411
  }
5132
5412
 
5133
5413
  // src/components/LumirTableHandlesController.tsx
5134
- import { Fragment as Fragment7, jsx as jsx26, jsxs as jsxs18 } from "react/jsx-runtime";
5414
+ import { Fragment as Fragment7, jsx as jsx25, jsxs as jsxs18 } from "react/jsx-runtime";
5135
5415
  function syncCoreHoverToFocusedCell(cellEl) {
5136
5416
  const r = cellEl.getBoundingClientRect();
5137
5417
  cellEl.dispatchEvent(
@@ -5153,7 +5433,7 @@ function LumirTableHandlesController() {
5153
5433
  const frozenRef = useRef11(false);
5154
5434
  const menuOpenRef = useRef11(false);
5155
5435
  const draggingRef = useRef11(false);
5156
- useEffect10(() => {
5436
+ useEffect11(() => {
5157
5437
  editor.__lumirActiveTableId = focused?.block?.id ?? null;
5158
5438
  }, [editor, focused]);
5159
5439
  const recompute = useCallback20(() => {
@@ -5205,10 +5485,10 @@ function LumirTableHandlesController() {
5205
5485
  });
5206
5486
  }, [editor]);
5207
5487
  useEditorContentOrSelectionChange3(recompute, editor);
5208
- useEffect10(() => {
5488
+ useEffect11(() => {
5209
5489
  recompute();
5210
5490
  }, [recompute]);
5211
- useEffect10(() => {
5491
+ useEffect11(() => {
5212
5492
  const onUp = () => {
5213
5493
  requestAnimationFrame(() => {
5214
5494
  if (!menuOpenRef.current && !draggingRef.current && frozenRef.current) {
@@ -5220,7 +5500,7 @@ function LumirTableHandlesController() {
5220
5500
  window.addEventListener("pointerup", onUp);
5221
5501
  return () => window.removeEventListener("pointerup", onUp);
5222
5502
  }, [recompute]);
5223
- useEffect10(() => {
5503
+ useEffect11(() => {
5224
5504
  const f = focused;
5225
5505
  if (!f || !overlayEl) {
5226
5506
  return;
@@ -5375,9 +5655,9 @@ function LumirTableHandlesController() {
5375
5655
  [editor, coreState]
5376
5656
  );
5377
5657
  return /* @__PURE__ */ jsxs18(Fragment7, { children: [
5378
- /* @__PURE__ */ jsx26("div", { ref: setMenuContainerRef }),
5658
+ /* @__PURE__ */ jsx25("div", { ref: setMenuContainerRef }),
5379
5659
  th && focused && menuContainerRef && /* @__PURE__ */ jsxs18(FloatingPortal, { root: focused.widgetContainer, children: [
5380
- /* @__PURE__ */ jsx26("div", { ref: setOverlayEl, className: "lumir-tbl-cell-focus" }),
5660
+ /* @__PURE__ */ jsx25("div", { ref: setOverlayEl, className: "lumir-tbl-cell-focus" }),
5381
5661
  colHandle.isMounted && /* @__PURE__ */ jsxs18(
5382
5662
  "div",
5383
5663
  {
@@ -5387,8 +5667,8 @@ function LumirTableHandlesController() {
5387
5667
  onPointerEnter: onGutterPointerEnter,
5388
5668
  onPointerDown: onGutterPointerDown,
5389
5669
  children: [
5390
- /* @__PURE__ */ jsx26("span", { className: "lumir-tbl-gutter" }),
5391
- /* @__PURE__ */ jsx26("div", { className: "lumir-tbl-grip", children: /* @__PURE__ */ jsx26(
5670
+ /* @__PURE__ */ jsx25("span", { className: "lumir-tbl-gutter" }),
5671
+ /* @__PURE__ */ jsx25("div", { className: "lumir-tbl-grip", children: /* @__PURE__ */ jsx25(
5392
5672
  TableHandle,
5393
5673
  {
5394
5674
  editor,
@@ -5416,8 +5696,8 @@ function LumirTableHandlesController() {
5416
5696
  onPointerEnter: onGutterPointerEnter,
5417
5697
  onPointerDown: onGutterPointerDown,
5418
5698
  children: [
5419
- /* @__PURE__ */ jsx26("span", { className: "lumir-tbl-gutter" }),
5420
- /* @__PURE__ */ jsx26("div", { className: "lumir-tbl-grip", children: /* @__PURE__ */ jsx26(
5699
+ /* @__PURE__ */ jsx25("span", { className: "lumir-tbl-gutter" }),
5700
+ /* @__PURE__ */ jsx25("div", { className: "lumir-tbl-grip", children: /* @__PURE__ */ jsx25(
5421
5701
  TableHandle,
5422
5702
  {
5423
5703
  editor,
@@ -5444,8 +5724,8 @@ function LumirTableHandlesController() {
5444
5724
  className: "lumir-tbl-gutter-wrap lumir-tbl-gutter-wrap--cell" + (openMenu === "cell" ? " lumir-tbl-gutter-wrap--active" : ""),
5445
5725
  onPointerDown: onGutterPointerDown,
5446
5726
  children: [
5447
- /* @__PURE__ */ jsx26("span", { className: "lumir-tbl-gutter" }),
5448
- /* @__PURE__ */ jsx26("div", { className: "lumir-tbl-grip", children: /* @__PURE__ */ jsx26(
5727
+ /* @__PURE__ */ jsx25("span", { className: "lumir-tbl-gutter" }),
5728
+ /* @__PURE__ */ jsx25("div", { className: "lumir-tbl-grip", children: /* @__PURE__ */ jsx25(
5449
5729
  TableCellButton,
5450
5730
  {
5451
5731
  editor,
@@ -5463,7 +5743,7 @@ function LumirTableHandlesController() {
5463
5743
  )
5464
5744
  ] }),
5465
5745
  th && coreState?.widgetContainer && /* @__PURE__ */ jsxs18(FloatingPortal, { root: coreState.widgetContainer, children: [
5466
- /* @__PURE__ */ jsx26("div", { ref: addOrRemoveRowsButton.ref, style: addOrRemoveRowsButton.style, children: /* @__PURE__ */ jsx26(
5746
+ /* @__PURE__ */ jsx25("div", { ref: addOrRemoveRowsButton.ref, style: addOrRemoveRowsButton.style, children: /* @__PURE__ */ jsx25(
5467
5747
  ExtendButton,
5468
5748
  {
5469
5749
  editor,
@@ -5473,12 +5753,12 @@ function LumirTableHandlesController() {
5473
5753
  onMouseUp: onEndExtend
5474
5754
  }
5475
5755
  ) }),
5476
- /* @__PURE__ */ jsx26(
5756
+ /* @__PURE__ */ jsx25(
5477
5757
  "div",
5478
5758
  {
5479
5759
  ref: addOrRemoveColumnsButton.ref,
5480
5760
  style: addOrRemoveColumnsButton.style,
5481
- children: /* @__PURE__ */ jsx26(
5761
+ children: /* @__PURE__ */ jsx25(
5482
5762
  ExtendButton,
5483
5763
  {
5484
5764
  editor,
@@ -5490,7 +5770,7 @@ function LumirTableHandlesController() {
5490
5770
  )
5491
5771
  }
5492
5772
  ),
5493
- tableCorner.isMounted && /* @__PURE__ */ jsx26(
5773
+ tableCorner.isMounted && /* @__PURE__ */ jsx25(
5494
5774
  "div",
5495
5775
  {
5496
5776
  ref: tableCorner.ref,
@@ -6243,7 +6523,7 @@ function applyFittedWidthsToNewTables(editor, beforeIds, perTable) {
6243
6523
  }
6244
6524
 
6245
6525
  // src/components/LumirEditor.tsx
6246
- import { Fragment as Fragment8, jsx as jsx27, jsxs as jsxs19 } from "react/jsx-runtime";
6526
+ import { Fragment as Fragment8, jsx as jsx26, jsxs as jsxs19 } from "react/jsx-runtime";
6247
6527
  var DEBUG_LOG = (loc, msg, data) => {
6248
6528
  const p = fetch("http://127.0.0.1:7686/ingest/1f8ee1c5-0cf0-4ae7-91ed-5ea7ed17130a", {
6249
6529
  method: "POST",
@@ -6476,7 +6756,7 @@ var findBlockWithLink = (blocks, targetUrl) => {
6476
6756
  var ConvertToPreviewButton = ({ url }) => {
6477
6757
  const editor = useBlockNoteEditor8();
6478
6758
  const Components = useComponentsContext7();
6479
- return /* @__PURE__ */ jsx27(
6759
+ return /* @__PURE__ */ jsx26(
6480
6760
  Components.LinkToolbar.Button,
6481
6761
  {
6482
6762
  className: "bn-button",
@@ -6496,9 +6776,9 @@ var ConvertToPreviewButton = ({ url }) => {
6496
6776
  }
6497
6777
  },
6498
6778
  icon: /* @__PURE__ */ jsxs19("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
6499
- /* @__PURE__ */ jsx27("rect", { x: "1", y: "3", width: "14", height: "10", rx: "2", stroke: "currentColor", strokeWidth: "1.5", fill: "none" }),
6500
- /* @__PURE__ */ jsx27("line", { x1: "1", y1: "9", x2: "15", y2: "9", stroke: "currentColor", strokeWidth: "1.5" }),
6501
- /* @__PURE__ */ jsx27("circle", { cx: "5", cy: "6.5", r: "1.5", stroke: "currentColor", strokeWidth: "1", fill: "none" })
6779
+ /* @__PURE__ */ jsx26("rect", { x: "1", y: "3", width: "14", height: "10", rx: "2", stroke: "currentColor", strokeWidth: "1.5", fill: "none" }),
6780
+ /* @__PURE__ */ jsx26("line", { x1: "1", y1: "9", x2: "15", y2: "9", stroke: "currentColor", strokeWidth: "1.5" }),
6781
+ /* @__PURE__ */ jsx26("circle", { cx: "5", cy: "6.5", r: "1.5", stroke: "currentColor", strokeWidth: "1", fill: "none" })
6502
6782
  ] })
6503
6783
  }
6504
6784
  );
@@ -6514,10 +6794,10 @@ var CustomLinkToolbar = (props) => {
6514
6794
  onMouseEnter: props.stopHideTimer,
6515
6795
  onMouseLeave: props.startHideTimer,
6516
6796
  children: [
6517
- /* @__PURE__ */ jsx27(EditLinkButton, { url: props.url, text: props.text, editLink: props.editLink }),
6518
- /* @__PURE__ */ jsx27(OpenLinkButton, { url: props.url }),
6519
- /* @__PURE__ */ jsx27(DeleteLinkButton, { deleteLink: props.deleteLink }),
6520
- hasLinkPreview && /* @__PURE__ */ jsx27(ConvertToPreviewButton, { url: props.url })
6797
+ /* @__PURE__ */ jsx26(EditLinkButton, { url: props.url, text: props.text, editLink: props.editLink }),
6798
+ /* @__PURE__ */ jsx26(OpenLinkButton, { url: props.url }),
6799
+ /* @__PURE__ */ jsx26(DeleteLinkButton, { deleteLink: props.deleteLink }),
6800
+ hasLinkPreview && /* @__PURE__ */ jsx26(ConvertToPreviewButton, { url: props.url })
6521
6801
  ]
6522
6802
  }
6523
6803
  );
@@ -6600,7 +6880,7 @@ function LumirEditor({
6600
6880
  allowFileUpload
6601
6881
  );
6602
6882
  }, [disableExtensions, allowVideoUpload, allowAudioUpload, allowFileUpload]);
6603
- useEffect11(() => {
6883
+ useEffect12(() => {
6604
6884
  DEBUG_LOG("LumirEditor:init:disabledExtensions", "snapshot", {
6605
6885
  allowVideoUpload,
6606
6886
  hasVideoInDisabled: disabledExtensions.includes("video"),
@@ -6608,7 +6888,7 @@ function LumirEditor({
6608
6888
  });
6609
6889
  }, [allowVideoUpload, disabledExtensions]);
6610
6890
  const fileNameTransformRef = useRef12(s3Upload?.fileNameTransform);
6611
- useEffect11(() => {
6891
+ useEffect12(() => {
6612
6892
  fileNameTransformRef.current = s3Upload?.fileNameTransform;
6613
6893
  }, [s3Upload?.fileNameTransform]);
6614
6894
  const memoizedS3Upload = useMemo8(() => {
@@ -6670,7 +6950,9 @@ function LumirEditor({
6670
6950
  // 표 블록 정렬(좌/가운데/우) attr.
6671
6951
  TableAlignmentExtension,
6672
6952
  // 셀 포커스 시 Ctrl/Cmd+A → 표 전체 선택.
6673
- TableSelectAllExtension
6953
+ TableSelectAllExtension,
6954
+ // blur 상태(툴바 드롭다운 조작 등)에서도 텍스트 선택 하이라이트 유지.
6955
+ InactiveSelectionExtension
6674
6956
  ]
6675
6957
  },
6676
6958
  placeholders: placeholder ? { default: placeholder, emptyDocument: placeholder } : void 0,
@@ -6871,12 +7153,12 @@ function LumirEditor({
6871
7153
  } catch {
6872
7154
  }
6873
7155
  }
6874
- useEffect11(() => {
7156
+ useEffect12(() => {
6875
7157
  if (editor) {
6876
7158
  editor.isEditable = editable;
6877
7159
  }
6878
7160
  }, [editor, editable]);
6879
- useEffect11(() => {
7161
+ useEffect12(() => {
6880
7162
  if (!editor) return;
6881
7163
  const th = editor.tableHandles;
6882
7164
  if (!th || th.__lumirColDelPatched || typeof th.removeRowOrColumn !== "function")
@@ -6888,7 +7170,7 @@ function LumirEditor({
6888
7170
  };
6889
7171
  th.__lumirColDelPatched = true;
6890
7172
  }, [editor]);
6891
- useEffect11(() => {
7173
+ useEffect12(() => {
6892
7174
  if (!editor || !floatingMenu) return;
6893
7175
  const ft = editor.formattingToolbar;
6894
7176
  if (!ft?.onUpdate) return;
@@ -6901,7 +7183,7 @@ function LumirEditor({
6901
7183
  });
6902
7184
  return unsubscribe;
6903
7185
  }, [editor, floatingMenu]);
6904
- useEffect11(() => {
7186
+ useEffect12(() => {
6905
7187
  if (!editor || !onContentChange) return;
6906
7188
  const handleContentChange = () => {
6907
7189
  const blocks = editor.topLevelBlocks;
@@ -6919,12 +7201,12 @@ function LumirEditor({
6919
7201
  return editor.onEditorContentChange(handleContentChange);
6920
7202
  }, [editor, onContentChange]);
6921
7203
  const previousMediaUrlsRef = useRef12(/* @__PURE__ */ new Set());
6922
- useEffect11(() => {
7204
+ useEffect12(() => {
6923
7205
  if (!editor) return;
6924
7206
  const initialBlocks = editor.topLevelBlocks;
6925
7207
  previousMediaUrlsRef.current = extractMediaUrls(initialBlocks);
6926
7208
  }, [editor]);
6927
- useEffect11(() => {
7209
+ useEffect12(() => {
6928
7210
  if (!editor || !onImageDelete) return;
6929
7211
  const handleMediaDeleteCheck = () => {
6930
7212
  const currentBlocks = editor.topLevelBlocks;
@@ -6938,7 +7220,7 @@ function LumirEditor({
6938
7220
  };
6939
7221
  return editor.onEditorContentChange(handleMediaDeleteCheck);
6940
7222
  }, [editor, onImageDelete]);
6941
- useEffect11(() => {
7223
+ useEffect12(() => {
6942
7224
  const el = editor?.domElement;
6943
7225
  if (!el) return;
6944
7226
  const handleDragOver = (e) => {
@@ -7073,7 +7355,7 @@ function LumirEditor({
7073
7355
  return sideMenuAddButton ? sideMenu : false;
7074
7356
  }, [sideMenuAddButton, sideMenu]);
7075
7357
  const DragHandleOnlySideMenu = useMemo8(() => {
7076
- return (props) => /* @__PURE__ */ jsx27(BlockSideMenu, { ...props, children: /* @__PURE__ */ jsx27(DragHandleButton, { ...props, dragHandleMenu: LumirDragHandleMenu }) });
7358
+ return (props) => /* @__PURE__ */ jsx26(BlockSideMenu, { ...props, children: /* @__PURE__ */ jsx26(DragHandleButton, { ...props, dragHandleMenu: LumirDragHandleMenu }) });
7077
7359
  }, []);
7078
7360
  return /* @__PURE__ */ jsxs19(
7079
7361
  "div",
@@ -7086,7 +7368,7 @@ function LumirEditor({
7086
7368
  style: { position: "relative", display: "flex", flexDirection: "column" },
7087
7369
  children: [
7088
7370
  floatingMenu && editor && /* @__PURE__ */ jsxs19(Fragment8, { children: [
7089
- /* @__PURE__ */ jsx27(
7371
+ /* @__PURE__ */ jsx26(
7090
7372
  "input",
7091
7373
  {
7092
7374
  ref: floatingMenuFileInputRef,
@@ -7157,7 +7439,7 @@ function LumirEditor({
7157
7439
  }
7158
7440
  }
7159
7441
  ),
7160
- /* @__PURE__ */ jsx27(
7442
+ /* @__PURE__ */ jsx26(
7161
7443
  FloatingMenu,
7162
7444
  {
7163
7445
  editor,
@@ -7204,15 +7486,15 @@ function LumirEditor({
7204
7486
  tableHandles: false,
7205
7487
  onSelectionChange,
7206
7488
  children: [
7207
- tableHandles && /* @__PURE__ */ jsx27(LumirTableHandlesController, {}),
7208
- formattingToolbar && /* @__PURE__ */ jsx27(
7489
+ tableHandles && /* @__PURE__ */ jsx26(LumirTableHandlesController, {}),
7490
+ formattingToolbar && /* @__PURE__ */ jsx26(
7209
7491
  FormattingToolbarController,
7210
7492
  {
7211
7493
  formattingToolbar: CustomFormattingToolbar
7212
7494
  }
7213
7495
  ),
7214
- linkToolbar && (linkPreview?.apiEndpoint ? /* @__PURE__ */ jsx27(LinkToolbarController, { linkToolbar: CustomLinkToolbar }) : /* @__PURE__ */ jsx27(LinkToolbarController, {})),
7215
- /* @__PURE__ */ jsx27(
7496
+ linkToolbar && (linkPreview?.apiEndpoint ? /* @__PURE__ */ jsx26(LinkToolbarController, { linkToolbar: CustomLinkToolbar }) : /* @__PURE__ */ jsx26(LinkToolbarController, {})),
7497
+ /* @__PURE__ */ jsx26(
7216
7498
  SuggestionMenuController,
7217
7499
  {
7218
7500
  triggerCharacter: "/",
@@ -7272,8 +7554,8 @@ function LumirEditor({
7272
7554
  strokeLinecap: "round",
7273
7555
  strokeLinejoin: "round",
7274
7556
  children: [
7275
- /* @__PURE__ */ jsx27("polyline", { points: "16 18 22 12 16 6" }),
7276
- /* @__PURE__ */ jsx27("polyline", { points: "8 6 2 12 8 18" })
7557
+ /* @__PURE__ */ jsx26("polyline", { points: "16 18 22 12 16 6" }),
7558
+ /* @__PURE__ */ jsx26("polyline", { points: "8 6 2 12 8 18" })
7277
7559
  ]
7278
7560
  }
7279
7561
  ),
@@ -7291,9 +7573,9 @@ function LumirEditor({
7291
7573
  strokeLinecap: "round",
7292
7574
  strokeLinejoin: "round",
7293
7575
  children: [
7294
- /* @__PURE__ */ jsx27("rect", { x: "3", y: "4", width: "7", height: "16", rx: "1" }),
7295
- /* @__PURE__ */ jsx27("rect", { x: "14", y: "4", width: "7", height: "16", rx: "1" }),
7296
- withDivider && /* @__PURE__ */ jsx27("line", { x1: "12", y1: "3", x2: "12", y2: "21", strokeDasharray: "2 2" })
7576
+ /* @__PURE__ */ jsx26("rect", { x: "3", y: "4", width: "7", height: "16", rx: "1" }),
7577
+ /* @__PURE__ */ jsx26("rect", { x: "14", y: "4", width: "7", height: "16", rx: "1" }),
7578
+ withDivider && /* @__PURE__ */ jsx26("line", { x1: "12", y1: "3", x2: "12", y2: "21", strokeDasharray: "2 2" })
7297
7579
  ]
7298
7580
  }
7299
7581
  );
@@ -7355,8 +7637,8 @@ function LumirEditor({
7355
7637
  strokeLinecap: "round",
7356
7638
  strokeLinejoin: "round",
7357
7639
  children: [
7358
- /* @__PURE__ */ jsx27("path", { d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71" }),
7359
- /* @__PURE__ */ jsx27("path", { d: "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71" })
7640
+ /* @__PURE__ */ jsx26("path", { d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71" }),
7641
+ /* @__PURE__ */ jsx26("path", { d: "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71" })
7360
7642
  ]
7361
7643
  }
7362
7644
  ),
@@ -7392,21 +7674,21 @@ function LumirEditor({
7392
7674
  )
7393
7675
  }
7394
7676
  ),
7395
- !sideMenuAddButton && /* @__PURE__ */ jsx27(SideMenuController, { sideMenu: DragHandleOnlySideMenu })
7677
+ !sideMenuAddButton && /* @__PURE__ */ jsx26(SideMenuController, { sideMenu: DragHandleOnlySideMenu })
7396
7678
  ]
7397
7679
  }
7398
7680
  ),
7399
7681
  isUploading && /* @__PURE__ */ jsxs19("div", { className: "lumirEditor-upload-overlay", children: [
7400
- /* @__PURE__ */ jsx27("div", { className: "lumirEditor-spinner" }),
7682
+ /* @__PURE__ */ jsx26("div", { className: "lumirEditor-spinner" }),
7401
7683
  uploadProgress !== null && /* @__PURE__ */ jsxs19("span", { className: "lumirEditor-upload-progress", children: [
7402
7684
  uploadProgress,
7403
7685
  "%"
7404
7686
  ] })
7405
7687
  ] }),
7406
7688
  errorMessage && /* @__PURE__ */ jsxs19("div", { className: "lumirEditor-error-toast", children: [
7407
- /* @__PURE__ */ jsx27("span", { className: "lumirEditor-error-icon", children: "\u26A0\uFE0F" }),
7408
- /* @__PURE__ */ jsx27("span", { className: "lumirEditor-error-message", children: errorMessage }),
7409
- /* @__PURE__ */ jsx27(
7689
+ /* @__PURE__ */ jsx26("span", { className: "lumirEditor-error-icon", children: "\u26A0\uFE0F" }),
7690
+ /* @__PURE__ */ jsx26("span", { className: "lumirEditor-error-message", children: errorMessage }),
7691
+ /* @__PURE__ */ jsx26(
7410
7692
  "button",
7411
7693
  {
7412
7694
  className: "lumirEditor-error-close",
@@ -7424,7 +7706,11 @@ export {
7424
7706
  BACKGROUND_COLORS,
7425
7707
  ContentUtils,
7426
7708
  EditorConfig,
7709
+ FONT_SIZE_DEFAULT_PX,
7710
+ FONT_SIZE_MAX,
7711
+ FONT_SIZE_MIN,
7427
7712
  FONT_SIZE_PRESETS,
7713
+ FONT_SIZE_STEP,
7428
7714
  FloatingMenu,
7429
7715
  FontSize,
7430
7716
  FontSizeButton2 as FontSizeButton,
@@ -7434,12 +7720,15 @@ export {
7434
7720
  LumirEditor,
7435
7721
  LumirEditorError,
7436
7722
  TEXT_COLORS,
7723
+ clampFontSizePx,
7437
7724
  clearMetadataCache,
7438
7725
  cn,
7439
7726
  createS3Uploader,
7440
7727
  fetchLinkMetadata,
7441
7728
  getHexFromColorValue,
7442
7729
  liftFontSize,
7443
- lowerFontSize
7730
+ lowerFontSize,
7731
+ parseFontSizePx,
7732
+ toFontSizeValue
7444
7733
  };
7445
7734
  //# sourceMappingURL=index.mjs.map