@underverse-ui/underverse 1.0.205 → 1.0.206
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/api-reference.json +1 -1
- package/dist/{EmojiPicker-BAWP2RAS.js → EmojiPicker-FEJJDAWZ.js} +4 -4
- package/dist/{chunk-2V6A6PGI.js → chunk-4E43DRP2.js} +102 -24
- package/dist/chunk-4E43DRP2.js.map +1 -0
- package/dist/{chunk-MJV7ETJM.js → chunk-AMAILXHP.js} +61 -36
- package/dist/chunk-AMAILXHP.js.map +1 -0
- package/dist/{chunk-XJR7E6QB.js → chunk-BRDGIALS.js} +13 -5
- package/dist/chunk-BRDGIALS.js.map +1 -0
- package/dist/{chunk-IXEFOLUD.js → chunk-CYCBSKWI.js} +2 -2
- package/dist/{chunk-Z63YNF3N.js → chunk-F6A7HJE4.js} +3 -3
- package/dist/{chunk-7U3Y7R7U.js → chunk-GKY5DHGR.js} +3 -3
- package/dist/index.cjs +171 -62
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +16 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js +6 -6
- package/dist/{menu-bar-NDAP3SOR.js → menu-bar-6GS5LLTD.js} +4 -4
- package/dist/ueditor.cjs +171 -62
- package/dist/ueditor.cjs.map +1 -1
- package/dist/ueditor.js +4 -4
- package/package.json +1 -1
- package/dist/chunk-2V6A6PGI.js.map +0 -1
- package/dist/chunk-MJV7ETJM.js.map +0 -1
- package/dist/chunk-XJR7E6QB.js.map +0 -1
- /package/dist/{EmojiPicker-BAWP2RAS.js.map → EmojiPicker-FEJJDAWZ.js.map} +0 -0
- /package/dist/{chunk-IXEFOLUD.js.map → chunk-CYCBSKWI.js.map} +0 -0
- /package/dist/{chunk-Z63YNF3N.js.map → chunk-F6A7HJE4.js.map} +0 -0
- /package/dist/{chunk-7U3Y7R7U.js.map → chunk-GKY5DHGR.js.map} +0 -0
- /package/dist/{menu-bar-NDAP3SOR.js.map → menu-bar-6GS5LLTD.js.map} +0 -0
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
mergeRefs,
|
|
6
6
|
setRefValue,
|
|
7
7
|
useSmartTranslations
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-BRDGIALS.js";
|
|
9
9
|
|
|
10
10
|
// src/contexts/UnderverseConfigContext.tsx
|
|
11
11
|
import * as React from "react";
|
|
@@ -2059,7 +2059,8 @@ import {
|
|
|
2059
2059
|
Upload,
|
|
2060
2060
|
AlignStartVertical,
|
|
2061
2061
|
AlignCenterVertical,
|
|
2062
|
-
AlignEndVertical
|
|
2062
|
+
AlignEndVertical,
|
|
2063
|
+
WrapText
|
|
2063
2064
|
} from "lucide-react";
|
|
2064
2065
|
import { setCellAttr } from "@tiptap/pm/tables";
|
|
2065
2066
|
|
|
@@ -2741,16 +2742,19 @@ function applyTableAlignment(editor, tableAlign, anchorPos) {
|
|
|
2741
2742
|
const tableDom = editor.view.nodeDOM(tableInfo.pos);
|
|
2742
2743
|
const tableElement = domAtTableElement?.closest?.("table") ?? (tableDom instanceof HTMLTableElement ? tableDom : tableDom instanceof HTMLElement ? tableDom.querySelector("table") : null) ?? (editor.view.dom.querySelectorAll("table").length === 1 ? editor.view.dom.querySelector("table") : null);
|
|
2743
2744
|
if (tableElement instanceof HTMLTableElement) {
|
|
2745
|
+
tableElement.style.tableLayout = "fixed";
|
|
2746
|
+
if (tableElement.style.width === "max-content") {
|
|
2747
|
+
tableElement.style.removeProperty("width");
|
|
2748
|
+
}
|
|
2749
|
+
if (tableElement.style.maxWidth === "100%") {
|
|
2750
|
+
tableElement.style.removeProperty("max-width");
|
|
2751
|
+
}
|
|
2744
2752
|
if (tableAlign) {
|
|
2745
2753
|
tableElement.setAttribute("data-table-align", tableAlign);
|
|
2746
|
-
tableElement.style.width = "max-content";
|
|
2747
|
-
tableElement.style.maxWidth = "100%";
|
|
2748
2754
|
tableElement.style.marginLeft = tableAlign === "center" || tableAlign === "right" ? "auto" : "0";
|
|
2749
2755
|
tableElement.style.marginRight = tableAlign === "center" ? "auto" : tableAlign === "right" ? "0" : "auto";
|
|
2750
2756
|
} else {
|
|
2751
2757
|
tableElement.removeAttribute("data-table-align");
|
|
2752
|
-
tableElement.style.removeProperty("width");
|
|
2753
|
-
tableElement.style.removeProperty("max-width");
|
|
2754
2758
|
tableElement.style.removeProperty("margin-left");
|
|
2755
2759
|
tableElement.style.removeProperty("margin-right");
|
|
2756
2760
|
}
|
|
@@ -3193,6 +3197,7 @@ function computeEditorUiRenderState(editor) {
|
|
|
3193
3197
|
formula: tableCell.formula ?? tableHeader.formula ?? null,
|
|
3194
3198
|
numberFormat: tableCell.numberFormat ?? tableHeader.numberFormat ?? null,
|
|
3195
3199
|
textDirection: tableCell.textDirection ?? tableHeader.textDirection ?? null,
|
|
3200
|
+
textWrap: tableCell.textWrap ?? tableHeader.textWrap ?? "wrap",
|
|
3196
3201
|
verticalAlign: tableCell.verticalAlign ?? tableHeader.verticalAlign ?? null
|
|
3197
3202
|
},
|
|
3198
3203
|
can: {
|
|
@@ -3360,6 +3365,7 @@ var EditorToolbar = ({
|
|
|
3360
3365
|
const canSplitCell = hasTableContext && editor.can().splitCell();
|
|
3361
3366
|
const currentCellVerticalAlign = normalizeStyleValue(editor.getAttributes("tableCell").verticalAlign || editor.getAttributes("tableHeader").verticalAlign) || "";
|
|
3362
3367
|
const currentCellTextDirection = normalizeStyleValue(editor.getAttributes("tableCell").textDirection || editor.getAttributes("tableHeader").textDirection) || "horizontal";
|
|
3368
|
+
const currentCellTextWrap = normalizeStyleValue(editor.getAttributes("tableCell").textWrap || editor.getAttributes("tableHeader").textWrap) || "wrap";
|
|
3363
3369
|
const currentFontFamily = normalizeStyleValue(textStyleAttrs.fontFamily);
|
|
3364
3370
|
const currentFontSize = normalizeStyleValue(textStyleAttrs.fontSize);
|
|
3365
3371
|
const currentTextColor = normalizeStyleValue(textStyleAttrs.color) || "inherit";
|
|
@@ -3870,33 +3876,44 @@ var EditorToolbar = ({
|
|
|
3870
3876
|
]
|
|
3871
3877
|
}
|
|
3872
3878
|
),
|
|
3873
|
-
hasTableContext && /* @__PURE__ */ jsxs5(
|
|
3874
|
-
|
|
3875
|
-
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
-
|
|
3879
|
-
|
|
3880
|
-
|
|
3881
|
-
|
|
3882
|
-
|
|
3883
|
-
|
|
3884
|
-
|
|
3885
|
-
|
|
3886
|
-
|
|
3887
|
-
|
|
3888
|
-
|
|
3889
|
-
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
|
|
3893
|
-
|
|
3894
|
-
|
|
3895
|
-
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
|
|
3899
|
-
|
|
3879
|
+
hasTableContext && /* @__PURE__ */ jsxs5(Fragment3, { children: [
|
|
3880
|
+
/* @__PURE__ */ jsxs5(
|
|
3881
|
+
DropdownMenu,
|
|
3882
|
+
{
|
|
3883
|
+
trigger: /* @__PURE__ */ jsx7(ToolbarButton, { onClick: () => {
|
|
3884
|
+
}, title: t("tableMenu.textDirection"), children: currentCellTextDirection === "vertical" ? /* @__PURE__ */ jsx7(ArrowDown, { className: "w-4 h-4" }) : /* @__PURE__ */ jsx7(ArrowRight, { className: "w-4 h-4" }) }),
|
|
3885
|
+
children: [
|
|
3886
|
+
/* @__PURE__ */ jsx7(
|
|
3887
|
+
DropdownMenuItem,
|
|
3888
|
+
{
|
|
3889
|
+
icon: ArrowRight,
|
|
3890
|
+
label: t("tableMenu.horizontalText"),
|
|
3891
|
+
onClick: () => applyTableCellAttribute(editor, "textDirection", null),
|
|
3892
|
+
active: currentCellTextDirection === "horizontal"
|
|
3893
|
+
}
|
|
3894
|
+
),
|
|
3895
|
+
/* @__PURE__ */ jsx7(
|
|
3896
|
+
DropdownMenuItem,
|
|
3897
|
+
{
|
|
3898
|
+
icon: ArrowDown,
|
|
3899
|
+
label: t("tableMenu.verticalText"),
|
|
3900
|
+
onClick: () => applyTableCellAttribute(editor, "textDirection", "vertical"),
|
|
3901
|
+
active: currentCellTextDirection === "vertical"
|
|
3902
|
+
}
|
|
3903
|
+
)
|
|
3904
|
+
]
|
|
3905
|
+
}
|
|
3906
|
+
),
|
|
3907
|
+
/* @__PURE__ */ jsx7(
|
|
3908
|
+
ToolbarButton,
|
|
3909
|
+
{
|
|
3910
|
+
onClick: () => applyTableCellAttribute(editor, "textWrap", currentCellTextWrap === "nowrap" ? "wrap" : "nowrap"),
|
|
3911
|
+
active: currentCellTextWrap !== "nowrap",
|
|
3912
|
+
title: currentCellTextWrap === "nowrap" ? t("tableMenu.wrapText") : t("tableMenu.noWrapText"),
|
|
3913
|
+
children: /* @__PURE__ */ jsx7(WrapText, { className: "h-4 w-4" })
|
|
3914
|
+
}
|
|
3915
|
+
)
|
|
3916
|
+
] })
|
|
3900
3917
|
] }),
|
|
3901
3918
|
/* @__PURE__ */ jsx7(ToolbarDivider, {}),
|
|
3902
3919
|
/* @__PURE__ */ jsxs5(
|
|
@@ -4276,8 +4293,6 @@ var UEDITOR_PROSEMIRROR_CLASS_NAME = cn(
|
|
|
4276
4293
|
"[&_table]:table-fixed",
|
|
4277
4294
|
"[&_table]:overflow-hidden",
|
|
4278
4295
|
"[&_table]:select-text",
|
|
4279
|
-
"[&_table[data-table-align]]:w-max",
|
|
4280
|
-
"[&_table[data-table-align]]:max-w-full",
|
|
4281
4296
|
"[&_table[data-table-align='center']]:mx-auto",
|
|
4282
4297
|
"[&_table[data-table-align='right']]:ml-auto",
|
|
4283
4298
|
"[&_table[data-table-align='right']]:mr-0",
|
|
@@ -4287,6 +4302,11 @@ var UEDITOR_PROSEMIRROR_CLASS_NAME = cn(
|
|
|
4287
4302
|
"[&_td]:select-text",
|
|
4288
4303
|
"[&_td]:px-2",
|
|
4289
4304
|
"[&_td]:py-0",
|
|
4305
|
+
"[&_td]:whitespace-normal",
|
|
4306
|
+
"[&_td]:[overflow-wrap:anywhere]",
|
|
4307
|
+
"[&_td]:[word-break:normal]",
|
|
4308
|
+
"[&_td[data-text-wrap='nowrap']]:whitespace-nowrap",
|
|
4309
|
+
"[&_td[data-text-wrap='nowrap']]:[overflow-wrap:normal]",
|
|
4290
4310
|
"[&_td_p]:my-0",
|
|
4291
4311
|
"[&_th]:relative",
|
|
4292
4312
|
"[&_th]:align-top",
|
|
@@ -4294,6 +4314,11 @@ var UEDITOR_PROSEMIRROR_CLASS_NAME = cn(
|
|
|
4294
4314
|
"[&_th]:select-text",
|
|
4295
4315
|
"[&_th]:px-2",
|
|
4296
4316
|
"[&_th]:py-0",
|
|
4317
|
+
"[&_th]:whitespace-normal",
|
|
4318
|
+
"[&_th]:[overflow-wrap:anywhere]",
|
|
4319
|
+
"[&_th]:[word-break:normal]",
|
|
4320
|
+
"[&_th[data-text-wrap='nowrap']]:whitespace-nowrap",
|
|
4321
|
+
"[&_th[data-text-wrap='nowrap']]:[overflow-wrap:normal]",
|
|
4297
4322
|
"[&_th_p]:my-0",
|
|
4298
4323
|
"[&_td[data-formula]]:pr-7",
|
|
4299
4324
|
"[&_th[data-formula]]:pr-7",
|
|
@@ -4498,4 +4523,4 @@ export {
|
|
|
4498
4523
|
EditorToolbar,
|
|
4499
4524
|
UEDITOR_PROSEMIRROR_CLASS_NAME
|
|
4500
4525
|
};
|
|
4501
|
-
//# sourceMappingURL=chunk-
|
|
4526
|
+
//# sourceMappingURL=chunk-AMAILXHP.js.map
|