@underverse-ui/underverse 1.0.205 → 1.0.207
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 +30 -2
- 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 +326 -62
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +73 -1
- package/dist/index.d.ts +73 -1
- package/dist/index.js +157 -6
- package/dist/index.js.map +1 -1
- 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
package/api-reference.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"package": "@underverse-ui/underverse",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.207",
|
|
4
4
|
"sourceEntry": "src/index.ts",
|
|
5
|
-
"totalExports":
|
|
5
|
+
"totalExports": 256,
|
|
6
6
|
"exports": [
|
|
7
7
|
{
|
|
8
8
|
"name": "*",
|
|
@@ -1121,6 +1121,13 @@
|
|
|
1121
1121
|
"reexport": true,
|
|
1122
1122
|
"local": false
|
|
1123
1123
|
},
|
|
1124
|
+
{
|
|
1125
|
+
"name": "RadioButtonGroup",
|
|
1126
|
+
"kind": "value",
|
|
1127
|
+
"source": "./components/RadioGroup",
|
|
1128
|
+
"reexport": true,
|
|
1129
|
+
"local": false
|
|
1130
|
+
},
|
|
1124
1131
|
{
|
|
1125
1132
|
"name": "RadioGroup",
|
|
1126
1133
|
"kind": "value",
|
|
@@ -1171,6 +1178,13 @@
|
|
|
1171
1178
|
"local": false,
|
|
1172
1179
|
"aliasOf": "default"
|
|
1173
1180
|
},
|
|
1181
|
+
{
|
|
1182
|
+
"name": "SegmentedControl",
|
|
1183
|
+
"kind": "value",
|
|
1184
|
+
"source": "./components/RadioGroup",
|
|
1185
|
+
"reexport": true,
|
|
1186
|
+
"local": false
|
|
1187
|
+
},
|
|
1174
1188
|
{
|
|
1175
1189
|
"name": "SelectDropdown",
|
|
1176
1190
|
"kind": "value",
|
|
@@ -1241,6 +1255,13 @@
|
|
|
1241
1255
|
"reexport": true,
|
|
1242
1256
|
"local": false
|
|
1243
1257
|
},
|
|
1258
|
+
{
|
|
1259
|
+
"name": "SimpleRadioGroup",
|
|
1260
|
+
"kind": "value",
|
|
1261
|
+
"source": "./components/RadioGroup",
|
|
1262
|
+
"reexport": true,
|
|
1263
|
+
"local": false
|
|
1264
|
+
},
|
|
1244
1265
|
{
|
|
1245
1266
|
"name": "SimpleTabs",
|
|
1246
1267
|
"kind": "value",
|
|
@@ -1491,6 +1512,13 @@
|
|
|
1491
1512
|
"local": false,
|
|
1492
1513
|
"aliasOf": "default"
|
|
1493
1514
|
},
|
|
1515
|
+
{
|
|
1516
|
+
"name": "ToggleGroup",
|
|
1517
|
+
"kind": "value",
|
|
1518
|
+
"source": "./components/RadioGroup",
|
|
1519
|
+
"reexport": true,
|
|
1520
|
+
"local": false
|
|
1521
|
+
},
|
|
1494
1522
|
{
|
|
1495
1523
|
"name": "Tooltip",
|
|
1496
1524
|
"kind": "value",
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
import {
|
|
3
3
|
EmojiPicker,
|
|
4
4
|
EmojiPicker_default
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-F6A7HJE4.js";
|
|
6
|
+
import "./chunk-CYCBSKWI.js";
|
|
7
7
|
import "./chunk-4TYW5K4J.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-BRDGIALS.js";
|
|
9
9
|
import "./chunk-NSBPE2FW.js";
|
|
10
10
|
export {
|
|
11
11
|
EmojiPicker,
|
|
12
12
|
EmojiPicker_default as default
|
|
13
13
|
};
|
|
14
|
-
//# sourceMappingURL=EmojiPicker-
|
|
14
|
+
//# sourceMappingURL=EmojiPicker-FEJJDAWZ.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
EmojiGridButton,
|
|
3
3
|
formatEmojiCountLabel
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-CYCBSKWI.js";
|
|
5
5
|
import {
|
|
6
6
|
COLUMN_RESIZE_LINE_THICKNESS,
|
|
7
7
|
CellBgColorIcon,
|
|
@@ -53,12 +53,12 @@ import {
|
|
|
53
53
|
sanitizeUEditorUrl,
|
|
54
54
|
useEditorColors,
|
|
55
55
|
useSharedEditorUiRenderState
|
|
56
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-AMAILXHP.js";
|
|
57
57
|
import {
|
|
58
58
|
Tooltip,
|
|
59
59
|
cn,
|
|
60
60
|
useSmartTranslations
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-BRDGIALS.js";
|
|
62
62
|
|
|
63
63
|
// src/components/UEditor/prepare-content-for-save.ts
|
|
64
64
|
var MIME_EXTENSION_MAP = {
|
|
@@ -477,7 +477,7 @@ import React15, { useEffect as useEffect10, useImperativeHandle as useImperative
|
|
|
477
477
|
import { useEditor, EditorContent } from "@tiptap/react";
|
|
478
478
|
|
|
479
479
|
// src/components/UEditor/extensions.ts
|
|
480
|
-
import { mergeAttributes as
|
|
480
|
+
import { mergeAttributes as mergeAttributes8 } from "@tiptap/core";
|
|
481
481
|
import { Document } from "@tiptap/extension-document";
|
|
482
482
|
import { Paragraph } from "@tiptap/extension-paragraph";
|
|
483
483
|
import { Text } from "@tiptap/extension-text";
|
|
@@ -508,7 +508,7 @@ import { NodeViewWrapper, NodeViewContent } from "@tiptap/react";
|
|
|
508
508
|
import React from "react";
|
|
509
509
|
import { jsx } from "react/jsx-runtime";
|
|
510
510
|
var LazyBaseEmojiPicker = React.lazy(async () => {
|
|
511
|
-
const { EmojiPicker: EmojiPicker2 } = await import("./EmojiPicker-
|
|
511
|
+
const { EmojiPicker: EmojiPicker2 } = await import("./EmojiPicker-FEJJDAWZ.js");
|
|
512
512
|
return { default: EmojiPicker2 };
|
|
513
513
|
});
|
|
514
514
|
var EmojiPicker = ({ onSelect }) => {
|
|
@@ -3311,6 +3311,7 @@ var Indent = Extension9.create({
|
|
|
3311
3311
|
var indent_default = Indent;
|
|
3312
3312
|
|
|
3313
3313
|
// src/components/UEditor/table-align.ts
|
|
3314
|
+
import { mergeAttributes as mergeAttributes7 } from "@tiptap/core";
|
|
3314
3315
|
import { Table as Table2 } from "@tiptap/extension-table";
|
|
3315
3316
|
import { Plugin as Plugin4 } from "@tiptap/pm/state";
|
|
3316
3317
|
import { tableEditing } from "@tiptap/pm/tables";
|
|
@@ -3330,12 +3331,13 @@ import {
|
|
|
3330
3331
|
} from "@tiptap/pm/tables";
|
|
3331
3332
|
var DEFAULT_TABLE_COLUMN_WIDTH = 100;
|
|
3332
3333
|
var MIN_RESIZED_TABLE_COLUMN_WIDTH = 25;
|
|
3333
|
-
function
|
|
3334
|
-
|
|
3334
|
+
function getColumnResizeMinWidth(configuredMinWidth) {
|
|
3335
|
+
const normalizedMinWidth = Number.isFinite(configuredMinWidth) && configuredMinWidth > 0 ? Math.round(configuredMinWidth) : MIN_RESIZED_TABLE_COLUMN_WIDTH;
|
|
3336
|
+
return Math.max(MIN_RESIZED_TABLE_COLUMN_WIDTH, normalizedMinWidth);
|
|
3335
3337
|
}
|
|
3336
3338
|
function setColumnStyle(column, width) {
|
|
3337
3339
|
if (width == null) {
|
|
3338
|
-
column.style.width =
|
|
3340
|
+
column.style.width = `${DEFAULT_TABLE_COLUMN_WIDTH}px`;
|
|
3339
3341
|
column.style.minWidth = `${DEFAULT_TABLE_COLUMN_WIDTH}px`;
|
|
3340
3342
|
return;
|
|
3341
3343
|
}
|
|
@@ -3347,7 +3349,6 @@ function isTableColumnElement(node) {
|
|
|
3347
3349
|
}
|
|
3348
3350
|
function updateDynamicColumns(node, colgroup, table, overrideCol, overrideValue) {
|
|
3349
3351
|
let totalWidth = 0;
|
|
3350
|
-
let fixedWidth = true;
|
|
3351
3352
|
let nextDOM = colgroup.firstChild;
|
|
3352
3353
|
const row = node.firstChild;
|
|
3353
3354
|
if (row) {
|
|
@@ -3357,9 +3358,6 @@ function updateDynamicColumns(node, colgroup, table, overrideCol, overrideValue)
|
|
|
3357
3358
|
const rawWidth = overrideCol === col ? overrideValue : colwidth?.[spanIndex];
|
|
3358
3359
|
const width = rawWidth ? Math.max(rawWidth, MIN_RESIZED_TABLE_COLUMN_WIDTH) : null;
|
|
3359
3360
|
totalWidth += width ?? DEFAULT_TABLE_COLUMN_WIDTH;
|
|
3360
|
-
if (!width) {
|
|
3361
|
-
fixedWidth = false;
|
|
3362
|
-
}
|
|
3363
3361
|
const colElement = isTableColumnElement(nextDOM) ? nextDOM : colgroup.appendChild(document.createElement("col"));
|
|
3364
3362
|
setColumnStyle(colElement, width);
|
|
3365
3363
|
nextDOM = colElement.nextSibling;
|
|
@@ -3372,11 +3370,10 @@ function updateDynamicColumns(node, colgroup, table, overrideCol, overrideValue)
|
|
|
3372
3370
|
nextDOM = after;
|
|
3373
3371
|
}
|
|
3374
3372
|
const hasUserWidth = typeof node.attrs.style === "string" && /\bwidth\s*:/i.test(node.attrs.style);
|
|
3375
|
-
if (
|
|
3373
|
+
if (!hasUserWidth) {
|
|
3376
3374
|
table.style.width = `${totalWidth}px`;
|
|
3377
3375
|
table.style.minWidth = "";
|
|
3378
3376
|
} else {
|
|
3379
|
-
table.style.width = "";
|
|
3380
3377
|
table.style.minWidth = `${totalWidth}px`;
|
|
3381
3378
|
}
|
|
3382
3379
|
}
|
|
@@ -3389,6 +3386,7 @@ var UEditorTableView = class {
|
|
|
3389
3386
|
if (node.attrs.style) {
|
|
3390
3387
|
this.table.style.cssText = node.attrs.style;
|
|
3391
3388
|
}
|
|
3389
|
+
this.table.style.tableLayout = "fixed";
|
|
3392
3390
|
this.colgroup = this.table.appendChild(document.createElement("colgroup"));
|
|
3393
3391
|
updateDynamicColumns(node, this.colgroup, this.table);
|
|
3394
3392
|
this.contentDOM = this.table.appendChild(document.createElement("tbody"));
|
|
@@ -3570,7 +3568,7 @@ function handleMouseDown(view, event, cellMinWidth) {
|
|
|
3570
3568
|
colspan: attrs.colspan ?? 1,
|
|
3571
3569
|
colwidth: attrs.colwidth
|
|
3572
3570
|
});
|
|
3573
|
-
const minWidth =
|
|
3571
|
+
const minWidth = getColumnResizeMinWidth(cellMinWidth);
|
|
3574
3572
|
const dragging = {
|
|
3575
3573
|
startX: event.clientX,
|
|
3576
3574
|
startWidth: width,
|
|
@@ -3698,15 +3696,37 @@ function parseTableAlign(element) {
|
|
|
3698
3696
|
function renderTableAlignStyle(tableAlign) {
|
|
3699
3697
|
switch (tableAlign) {
|
|
3700
3698
|
case "center":
|
|
3701
|
-
return "
|
|
3699
|
+
return "table-layout: fixed; margin-left: auto; margin-right: auto;";
|
|
3702
3700
|
case "right":
|
|
3703
|
-
return "
|
|
3701
|
+
return "table-layout: fixed; margin-left: auto; margin-right: 0;";
|
|
3704
3702
|
case "left":
|
|
3705
|
-
return "
|
|
3703
|
+
return "table-layout: fixed; margin-left: 0; margin-right: auto;";
|
|
3706
3704
|
default:
|
|
3707
3705
|
return "";
|
|
3708
3706
|
}
|
|
3709
3707
|
}
|
|
3708
|
+
function createUEditorColGroup(node) {
|
|
3709
|
+
const columns = [];
|
|
3710
|
+
let totalWidth = 0;
|
|
3711
|
+
const firstRow = node.firstChild;
|
|
3712
|
+
if (firstRow) {
|
|
3713
|
+
for (let cellIndex = 0; cellIndex < firstRow.childCount; cellIndex += 1) {
|
|
3714
|
+
const cell = firstRow.child(cellIndex);
|
|
3715
|
+
const colspan = Math.max(1, Number(cell.attrs.colspan) || 1);
|
|
3716
|
+
const colwidth = Array.isArray(cell.attrs.colwidth) ? cell.attrs.colwidth : [];
|
|
3717
|
+
for (let spanIndex = 0; spanIndex < colspan; spanIndex += 1) {
|
|
3718
|
+
const storedWidth = Number(colwidth[spanIndex]);
|
|
3719
|
+
const width = Number.isFinite(storedWidth) && storedWidth > 0 ? Math.max(MIN_RESIZED_TABLE_COLUMN_WIDTH, Math.round(storedWidth)) : DEFAULT_TABLE_COLUMN_WIDTH;
|
|
3720
|
+
totalWidth += width;
|
|
3721
|
+
columns.push(["col", { style: `width: ${width}px; min-width: ${width}px;`, width: String(width) }]);
|
|
3722
|
+
}
|
|
3723
|
+
}
|
|
3724
|
+
}
|
|
3725
|
+
return {
|
|
3726
|
+
colgroup: ["colgroup", {}, ...columns],
|
|
3727
|
+
tableWidth: totalWidth > 0 ? `${totalWidth}px` : ""
|
|
3728
|
+
};
|
|
3729
|
+
}
|
|
3710
3730
|
var UEditorTable = Table2.extend({
|
|
3711
3731
|
addGlobalAttributes() {
|
|
3712
3732
|
return [
|
|
@@ -3760,6 +3780,18 @@ var UEditorTable = Table2.extend({
|
|
|
3760
3780
|
}
|
|
3761
3781
|
};
|
|
3762
3782
|
},
|
|
3783
|
+
renderHTML({ node, HTMLAttributes }) {
|
|
3784
|
+
const { colgroup, tableWidth } = createUEditorColGroup(node);
|
|
3785
|
+
const table = [
|
|
3786
|
+
"table",
|
|
3787
|
+
mergeAttributes7(this.options.HTMLAttributes, HTMLAttributes, {
|
|
3788
|
+
style: tableWidth ? `width: ${tableWidth};` : "table-layout: fixed;"
|
|
3789
|
+
}),
|
|
3790
|
+
colgroup,
|
|
3791
|
+
["tbody", 0]
|
|
3792
|
+
];
|
|
3793
|
+
return this.options.renderWrapper ? ["div", { class: "tableWrapper" }, table] : table;
|
|
3794
|
+
},
|
|
3763
3795
|
addProseMirrorPlugins() {
|
|
3764
3796
|
const isResizable = this.options.resizable && this.editor.isEditable;
|
|
3765
3797
|
return [
|
|
@@ -5151,6 +5183,21 @@ function getFormulaStateAttributes(attributes) {
|
|
|
5151
5183
|
"data-formula-state": computedValue.startsWith("#") ? "error" : "computed"
|
|
5152
5184
|
};
|
|
5153
5185
|
}
|
|
5186
|
+
function normalizeTableCellTextWrap(value) {
|
|
5187
|
+
return value === "nowrap" ? "nowrap" : "wrap";
|
|
5188
|
+
}
|
|
5189
|
+
function parseTableCellTextWrap(element) {
|
|
5190
|
+
if (element.getAttribute("data-text-wrap") === "nowrap" || element.style.whiteSpace === "nowrap") {
|
|
5191
|
+
return "nowrap";
|
|
5192
|
+
}
|
|
5193
|
+
return "wrap";
|
|
5194
|
+
}
|
|
5195
|
+
function renderTableCellTextWrap(attributes) {
|
|
5196
|
+
return normalizeTableCellTextWrap(attributes.textWrap) === "nowrap" ? { "data-text-wrap": "nowrap" } : {};
|
|
5197
|
+
}
|
|
5198
|
+
function getTableCellTextWrapStyle(value) {
|
|
5199
|
+
return normalizeTableCellTextWrap(value) === "nowrap" ? "white-space: nowrap; overflow-wrap: normal; word-break: normal" : "white-space: normal; overflow-wrap: anywhere; word-break: normal";
|
|
5200
|
+
}
|
|
5154
5201
|
var CustomTableCell = TableCell.extend({
|
|
5155
5202
|
addAttributes() {
|
|
5156
5203
|
return {
|
|
@@ -5251,6 +5298,11 @@ var CustomTableCell = TableCell.extend({
|
|
|
5251
5298
|
default: null,
|
|
5252
5299
|
parseHTML: (element) => element.getAttribute("data-text-direction") === "vertical" || ["sideways-lr", "vertical-lr", "vertical-rl"].includes(element.style.writingMode) ? "vertical" : null,
|
|
5253
5300
|
renderHTML: (attributes) => attributes.textDirection === "vertical" ? { "data-text-direction": "vertical" } : {}
|
|
5301
|
+
},
|
|
5302
|
+
textWrap: {
|
|
5303
|
+
default: "wrap",
|
|
5304
|
+
parseHTML: parseTableCellTextWrap,
|
|
5305
|
+
renderHTML: renderTableCellTextWrap
|
|
5254
5306
|
}
|
|
5255
5307
|
};
|
|
5256
5308
|
},
|
|
@@ -5262,6 +5314,7 @@ var CustomTableCell = TableCell.extend({
|
|
|
5262
5314
|
const borderWidth = HTMLAttributes["data-border-width"];
|
|
5263
5315
|
const verticalAlign = HTMLAttributes["data-vertical-align"];
|
|
5264
5316
|
const textDirection = HTMLAttributes["data-text-direction"];
|
|
5317
|
+
const textWrap = HTMLAttributes["data-text-wrap"];
|
|
5265
5318
|
let mergedStyle = style;
|
|
5266
5319
|
if (bg) mergedStyle += `; background-color: ${bg}`;
|
|
5267
5320
|
if (borderColor) mergedStyle += `; border-color: ${borderColor}`;
|
|
@@ -5269,10 +5322,11 @@ var CustomTableCell = TableCell.extend({
|
|
|
5269
5322
|
if (borderWidth) mergedStyle += `; border-width: ${borderWidth}`;
|
|
5270
5323
|
if (verticalAlign) mergedStyle += `; vertical-align: ${verticalAlign}`;
|
|
5271
5324
|
if (textDirection === "vertical") mergedStyle += "; writing-mode: sideways-lr; text-orientation: mixed";
|
|
5325
|
+
mergedStyle += `; ${getTableCellTextWrapStyle(textWrap)}`;
|
|
5272
5326
|
mergedStyle = mergedStyle.replace(/^;/, "").trim();
|
|
5273
5327
|
return [
|
|
5274
5328
|
"td",
|
|
5275
|
-
|
|
5329
|
+
mergeAttributes8(this.options.HTMLAttributes, HTMLAttributes, getFormulaStateAttributes(HTMLAttributes), mergedStyle ? { style: mergedStyle } : {}),
|
|
5276
5330
|
0
|
|
5277
5331
|
];
|
|
5278
5332
|
}
|
|
@@ -5377,6 +5431,11 @@ var CustomTableHeader = TableHeader.extend({
|
|
|
5377
5431
|
default: null,
|
|
5378
5432
|
parseHTML: (element) => element.getAttribute("data-text-direction") === "vertical" || ["sideways-lr", "vertical-lr", "vertical-rl"].includes(element.style.writingMode) ? "vertical" : null,
|
|
5379
5433
|
renderHTML: (attributes) => attributes.textDirection === "vertical" ? { "data-text-direction": "vertical" } : {}
|
|
5434
|
+
},
|
|
5435
|
+
textWrap: {
|
|
5436
|
+
default: "wrap",
|
|
5437
|
+
parseHTML: parseTableCellTextWrap,
|
|
5438
|
+
renderHTML: renderTableCellTextWrap
|
|
5380
5439
|
}
|
|
5381
5440
|
};
|
|
5382
5441
|
},
|
|
@@ -5388,6 +5447,7 @@ var CustomTableHeader = TableHeader.extend({
|
|
|
5388
5447
|
const borderWidth = HTMLAttributes["data-border-width"];
|
|
5389
5448
|
const verticalAlign = HTMLAttributes["data-vertical-align"];
|
|
5390
5449
|
const textDirection = HTMLAttributes["data-text-direction"];
|
|
5450
|
+
const textWrap = HTMLAttributes["data-text-wrap"];
|
|
5391
5451
|
let mergedStyle = style;
|
|
5392
5452
|
if (bg) mergedStyle += `; background-color: ${bg}`;
|
|
5393
5453
|
if (borderColor) mergedStyle += `; border-color: ${borderColor}`;
|
|
@@ -5395,10 +5455,11 @@ var CustomTableHeader = TableHeader.extend({
|
|
|
5395
5455
|
if (borderWidth) mergedStyle += `; border-width: ${borderWidth}`;
|
|
5396
5456
|
if (verticalAlign) mergedStyle += `; vertical-align: ${verticalAlign}`;
|
|
5397
5457
|
if (textDirection === "vertical") mergedStyle += "; writing-mode: sideways-lr; text-orientation: mixed";
|
|
5458
|
+
mergedStyle += `; ${getTableCellTextWrapStyle(textWrap)}`;
|
|
5398
5459
|
mergedStyle = mergedStyle.replace(/^;/, "").trim();
|
|
5399
5460
|
return [
|
|
5400
5461
|
"th",
|
|
5401
|
-
|
|
5462
|
+
mergeAttributes8(this.options.HTMLAttributes, HTMLAttributes, getFormulaStateAttributes(HTMLAttributes), mergedStyle ? { style: mergedStyle } : {}),
|
|
5402
5463
|
0
|
|
5403
5464
|
];
|
|
5404
5465
|
}
|
|
@@ -5560,7 +5621,8 @@ function buildUEditorExtensions({
|
|
|
5560
5621
|
handleWidth: 10,
|
|
5561
5622
|
allowTableNodeSelection: true,
|
|
5562
5623
|
HTMLAttributes: {
|
|
5563
|
-
class: "border-collapse my-4"
|
|
5624
|
+
class: "border-collapse my-4",
|
|
5625
|
+
style: "table-layout: fixed;"
|
|
5564
5626
|
}
|
|
5565
5627
|
}),
|
|
5566
5628
|
table_row_default,
|
|
@@ -5643,7 +5705,8 @@ import {
|
|
|
5643
5705
|
AlignCenterVertical,
|
|
5644
5706
|
AlignEndVertical,
|
|
5645
5707
|
ArrowDown,
|
|
5646
|
-
ArrowRight
|
|
5708
|
+
ArrowRight,
|
|
5709
|
+
WrapText
|
|
5647
5710
|
} from "lucide-react";
|
|
5648
5711
|
|
|
5649
5712
|
// src/components/UEditor/table-border-commands.ts
|
|
@@ -5985,6 +6048,7 @@ var BubbleMenuContent = ({
|
|
|
5985
6048
|
const [activeBorderPosition, setActiveBorderPosition] = useState5("all");
|
|
5986
6049
|
const currentCellVerticalAlign = normalizeStyleValue(editor.getAttributes("tableCell").verticalAlign || editor.getAttributes("tableHeader").verticalAlign) || "";
|
|
5987
6050
|
const currentCellTextDirection = normalizeStyleValue(editor.getAttributes("tableCell").textDirection || editor.getAttributes("tableHeader").textDirection) || "horizontal";
|
|
6051
|
+
const currentCellTextWrap = normalizeStyleValue(editor.getAttributes("tableCell").textWrap || editor.getAttributes("tableHeader").textWrap) || "wrap";
|
|
5988
6052
|
const isInTable3 = isSelectionInTable(editor.state);
|
|
5989
6053
|
const canMergeCells = isInTable3 && editor.can().mergeCells();
|
|
5990
6054
|
const canSplitCell = isInTable3 && editor.can().splitCell();
|
|
@@ -6645,6 +6709,20 @@ var BubbleMenuContent = ({
|
|
|
6645
6709
|
children: /* @__PURE__ */ jsx12(TableCellsMerge, { className: "w-4 h-4" })
|
|
6646
6710
|
}
|
|
6647
6711
|
),
|
|
6712
|
+
/* @__PURE__ */ jsx12(
|
|
6713
|
+
ToolbarButton,
|
|
6714
|
+
{
|
|
6715
|
+
onClick: () => applyTableCellAttribute(
|
|
6716
|
+
editor,
|
|
6717
|
+
"textWrap",
|
|
6718
|
+
currentCellTextWrap === "nowrap" ? "wrap" : "nowrap",
|
|
6719
|
+
{ focus: false }
|
|
6720
|
+
),
|
|
6721
|
+
active: currentCellTextWrap !== "nowrap",
|
|
6722
|
+
title: currentCellTextWrap === "nowrap" ? t("tableMenu.wrapText") : t("tableMenu.noWrapText"),
|
|
6723
|
+
children: /* @__PURE__ */ jsx12(WrapText, { className: "h-4 w-4" })
|
|
6724
|
+
}
|
|
6725
|
+
),
|
|
6648
6726
|
/* @__PURE__ */ jsxs10(
|
|
6649
6727
|
DropdownMenu,
|
|
6650
6728
|
{
|
|
@@ -14161,7 +14239,7 @@ function useUEditorOutput({
|
|
|
14161
14239
|
// src/components/UEditor/UEditor.tsx
|
|
14162
14240
|
import { jsx as jsx20, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
14163
14241
|
var LazyMenuBar = React15.lazy(async () => {
|
|
14164
|
-
const { MenuBar } = await import("./menu-bar-
|
|
14242
|
+
const { MenuBar } = await import("./menu-bar-6GS5LLTD.js");
|
|
14165
14243
|
return { default: MenuBar };
|
|
14166
14244
|
});
|
|
14167
14245
|
var UEditor = React15.forwardRef(({
|
|
@@ -14611,4 +14689,4 @@ export {
|
|
|
14611
14689
|
prepareUEditorContentForSave,
|
|
14612
14690
|
UEditor_default
|
|
14613
14691
|
};
|
|
14614
|
-
//# sourceMappingURL=chunk-
|
|
14692
|
+
//# sourceMappingURL=chunk-4E43DRP2.js.map
|