@lumir-company/editor 0.4.18 → 0.4.19
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/README.md +13 -0
- package/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +274 -19
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +270 -15
- package/dist/index.mjs.map +1 -1
- package/dist/style.css +41 -0
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3412,6 +3412,8 @@ var ALLOWED_VIDEO_EXTENSIONS = [
|
|
|
3412
3412
|
];
|
|
3413
3413
|
var ROW_RESIZE_MIN_HEIGHT = 24;
|
|
3414
3414
|
var ROW_RESIZE_HANDLE_WIDTH = 5;
|
|
3415
|
+
var TABLE_SCALE_MIN_COL_WIDTH = 24;
|
|
3416
|
+
var TABLE_SCALE_MAX = 6;
|
|
3415
3417
|
|
|
3416
3418
|
// src/extensions/rowResizing.ts
|
|
3417
3419
|
var rowResizingPluginKey = new PluginKey3(
|
|
@@ -3690,9 +3692,165 @@ function handleDecorations(state, pluginState) {
|
|
|
3690
3692
|
return DecorationSet2.create(state.doc, decorations);
|
|
3691
3693
|
}
|
|
3692
3694
|
|
|
3693
|
-
// src/extensions/
|
|
3695
|
+
// src/extensions/tableScaling.ts
|
|
3694
3696
|
import { Plugin as Plugin4, PluginKey as PluginKey4 } from "prosemirror-state";
|
|
3695
|
-
|
|
3697
|
+
import { Decoration as Decoration3, DecorationSet as DecorationSet3 } from "prosemirror-view";
|
|
3698
|
+
import { TableMap as TableMap2 } from "prosemirror-tables";
|
|
3699
|
+
var tableScalingPluginKey = new PluginKey4(
|
|
3700
|
+
"lumirTableScaling"
|
|
3701
|
+
);
|
|
3702
|
+
function tableScaling() {
|
|
3703
|
+
return new Plugin4({
|
|
3704
|
+
key: tableScalingPluginKey,
|
|
3705
|
+
state: {
|
|
3706
|
+
init: () => null,
|
|
3707
|
+
apply(tr, prev) {
|
|
3708
|
+
const meta = tr.getMeta(tableScalingPluginKey);
|
|
3709
|
+
if (meta !== void 0) return meta.preview;
|
|
3710
|
+
if (prev && tr.docChanged) {
|
|
3711
|
+
return { ...prev, tablePos: tr.mapping.map(prev.tablePos, -1) };
|
|
3712
|
+
}
|
|
3713
|
+
return prev;
|
|
3714
|
+
}
|
|
3715
|
+
},
|
|
3716
|
+
props: {
|
|
3717
|
+
decorations(state) {
|
|
3718
|
+
const p = tableScalingPluginKey.getState(state);
|
|
3719
|
+
return p ? buildHeightDecorations(state, p) : null;
|
|
3720
|
+
}
|
|
3721
|
+
},
|
|
3722
|
+
view: (view) => ({
|
|
3723
|
+
update: () => {
|
|
3724
|
+
const p = tableScalingPluginKey.getState(view.state);
|
|
3725
|
+
if (p) applyColgroupPreview(view, p);
|
|
3726
|
+
}
|
|
3727
|
+
})
|
|
3728
|
+
});
|
|
3729
|
+
}
|
|
3730
|
+
function setTableScalePreview(view, preview) {
|
|
3731
|
+
view.dispatch(view.state.tr.setMeta(tableScalingPluginKey, { preview }));
|
|
3732
|
+
}
|
|
3733
|
+
function measureTableForScale(view, tablePos) {
|
|
3734
|
+
const tableEl = findTableEl(view.nodeDOM(tablePos));
|
|
3735
|
+
const node = view.state.doc.nodeAt(tablePos);
|
|
3736
|
+
if (!tableEl || !node || node.type.name !== "table") return null;
|
|
3737
|
+
const map = TableMap2.get(node);
|
|
3738
|
+
const rect = tableEl.getBoundingClientRect();
|
|
3739
|
+
const body = tableEl.tBodies[0];
|
|
3740
|
+
const rowHeights = body ? Array.from(body.rows).map((tr) => tr.getBoundingClientRect().height) : [];
|
|
3741
|
+
const colWidths = measureColWidths(tableEl, map.width);
|
|
3742
|
+
if (rowHeights.length !== map.height || colWidths.length !== map.width) {
|
|
3743
|
+
return null;
|
|
3744
|
+
}
|
|
3745
|
+
return {
|
|
3746
|
+
tablePos,
|
|
3747
|
+
colWidths,
|
|
3748
|
+
rowHeights,
|
|
3749
|
+
origW: rect.width,
|
|
3750
|
+
origH: rect.height,
|
|
3751
|
+
scale: 1
|
|
3752
|
+
};
|
|
3753
|
+
}
|
|
3754
|
+
function commitTableScale(view, preview) {
|
|
3755
|
+
const { state } = view;
|
|
3756
|
+
const { tablePos, colWidths, rowHeights, scale } = preview;
|
|
3757
|
+
const table = state.doc.nodeAt(tablePos);
|
|
3758
|
+
if (!table || table.type.name !== "table") return;
|
|
3759
|
+
const map = TableMap2.get(table);
|
|
3760
|
+
const start = tablePos + 1;
|
|
3761
|
+
const tr = state.tr;
|
|
3762
|
+
const seen = /* @__PURE__ */ new Set();
|
|
3763
|
+
for (const relPos of map.map) {
|
|
3764
|
+
if (seen.has(relPos)) continue;
|
|
3765
|
+
seen.add(relPos);
|
|
3766
|
+
const node = table.nodeAt(relPos);
|
|
3767
|
+
if (!node) continue;
|
|
3768
|
+
const rect = map.findCell(relPos);
|
|
3769
|
+
const colwidth = [];
|
|
3770
|
+
for (let c = rect.left; c < rect.right; c++) {
|
|
3771
|
+
colwidth.push(Math.round((colWidths[c] ?? 0) * scale));
|
|
3772
|
+
}
|
|
3773
|
+
let h = 0;
|
|
3774
|
+
for (let r = rect.top; r < rect.bottom; r++) h += rowHeights[r] ?? 0;
|
|
3775
|
+
const rowHeight = Math.round(h * scale);
|
|
3776
|
+
tr.setNodeMarkup(start + relPos, void 0, {
|
|
3777
|
+
...node.attrs,
|
|
3778
|
+
colwidth: colwidth.some((w) => w > 0) ? colwidth : null,
|
|
3779
|
+
rowHeight: rowHeight > 0 ? rowHeight : null
|
|
3780
|
+
});
|
|
3781
|
+
}
|
|
3782
|
+
if (tr.docChanged) view.dispatch(tr);
|
|
3783
|
+
}
|
|
3784
|
+
function measureColWidths(tableEl, width) {
|
|
3785
|
+
const widths = new Array(width).fill(0);
|
|
3786
|
+
const colgroup = tableEl.querySelector("colgroup");
|
|
3787
|
+
if (colgroup && colgroup.children.length === width) {
|
|
3788
|
+
let allSet = true;
|
|
3789
|
+
for (let i = 0; i < width; i++) {
|
|
3790
|
+
const w = parseFloat(colgroup.children[i].style.width);
|
|
3791
|
+
if (Number.isFinite(w) && w > 0) widths[i] = w;
|
|
3792
|
+
else allSet = false;
|
|
3793
|
+
}
|
|
3794
|
+
if (allSet) return widths;
|
|
3795
|
+
}
|
|
3796
|
+
const firstRow = tableEl.tBodies[0]?.rows[0];
|
|
3797
|
+
if (firstRow) {
|
|
3798
|
+
let col = 0;
|
|
3799
|
+
for (const cell of Array.from(firstRow.cells)) {
|
|
3800
|
+
const span = cell.colSpan || 1;
|
|
3801
|
+
const w = cell.getBoundingClientRect().width / span;
|
|
3802
|
+
for (let s = 0; s < span && col < width; s++) widths[col++] = w;
|
|
3803
|
+
}
|
|
3804
|
+
}
|
|
3805
|
+
return widths;
|
|
3806
|
+
}
|
|
3807
|
+
function applyColgroupPreview(view, p) {
|
|
3808
|
+
const tableEl = findTableEl(view.nodeDOM(p.tablePos));
|
|
3809
|
+
const colgroup = tableEl?.querySelector("colgroup");
|
|
3810
|
+
if (!colgroup) return;
|
|
3811
|
+
const cols = colgroup.children;
|
|
3812
|
+
for (let i = 0; i < cols.length && i < p.colWidths.length; i++) {
|
|
3813
|
+
cols[i].style.width = Math.round(p.colWidths[i] * p.scale) + "px";
|
|
3814
|
+
}
|
|
3815
|
+
}
|
|
3816
|
+
function buildHeightDecorations(state, p) {
|
|
3817
|
+
const table = state.doc.nodeAt(p.tablePos);
|
|
3818
|
+
if (!table || table.type.name !== "table") return DecorationSet3.empty;
|
|
3819
|
+
const map = TableMap2.get(table);
|
|
3820
|
+
const start = p.tablePos + 1;
|
|
3821
|
+
const decorations = [];
|
|
3822
|
+
const seen = /* @__PURE__ */ new Set();
|
|
3823
|
+
for (const relPos of map.map) {
|
|
3824
|
+
if (seen.has(relPos)) continue;
|
|
3825
|
+
seen.add(relPos);
|
|
3826
|
+
const node = table.nodeAt(relPos);
|
|
3827
|
+
if (!node) continue;
|
|
3828
|
+
const rect = map.findCell(relPos);
|
|
3829
|
+
let h = 0;
|
|
3830
|
+
for (let r = rect.top; r < rect.bottom; r++) h += p.rowHeights[r] ?? 0;
|
|
3831
|
+
const from = start + relPos;
|
|
3832
|
+
const to = from + node.nodeSize;
|
|
3833
|
+
decorations.push(
|
|
3834
|
+
Decoration3.node(from, to, {
|
|
3835
|
+
class: "lumir-table-scale-dragging",
|
|
3836
|
+
style: `height: ${Math.round(h * p.scale)}px`
|
|
3837
|
+
})
|
|
3838
|
+
);
|
|
3839
|
+
}
|
|
3840
|
+
return DecorationSet3.create(state.doc, decorations);
|
|
3841
|
+
}
|
|
3842
|
+
function findTableEl(dom) {
|
|
3843
|
+
if (!dom) return null;
|
|
3844
|
+
const el = dom;
|
|
3845
|
+
if (el.nodeName === "TABLE") return el;
|
|
3846
|
+
const inner = el.querySelector?.("table");
|
|
3847
|
+
if (inner) return inner;
|
|
3848
|
+
return el.closest?.("table") ?? null;
|
|
3849
|
+
}
|
|
3850
|
+
|
|
3851
|
+
// src/extensions/tableCellAttrPreserve.ts
|
|
3852
|
+
import { Plugin as Plugin5, PluginKey as PluginKey5 } from "prosemirror-state";
|
|
3853
|
+
var tableCellAttrPreserveKey = new PluginKey5(
|
|
3696
3854
|
"lumirTableCellAttrPreserve"
|
|
3697
3855
|
);
|
|
3698
3856
|
var PRESERVED_ATTRS = [
|
|
@@ -3749,7 +3907,7 @@ function collectCellAttrs(doc) {
|
|
|
3749
3907
|
return result;
|
|
3750
3908
|
}
|
|
3751
3909
|
function tableCellAttrPreserve() {
|
|
3752
|
-
return new
|
|
3910
|
+
return new Plugin5({
|
|
3753
3911
|
key: tableCellAttrPreserveKey,
|
|
3754
3912
|
appendTransaction(transactions, oldState, newState) {
|
|
3755
3913
|
if (!transactions.some((tr2) => tr2.docChanged)) {
|
|
@@ -3855,6 +4013,7 @@ var RowHeightExtension = Extension2.create({
|
|
|
3855
4013
|
const plugins = [tableCellAttrPreserve()];
|
|
3856
4014
|
if (this.options.resizable) {
|
|
3857
4015
|
plugins.push(rowResizing());
|
|
4016
|
+
plugins.push(tableScaling());
|
|
3858
4017
|
}
|
|
3859
4018
|
return plugins;
|
|
3860
4019
|
}
|
|
@@ -3862,11 +4021,11 @@ var RowHeightExtension = Extension2.create({
|
|
|
3862
4021
|
|
|
3863
4022
|
// src/extensions/TableAlignmentExtension.ts
|
|
3864
4023
|
import { Extension as Extension3 } from "@tiptap/core";
|
|
3865
|
-
import { Plugin as
|
|
3866
|
-
import { Decoration as
|
|
3867
|
-
var tableAlignmentDecoKey = new
|
|
4024
|
+
import { Plugin as Plugin6, PluginKey as PluginKey6 } from "prosemirror-state";
|
|
4025
|
+
import { Decoration as Decoration4, DecorationSet as DecorationSet4 } from "prosemirror-view";
|
|
4026
|
+
var tableAlignmentDecoKey = new PluginKey6("lumirTableAlignmentDeco");
|
|
3868
4027
|
function tableAlignmentDecorationPlugin() {
|
|
3869
|
-
return new
|
|
4028
|
+
return new Plugin6({
|
|
3870
4029
|
key: tableAlignmentDecoKey,
|
|
3871
4030
|
props: {
|
|
3872
4031
|
decorations(state) {
|
|
@@ -3876,7 +4035,7 @@ function tableAlignmentDecorationPlugin() {
|
|
|
3876
4035
|
const align = node.attrs.tableAlignment;
|
|
3877
4036
|
if (align && align !== "left") {
|
|
3878
4037
|
decorations.push(
|
|
3879
|
-
|
|
4038
|
+
Decoration4.node(pos, pos + node.nodeSize, {
|
|
3880
4039
|
"data-table-alignment": align
|
|
3881
4040
|
})
|
|
3882
4041
|
);
|
|
@@ -3885,7 +4044,7 @@ function tableAlignmentDecorationPlugin() {
|
|
|
3885
4044
|
}
|
|
3886
4045
|
return void 0;
|
|
3887
4046
|
});
|
|
3888
|
-
return
|
|
4047
|
+
return DecorationSet4.create(state.doc, decorations);
|
|
3889
4048
|
}
|
|
3890
4049
|
}
|
|
3891
4050
|
});
|
|
@@ -4830,9 +4989,14 @@ import { useEffect as useEffect9, useMemo as useMemo6 } from "react";
|
|
|
4830
4989
|
function useFocusedCellHandlePositioning(cellEl, tbodyEl, orientation, show) {
|
|
4831
4990
|
const { refs, floatingStyles, context, update } = useFloating({
|
|
4832
4991
|
open: show,
|
|
4833
|
-
placement: orientation === "row" ? "left" : orientation === "col" ? "top" : "right",
|
|
4834
|
-
// col/row
|
|
4835
|
-
|
|
4992
|
+
placement: orientation === "row" ? "left" : orientation === "col" ? "top" : orientation === "corner" ? "bottom-start" : "right",
|
|
4993
|
+
// col/row/cell: 가장자리에 14px hit-area 중앙 정렬(-7).
|
|
4994
|
+
// corner: 18px hit-zone이 표 우하단 모서리에 걸치도록 위/좌로 살짝 당김(모서리 hover 자연).
|
|
4995
|
+
middleware: [
|
|
4996
|
+
offset(
|
|
4997
|
+
orientation === "corner" ? { mainAxis: -6, crossAxis: -6 } : -7
|
|
4998
|
+
)
|
|
4999
|
+
],
|
|
4836
5000
|
whileElementsMounted: autoUpdate
|
|
4837
5001
|
});
|
|
4838
5002
|
const { isMounted, styles } = useTransitionStyles(context);
|
|
@@ -4860,6 +5024,9 @@ function useFocusedCellHandlePositioning(cellEl, tbodyEl, orientation, show) {
|
|
|
4860
5024
|
if (orientation === "row") {
|
|
4861
5025
|
return new DOMRect(t.left, c.top, 0, c.height);
|
|
4862
5026
|
}
|
|
5027
|
+
if (orientation === "corner") {
|
|
5028
|
+
return new DOMRect(t.right, t.bottom, 0, 0);
|
|
5029
|
+
}
|
|
4863
5030
|
return c;
|
|
4864
5031
|
}
|
|
4865
5032
|
});
|
|
@@ -4877,6 +5044,33 @@ function useFocusedCellHandlePositioning(cellEl, tbodyEl, orientation, show) {
|
|
|
4877
5044
|
[floatingStyles, isMounted, refs.setFloating, styles]
|
|
4878
5045
|
);
|
|
4879
5046
|
}
|
|
5047
|
+
function useTableCornerPositioning(referencePosTable, show) {
|
|
5048
|
+
const { refs, floatingStyles, context } = useFloating({
|
|
5049
|
+
open: show,
|
|
5050
|
+
placement: "bottom-start",
|
|
5051
|
+
// 18px hit-zone을 모서리에서 안쪽(위/좌)으로 당겨 표 위에 걸치게 한다.
|
|
5052
|
+
middleware: [offset({ mainAxis: -12, crossAxis: -12 })],
|
|
5053
|
+
whileElementsMounted: autoUpdate
|
|
5054
|
+
});
|
|
5055
|
+
const { isMounted, styles } = useTransitionStyles(context);
|
|
5056
|
+
useEffect9(() => {
|
|
5057
|
+
if (!referencePosTable) {
|
|
5058
|
+
refs.setReference(null);
|
|
5059
|
+
return;
|
|
5060
|
+
}
|
|
5061
|
+
refs.setReference({
|
|
5062
|
+
getBoundingClientRect: () => new DOMRect(referencePosTable.right, referencePosTable.bottom, 0, 0)
|
|
5063
|
+
});
|
|
5064
|
+
}, [referencePosTable, refs]);
|
|
5065
|
+
return useMemo6(
|
|
5066
|
+
() => ({
|
|
5067
|
+
isMounted,
|
|
5068
|
+
ref: refs.setFloating,
|
|
5069
|
+
style: { ...styles, ...floatingStyles }
|
|
5070
|
+
}),
|
|
5071
|
+
[floatingStyles, isMounted, refs.setFloating, styles]
|
|
5072
|
+
);
|
|
5073
|
+
}
|
|
4880
5074
|
|
|
4881
5075
|
// src/components/LumirTableHandlesController.tsx
|
|
4882
5076
|
import { Fragment as Fragment7, jsx as jsx26, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
@@ -5027,6 +5221,10 @@ function LumirTableHandlesController() {
|
|
|
5027
5221
|
const onEndExtend = useCallback20(() => {
|
|
5028
5222
|
editor.tableHandles?.unfreezeHandles();
|
|
5029
5223
|
}, [editor]);
|
|
5224
|
+
const tableCorner = useTableCornerPositioning(
|
|
5225
|
+
coreState?.referencePosTable ?? null,
|
|
5226
|
+
!!coreState?.widgetContainer
|
|
5227
|
+
);
|
|
5030
5228
|
const menuHandlers = useMemo7(() => {
|
|
5031
5229
|
const mk = (kind) => ({
|
|
5032
5230
|
freeze: () => {
|
|
@@ -5076,6 +5274,48 @@ function LumirTableHandlesController() {
|
|
|
5076
5274
|
}, [editor, recompute]);
|
|
5077
5275
|
const noop = useCallback20(() => {
|
|
5078
5276
|
}, []);
|
|
5277
|
+
const onScaleStart = useCallback20(
|
|
5278
|
+
(e) => {
|
|
5279
|
+
e.preventDefault();
|
|
5280
|
+
e.stopPropagation();
|
|
5281
|
+
const view = editor.prosemirrorView;
|
|
5282
|
+
const blockId = coreState?.block?.id;
|
|
5283
|
+
if (!view || !blockId) return;
|
|
5284
|
+
const tablePos = findTableNodePos(editor._tiptapEditor, blockId);
|
|
5285
|
+
if (tablePos < 0) return;
|
|
5286
|
+
const base = measureTableForScale(view, tablePos);
|
|
5287
|
+
if (!base) return;
|
|
5288
|
+
const minScale = Math.max(
|
|
5289
|
+
TABLE_SCALE_MIN_COL_WIDTH / Math.max(1, Math.min(...base.colWidths)),
|
|
5290
|
+
ROW_RESIZE_MIN_HEIGHT / Math.max(1, Math.min(...base.rowHeights))
|
|
5291
|
+
);
|
|
5292
|
+
const startX = e.clientX;
|
|
5293
|
+
const startY = e.clientY;
|
|
5294
|
+
let current = base;
|
|
5295
|
+
editor.tableHandles?.freezeHandles();
|
|
5296
|
+
const onMove = (me) => {
|
|
5297
|
+
if (me.buttons === 0) return onUp();
|
|
5298
|
+
const newW = base.origW + (me.clientX - startX);
|
|
5299
|
+
const newH = base.origH + (me.clientY - startY);
|
|
5300
|
+
const scale = Math.min(
|
|
5301
|
+
TABLE_SCALE_MAX,
|
|
5302
|
+
Math.max(minScale, Math.max(newW / base.origW, newH / base.origH))
|
|
5303
|
+
);
|
|
5304
|
+
current = { ...base, scale };
|
|
5305
|
+
setTableScalePreview(view, current);
|
|
5306
|
+
};
|
|
5307
|
+
const onUp = () => {
|
|
5308
|
+
window.removeEventListener("pointermove", onMove);
|
|
5309
|
+
window.removeEventListener("pointerup", onUp);
|
|
5310
|
+
setTableScalePreview(view, null);
|
|
5311
|
+
commitTableScale(view, current);
|
|
5312
|
+
editor.tableHandles?.unfreezeHandles();
|
|
5313
|
+
};
|
|
5314
|
+
window.addEventListener("pointermove", onMove);
|
|
5315
|
+
window.addEventListener("pointerup", onUp);
|
|
5316
|
+
},
|
|
5317
|
+
[editor, coreState]
|
|
5318
|
+
);
|
|
5079
5319
|
return /* @__PURE__ */ jsxs18(Fragment7, { children: [
|
|
5080
5320
|
/* @__PURE__ */ jsx26("div", { ref: setMenuContainerRef }),
|
|
5081
5321
|
th && focused && menuContainerRef && /* @__PURE__ */ jsxs18(FloatingPortal, { root: focused.widgetContainer, children: [
|
|
@@ -5191,6 +5431,16 @@ function LumirTableHandlesController() {
|
|
|
5191
5431
|
}
|
|
5192
5432
|
)
|
|
5193
5433
|
}
|
|
5434
|
+
),
|
|
5435
|
+
tableCorner.isMounted && /* @__PURE__ */ jsx26(
|
|
5436
|
+
"div",
|
|
5437
|
+
{
|
|
5438
|
+
ref: tableCorner.ref,
|
|
5439
|
+
style: tableCorner.style,
|
|
5440
|
+
className: "lumir-tbl-scale-handle",
|
|
5441
|
+
title: "\uD45C \uD06C\uAE30 \uC870\uC808 (\uC885\uD6A1\uBE44 \uACE0\uC815)",
|
|
5442
|
+
onPointerDown: onScaleStart
|
|
5443
|
+
}
|
|
5194
5444
|
)
|
|
5195
5445
|
] })
|
|
5196
5446
|
] });
|
|
@@ -5447,7 +5697,7 @@ function liftFontSize(blocks) {
|
|
|
5447
5697
|
}
|
|
5448
5698
|
|
|
5449
5699
|
// src/utils/table-delete.ts
|
|
5450
|
-
import { CellSelection, TableMap as
|
|
5700
|
+
import { CellSelection, TableMap as TableMap3, deleteRow } from "prosemirror-tables";
|
|
5451
5701
|
function measureRowHeights(view, tablePos) {
|
|
5452
5702
|
try {
|
|
5453
5703
|
const at = view?.domAtPos?.(tablePos + 1);
|
|
@@ -5466,7 +5716,7 @@ function measureRowHeights(view, tablePos) {
|
|
|
5466
5716
|
function buildDeleteColumnTr(state, tablePos, col, rowPx) {
|
|
5467
5717
|
const table = state.doc.nodeAt(tablePos);
|
|
5468
5718
|
if (!table || table.type.name !== "table") return null;
|
|
5469
|
-
const map =
|
|
5719
|
+
const map = TableMap3.get(table);
|
|
5470
5720
|
const W = map.width;
|
|
5471
5721
|
const H = map.height;
|
|
5472
5722
|
if (col < 0 || col >= W || W <= 1) return null;
|
|
@@ -6121,6 +6371,7 @@ function LumirEditor({
|
|
|
6121
6371
|
className = "",
|
|
6122
6372
|
placeholder,
|
|
6123
6373
|
sideMenuAddButton = false,
|
|
6374
|
+
columnDivider = false,
|
|
6124
6375
|
floatingMenu = false,
|
|
6125
6376
|
floatingMenuPosition = "sticky",
|
|
6126
6377
|
// callbacks / refs
|
|
@@ -6635,7 +6886,11 @@ function LumirEditor({
|
|
|
6635
6886
|
return /* @__PURE__ */ jsxs19(
|
|
6636
6887
|
"div",
|
|
6637
6888
|
{
|
|
6638
|
-
className: cn(
|
|
6889
|
+
className: cn(
|
|
6890
|
+
"lumirEditor",
|
|
6891
|
+
columnDivider && "lumir-column-divider",
|
|
6892
|
+
className
|
|
6893
|
+
),
|
|
6639
6894
|
style: { position: "relative", display: "flex", flexDirection: "column" },
|
|
6640
6895
|
children: [
|
|
6641
6896
|
floatingMenu && editor && /* @__PURE__ */ jsxs19(Fragment8, { children: [
|