@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/dist/index.cjs
CHANGED
|
@@ -498,7 +498,9 @@ var init_en = __esm({
|
|
|
498
498
|
alignVerticalBottom: "Bottom Align",
|
|
499
499
|
textDirection: "Text Direction",
|
|
500
500
|
horizontalText: "Horizontal Text",
|
|
501
|
-
verticalText: "Vertical Text"
|
|
501
|
+
verticalText: "Vertical Text",
|
|
502
|
+
wrapText: "Wrap Text",
|
|
503
|
+
noWrapText: "Don't Wrap Text"
|
|
502
504
|
},
|
|
503
505
|
callout: {
|
|
504
506
|
selectEmoji: "Select Emoji",
|
|
@@ -954,7 +956,9 @@ var init_vi = __esm({
|
|
|
954
956
|
alignVerticalBottom: "C\u0103n d\u01B0\u1EDBi",
|
|
955
957
|
textDirection: "H\u01B0\u1EDBng ch\u1EEF",
|
|
956
958
|
horizontalText: "Ch\u1EEF ngang",
|
|
957
|
-
verticalText: "Ch\u1EEF d\u1ECDc"
|
|
959
|
+
verticalText: "Ch\u1EEF d\u1ECDc",
|
|
960
|
+
wrapText: "T\u1EF1 xu\u1ED1ng d\xF2ng",
|
|
961
|
+
noWrapText: "Kh\xF4ng xu\u1ED1ng d\xF2ng"
|
|
958
962
|
},
|
|
959
963
|
callout: {
|
|
960
964
|
selectEmoji: "Ch\u1ECDn Bi\u1EC3u t\u01B0\u1EE3ng",
|
|
@@ -1410,7 +1414,9 @@ var init_ko = __esm({
|
|
|
1410
1414
|
alignVerticalBottom: "\uC544\uB798\uCABD \uB9DE\uCDA4",
|
|
1411
1415
|
textDirection: "\uD14D\uC2A4\uD2B8 \uBC29\uD5A5",
|
|
1412
1416
|
horizontalText: "\uAC00\uB85C\uC4F0\uAE30",
|
|
1413
|
-
verticalText: "\uC138\uB85C\uC4F0\uAE30"
|
|
1417
|
+
verticalText: "\uC138\uB85C\uC4F0\uAE30",
|
|
1418
|
+
wrapText: "\uD14D\uC2A4\uD2B8 \uC904 \uBC14\uAFC8",
|
|
1419
|
+
noWrapText: "\uC904 \uBC14\uAFC8 \uC548 \uD568"
|
|
1414
1420
|
},
|
|
1415
1421
|
callout: {
|
|
1416
1422
|
selectEmoji: "\uC774\uBAA8\uC9C0 \uC120\uD0DD",
|
|
@@ -1866,7 +1872,9 @@ var init_ja = __esm({
|
|
|
1866
1872
|
alignVerticalBottom: "\u4E0B\u63C3\u3048",
|
|
1867
1873
|
textDirection: "\u6587\u5B57\u65B9\u5411",
|
|
1868
1874
|
horizontalText: "\u6A2A\u66F8\u304D",
|
|
1869
|
-
verticalText: "\u7E26\u66F8\u304D"
|
|
1875
|
+
verticalText: "\u7E26\u66F8\u304D",
|
|
1876
|
+
wrapText: "\u30C6\u30AD\u30B9\u30C8\u3092\u6298\u308A\u8FD4\u3059",
|
|
1877
|
+
noWrapText: "\u6298\u308A\u8FD4\u3055\u306A\u3044"
|
|
1870
1878
|
},
|
|
1871
1879
|
callout: {
|
|
1872
1880
|
selectEmoji: "\u7D75\u6587\u5B57\u3092\u9078\u629E",
|
|
@@ -5919,16 +5927,19 @@ function applyTableAlignment(editor, tableAlign, anchorPos) {
|
|
|
5919
5927
|
const tableDom = editor.view.nodeDOM(tableInfo.pos);
|
|
5920
5928
|
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);
|
|
5921
5929
|
if (tableElement instanceof HTMLTableElement) {
|
|
5930
|
+
tableElement.style.tableLayout = "fixed";
|
|
5931
|
+
if (tableElement.style.width === "max-content") {
|
|
5932
|
+
tableElement.style.removeProperty("width");
|
|
5933
|
+
}
|
|
5934
|
+
if (tableElement.style.maxWidth === "100%") {
|
|
5935
|
+
tableElement.style.removeProperty("max-width");
|
|
5936
|
+
}
|
|
5922
5937
|
if (tableAlign) {
|
|
5923
5938
|
tableElement.setAttribute("data-table-align", tableAlign);
|
|
5924
|
-
tableElement.style.width = "max-content";
|
|
5925
|
-
tableElement.style.maxWidth = "100%";
|
|
5926
5939
|
tableElement.style.marginLeft = tableAlign === "center" || tableAlign === "right" ? "auto" : "0";
|
|
5927
5940
|
tableElement.style.marginRight = tableAlign === "center" ? "auto" : tableAlign === "right" ? "0" : "auto";
|
|
5928
5941
|
} else {
|
|
5929
5942
|
tableElement.removeAttribute("data-table-align");
|
|
5930
|
-
tableElement.style.removeProperty("width");
|
|
5931
|
-
tableElement.style.removeProperty("max-width");
|
|
5932
5943
|
tableElement.style.removeProperty("margin-left");
|
|
5933
5944
|
tableElement.style.removeProperty("margin-right");
|
|
5934
5945
|
}
|
|
@@ -7074,6 +7085,7 @@ function computeEditorUiRenderState(editor) {
|
|
|
7074
7085
|
formula: tableCell.formula ?? tableHeader.formula ?? null,
|
|
7075
7086
|
numberFormat: tableCell.numberFormat ?? tableHeader.numberFormat ?? null,
|
|
7076
7087
|
textDirection: tableCell.textDirection ?? tableHeader.textDirection ?? null,
|
|
7088
|
+
textWrap: tableCell.textWrap ?? tableHeader.textWrap ?? "wrap",
|
|
7077
7089
|
verticalAlign: tableCell.verticalAlign ?? tableHeader.verticalAlign ?? null
|
|
7078
7090
|
},
|
|
7079
7091
|
can: {
|
|
@@ -7285,6 +7297,7 @@ var init_toolbar = __esm({
|
|
|
7285
7297
|
const canSplitCell = hasTableContext && editor.can().splitCell();
|
|
7286
7298
|
const currentCellVerticalAlign = normalizeStyleValue(editor.getAttributes("tableCell").verticalAlign || editor.getAttributes("tableHeader").verticalAlign) || "";
|
|
7287
7299
|
const currentCellTextDirection = normalizeStyleValue(editor.getAttributes("tableCell").textDirection || editor.getAttributes("tableHeader").textDirection) || "horizontal";
|
|
7300
|
+
const currentCellTextWrap = normalizeStyleValue(editor.getAttributes("tableCell").textWrap || editor.getAttributes("tableHeader").textWrap) || "wrap";
|
|
7288
7301
|
const currentFontFamily = normalizeStyleValue(textStyleAttrs.fontFamily);
|
|
7289
7302
|
const currentFontSize = normalizeStyleValue(textStyleAttrs.fontSize);
|
|
7290
7303
|
const currentTextColor = normalizeStyleValue(textStyleAttrs.color) || "inherit";
|
|
@@ -7795,33 +7808,44 @@ var init_toolbar = __esm({
|
|
|
7795
7808
|
]
|
|
7796
7809
|
}
|
|
7797
7810
|
),
|
|
7798
|
-
hasTableContext && /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(
|
|
7799
|
-
|
|
7800
|
-
|
|
7801
|
-
|
|
7802
|
-
|
|
7803
|
-
|
|
7804
|
-
|
|
7805
|
-
|
|
7806
|
-
|
|
7807
|
-
|
|
7808
|
-
|
|
7809
|
-
|
|
7810
|
-
|
|
7811
|
-
|
|
7812
|
-
|
|
7813
|
-
|
|
7814
|
-
|
|
7815
|
-
|
|
7816
|
-
|
|
7817
|
-
|
|
7818
|
-
|
|
7819
|
-
|
|
7820
|
-
|
|
7821
|
-
|
|
7822
|
-
|
|
7823
|
-
|
|
7824
|
-
|
|
7811
|
+
hasTableContext && /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(import_jsx_runtime93.Fragment, { children: [
|
|
7812
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(
|
|
7813
|
+
DropdownMenu,
|
|
7814
|
+
{
|
|
7815
|
+
trigger: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(ToolbarButton, { onClick: () => {
|
|
7816
|
+
}, title: t("tableMenu.textDirection"), children: currentCellTextDirection === "vertical" ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_lucide_react52.ArrowDown, { className: "w-4 h-4" }) : /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_lucide_react52.ArrowRight, { className: "w-4 h-4" }) }),
|
|
7817
|
+
children: [
|
|
7818
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
7819
|
+
DropdownMenuItem,
|
|
7820
|
+
{
|
|
7821
|
+
icon: import_lucide_react52.ArrowRight,
|
|
7822
|
+
label: t("tableMenu.horizontalText"),
|
|
7823
|
+
onClick: () => applyTableCellAttribute(editor, "textDirection", null),
|
|
7824
|
+
active: currentCellTextDirection === "horizontal"
|
|
7825
|
+
}
|
|
7826
|
+
),
|
|
7827
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
7828
|
+
DropdownMenuItem,
|
|
7829
|
+
{
|
|
7830
|
+
icon: import_lucide_react52.ArrowDown,
|
|
7831
|
+
label: t("tableMenu.verticalText"),
|
|
7832
|
+
onClick: () => applyTableCellAttribute(editor, "textDirection", "vertical"),
|
|
7833
|
+
active: currentCellTextDirection === "vertical"
|
|
7834
|
+
}
|
|
7835
|
+
)
|
|
7836
|
+
]
|
|
7837
|
+
}
|
|
7838
|
+
),
|
|
7839
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
7840
|
+
ToolbarButton,
|
|
7841
|
+
{
|
|
7842
|
+
onClick: () => applyTableCellAttribute(editor, "textWrap", currentCellTextWrap === "nowrap" ? "wrap" : "nowrap"),
|
|
7843
|
+
active: currentCellTextWrap !== "nowrap",
|
|
7844
|
+
title: currentCellTextWrap === "nowrap" ? t("tableMenu.wrapText") : t("tableMenu.noWrapText"),
|
|
7845
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_lucide_react52.WrapText, { className: "h-4 w-4" })
|
|
7846
|
+
}
|
|
7847
|
+
)
|
|
7848
|
+
] })
|
|
7825
7849
|
] }),
|
|
7826
7850
|
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(ToolbarDivider, {}),
|
|
7827
7851
|
/* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(
|
|
@@ -8208,8 +8232,6 @@ var init_editor_styles = __esm({
|
|
|
8208
8232
|
"[&_table]:table-fixed",
|
|
8209
8233
|
"[&_table]:overflow-hidden",
|
|
8210
8234
|
"[&_table]:select-text",
|
|
8211
|
-
"[&_table[data-table-align]]:w-max",
|
|
8212
|
-
"[&_table[data-table-align]]:max-w-full",
|
|
8213
8235
|
"[&_table[data-table-align='center']]:mx-auto",
|
|
8214
8236
|
"[&_table[data-table-align='right']]:ml-auto",
|
|
8215
8237
|
"[&_table[data-table-align='right']]:mr-0",
|
|
@@ -8219,6 +8241,11 @@ var init_editor_styles = __esm({
|
|
|
8219
8241
|
"[&_td]:select-text",
|
|
8220
8242
|
"[&_td]:px-2",
|
|
8221
8243
|
"[&_td]:py-0",
|
|
8244
|
+
"[&_td]:whitespace-normal",
|
|
8245
|
+
"[&_td]:[overflow-wrap:anywhere]",
|
|
8246
|
+
"[&_td]:[word-break:normal]",
|
|
8247
|
+
"[&_td[data-text-wrap='nowrap']]:whitespace-nowrap",
|
|
8248
|
+
"[&_td[data-text-wrap='nowrap']]:[overflow-wrap:normal]",
|
|
8222
8249
|
"[&_td_p]:my-0",
|
|
8223
8250
|
"[&_th]:relative",
|
|
8224
8251
|
"[&_th]:align-top",
|
|
@@ -8226,6 +8253,11 @@ var init_editor_styles = __esm({
|
|
|
8226
8253
|
"[&_th]:select-text",
|
|
8227
8254
|
"[&_th]:px-2",
|
|
8228
8255
|
"[&_th]:py-0",
|
|
8256
|
+
"[&_th]:whitespace-normal",
|
|
8257
|
+
"[&_th]:[overflow-wrap:anywhere]",
|
|
8258
|
+
"[&_th]:[word-break:normal]",
|
|
8259
|
+
"[&_th[data-text-wrap='nowrap']]:whitespace-nowrap",
|
|
8260
|
+
"[&_th[data-text-wrap='nowrap']]:[overflow-wrap:normal]",
|
|
8229
8261
|
"[&_th_p]:my-0",
|
|
8230
8262
|
"[&_td[data-formula]]:pr-7",
|
|
8231
8263
|
"[&_th[data-formula]]:pr-7",
|
|
@@ -9358,17 +9390,20 @@ __export(src_exports, {
|
|
|
9358
9390
|
Popover: () => Popover,
|
|
9359
9391
|
Progress: () => Progress,
|
|
9360
9392
|
PulseBadge: () => PulseBadge,
|
|
9393
|
+
RadioButtonGroup: () => RadioButtonGroup,
|
|
9361
9394
|
RadioGroup: () => RadioGroup,
|
|
9362
9395
|
RadioGroupItem: () => RadioGroupItem,
|
|
9363
9396
|
SIZE_STYLES_BTN: () => SIZE_STYLES_BTN,
|
|
9364
9397
|
ScrollArea: () => ScrollArea,
|
|
9365
9398
|
SearchInput: () => SearchInput,
|
|
9366
9399
|
Section: () => Section_default,
|
|
9400
|
+
SegmentedControl: () => SegmentedControl,
|
|
9367
9401
|
SegmentedProgress: () => SegmentedProgress,
|
|
9368
9402
|
SelectDropdown: () => SelectDropdown,
|
|
9369
9403
|
Sheet: () => Sheet,
|
|
9370
9404
|
SidebarSheet: () => SidebarSheet,
|
|
9371
9405
|
SimplePagination: () => SimplePagination,
|
|
9406
|
+
SimpleRadioGroup: () => SimpleRadioGroup,
|
|
9372
9407
|
SimpleTabs: () => SimpleTabs,
|
|
9373
9408
|
Skeleton: () => Skeleton_default,
|
|
9374
9409
|
SkeletonAvatar: () => SkeletonAvatar,
|
|
@@ -9405,6 +9440,7 @@ __export(src_exports, {
|
|
|
9405
9440
|
Timeline: () => Timeline_default,
|
|
9406
9441
|
TimelineItem: () => TimelineItem,
|
|
9407
9442
|
ToastProvider: () => Toast_default,
|
|
9443
|
+
ToggleGroup: () => ToggleGroup,
|
|
9408
9444
|
Tooltip: () => Tooltip,
|
|
9409
9445
|
TranslationProvider: () => TranslationProvider,
|
|
9410
9446
|
UEditor: () => UEditor_default,
|
|
@@ -25134,6 +25170,153 @@ var RadioGroupItem = React47.forwardRef(
|
|
|
25134
25170
|
}
|
|
25135
25171
|
);
|
|
25136
25172
|
RadioGroupItem.displayName = "RadioGroupItem";
|
|
25173
|
+
var SimpleRadioGroup = ({
|
|
25174
|
+
items,
|
|
25175
|
+
value,
|
|
25176
|
+
defaultValue,
|
|
25177
|
+
onValueChange,
|
|
25178
|
+
name,
|
|
25179
|
+
disabled = false,
|
|
25180
|
+
orientation = "vertical",
|
|
25181
|
+
size = "md",
|
|
25182
|
+
variant = "default",
|
|
25183
|
+
borderMode,
|
|
25184
|
+
className,
|
|
25185
|
+
required = false,
|
|
25186
|
+
error = false,
|
|
25187
|
+
errorMessage
|
|
25188
|
+
}) => {
|
|
25189
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
25190
|
+
RadioGroup,
|
|
25191
|
+
{
|
|
25192
|
+
value,
|
|
25193
|
+
defaultValue,
|
|
25194
|
+
onValueChange,
|
|
25195
|
+
name,
|
|
25196
|
+
disabled,
|
|
25197
|
+
orientation,
|
|
25198
|
+
size,
|
|
25199
|
+
variant,
|
|
25200
|
+
borderMode,
|
|
25201
|
+
className,
|
|
25202
|
+
required,
|
|
25203
|
+
error,
|
|
25204
|
+
errorMessage,
|
|
25205
|
+
children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
25206
|
+
RadioGroupItem,
|
|
25207
|
+
{
|
|
25208
|
+
value: item.value,
|
|
25209
|
+
label: item.label,
|
|
25210
|
+
description: item.description,
|
|
25211
|
+
disabled: item.disabled,
|
|
25212
|
+
icon: item.icon
|
|
25213
|
+
},
|
|
25214
|
+
item.value
|
|
25215
|
+
))
|
|
25216
|
+
}
|
|
25217
|
+
);
|
|
25218
|
+
};
|
|
25219
|
+
var RadioButtonGroup = ({
|
|
25220
|
+
items,
|
|
25221
|
+
value,
|
|
25222
|
+
defaultValue,
|
|
25223
|
+
onValueChange,
|
|
25224
|
+
name,
|
|
25225
|
+
disabled = false,
|
|
25226
|
+
size = "md",
|
|
25227
|
+
variant = "default",
|
|
25228
|
+
borderMode,
|
|
25229
|
+
className,
|
|
25230
|
+
fullWidth = false
|
|
25231
|
+
}) => {
|
|
25232
|
+
const globalConfig = useUnderverseUIConfig();
|
|
25233
|
+
const resolvedBorderMode = borderMode ?? globalConfig.input?.borderMode ?? globalConfig.borderMode ?? "full";
|
|
25234
|
+
const [internalValue, setInternalValue] = React47.useState(defaultValue || "");
|
|
25235
|
+
const isControlled = value !== void 0;
|
|
25236
|
+
const currentValue = isControlled ? value : internalValue;
|
|
25237
|
+
const handleValueChange = (newValue) => {
|
|
25238
|
+
if (!disabled) {
|
|
25239
|
+
if (!isControlled) {
|
|
25240
|
+
setInternalValue(newValue);
|
|
25241
|
+
}
|
|
25242
|
+
onValueChange?.(newValue);
|
|
25243
|
+
}
|
|
25244
|
+
};
|
|
25245
|
+
const sizeClasses2 = {
|
|
25246
|
+
sm: "px-3 py-1.5 text-xs",
|
|
25247
|
+
md: "px-4 py-2 text-sm",
|
|
25248
|
+
lg: "px-6 py-3 text-base"
|
|
25249
|
+
};
|
|
25250
|
+
const variantClasses3 = {
|
|
25251
|
+
default: {
|
|
25252
|
+
container: "bg-muted p-1",
|
|
25253
|
+
base: "bg-transparent hover:bg-background/50",
|
|
25254
|
+
selected: "bg-background text-foreground shadow-sm"
|
|
25255
|
+
},
|
|
25256
|
+
outline: {
|
|
25257
|
+
container: "border border-border/50 overflow-hidden",
|
|
25258
|
+
base: "bg-background border-r border-border/50 hover:bg-accent",
|
|
25259
|
+
selected: "bg-primary text-primary-foreground border-primary"
|
|
25260
|
+
},
|
|
25261
|
+
solid: {
|
|
25262
|
+
container: "border border-border/50 overflow-hidden",
|
|
25263
|
+
base: "bg-background hover:bg-accent",
|
|
25264
|
+
selected: "bg-primary text-primary-foreground"
|
|
25265
|
+
}
|
|
25266
|
+
};
|
|
25267
|
+
const uniqueId = React47.useId();
|
|
25268
|
+
const radioName = name || `radio-button-group-${uniqueId}`;
|
|
25269
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: cn("inline-flex", variantClasses3[variant].container, getBorderRadiusClass(resolvedBorderMode), fullWidth && "w-full", className), role: "radiogroup", children: items.map((item, index) => {
|
|
25270
|
+
const isSelected = currentValue === item.value;
|
|
25271
|
+
const isDisabled = item.disabled || disabled;
|
|
25272
|
+
const Icon = item.icon;
|
|
25273
|
+
const isLast = index === items.length - 1;
|
|
25274
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
25275
|
+
"button",
|
|
25276
|
+
{
|
|
25277
|
+
type: "button",
|
|
25278
|
+
disabled: isDisabled,
|
|
25279
|
+
role: "radio",
|
|
25280
|
+
"aria-checked": isSelected,
|
|
25281
|
+
className: cn(
|
|
25282
|
+
"relative inline-flex items-center justify-center gap-2 font-medium transition-all duration-200",
|
|
25283
|
+
"focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1",
|
|
25284
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
25285
|
+
sizeClasses2[size],
|
|
25286
|
+
isSelected ? variantClasses3[variant].selected : variantClasses3[variant].base,
|
|
25287
|
+
variant === "outline" && !isLast && "border-r border-border/50",
|
|
25288
|
+
variant === "default" && getBorderRadiusClass(resolvedBorderMode),
|
|
25289
|
+
fullWidth && "flex-1"
|
|
25290
|
+
),
|
|
25291
|
+
onClick: () => handleValueChange(item.value),
|
|
25292
|
+
children: [
|
|
25293
|
+
Icon && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Icon, { className: "w-4 h-4" }),
|
|
25294
|
+
item.label,
|
|
25295
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
25296
|
+
"input",
|
|
25297
|
+
{
|
|
25298
|
+
type: "radio",
|
|
25299
|
+
name: radioName,
|
|
25300
|
+
value: item.value,
|
|
25301
|
+
checked: isSelected,
|
|
25302
|
+
onChange: () => {
|
|
25303
|
+
},
|
|
25304
|
+
className: "sr-only",
|
|
25305
|
+
tabIndex: -1
|
|
25306
|
+
}
|
|
25307
|
+
)
|
|
25308
|
+
]
|
|
25309
|
+
},
|
|
25310
|
+
item.value
|
|
25311
|
+
);
|
|
25312
|
+
}) });
|
|
25313
|
+
};
|
|
25314
|
+
var SegmentedControl = (props) => {
|
|
25315
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(RadioButtonGroup, { ...props, variant: "default" });
|
|
25316
|
+
};
|
|
25317
|
+
var ToggleGroup = (props) => {
|
|
25318
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(RadioButtonGroup, { ...props, variant: "outline" });
|
|
25319
|
+
};
|
|
25137
25320
|
|
|
25138
25321
|
// src/components/Slider.tsx
|
|
25139
25322
|
var React48 = __toESM(require("react"), 1);
|
|
@@ -32938,7 +33121,7 @@ var import_react85 = require("@tiptap/react");
|
|
|
32938
33121
|
init_cn();
|
|
32939
33122
|
|
|
32940
33123
|
// src/components/UEditor/extensions.ts
|
|
32941
|
-
var
|
|
33124
|
+
var import_core20 = require("@tiptap/core");
|
|
32942
33125
|
var import_extension_document = require("@tiptap/extension-document");
|
|
32943
33126
|
var import_extension_paragraph = require("@tiptap/extension-paragraph");
|
|
32944
33127
|
var import_extension_text = require("@tiptap/extension-text");
|
|
@@ -32955,7 +33138,7 @@ var import_extension_task_list = require("@tiptap/extension-task-list");
|
|
|
32955
33138
|
var import_extension_task_item = require("@tiptap/extension-task-item");
|
|
32956
33139
|
var import_extension_blockquote = require("@tiptap/extension-blockquote");
|
|
32957
33140
|
var import_extension_code = require("@tiptap/extension-code");
|
|
32958
|
-
var
|
|
33141
|
+
var import_core21 = require("@tiptap/core");
|
|
32959
33142
|
var import_react69 = require("@tiptap/react");
|
|
32960
33143
|
|
|
32961
33144
|
// src/components/UEditor/callout.ts
|
|
@@ -35778,6 +35961,7 @@ var Indent = import_core16.Extension.create({
|
|
|
35778
35961
|
var indent_default = Indent;
|
|
35779
35962
|
|
|
35780
35963
|
// src/components/UEditor/table-align.ts
|
|
35964
|
+
var import_core17 = require("@tiptap/core");
|
|
35781
35965
|
var import_extension_table = require("@tiptap/extension-table");
|
|
35782
35966
|
var import_state7 = require("@tiptap/pm/state");
|
|
35783
35967
|
var import_tables3 = require("@tiptap/pm/tables");
|
|
@@ -35788,12 +35972,13 @@ var import_view2 = require("@tiptap/pm/view");
|
|
|
35788
35972
|
var import_tables2 = require("@tiptap/pm/tables");
|
|
35789
35973
|
var DEFAULT_TABLE_COLUMN_WIDTH = 100;
|
|
35790
35974
|
var MIN_RESIZED_TABLE_COLUMN_WIDTH = 25;
|
|
35791
|
-
function
|
|
35792
|
-
|
|
35975
|
+
function getColumnResizeMinWidth(configuredMinWidth) {
|
|
35976
|
+
const normalizedMinWidth = Number.isFinite(configuredMinWidth) && configuredMinWidth > 0 ? Math.round(configuredMinWidth) : MIN_RESIZED_TABLE_COLUMN_WIDTH;
|
|
35977
|
+
return Math.max(MIN_RESIZED_TABLE_COLUMN_WIDTH, normalizedMinWidth);
|
|
35793
35978
|
}
|
|
35794
35979
|
function setColumnStyle(column, width) {
|
|
35795
35980
|
if (width == null) {
|
|
35796
|
-
column.style.width =
|
|
35981
|
+
column.style.width = `${DEFAULT_TABLE_COLUMN_WIDTH}px`;
|
|
35797
35982
|
column.style.minWidth = `${DEFAULT_TABLE_COLUMN_WIDTH}px`;
|
|
35798
35983
|
return;
|
|
35799
35984
|
}
|
|
@@ -35805,7 +35990,6 @@ function isTableColumnElement(node) {
|
|
|
35805
35990
|
}
|
|
35806
35991
|
function updateDynamicColumns(node, colgroup, table, overrideCol, overrideValue) {
|
|
35807
35992
|
let totalWidth = 0;
|
|
35808
|
-
let fixedWidth = true;
|
|
35809
35993
|
let nextDOM = colgroup.firstChild;
|
|
35810
35994
|
const row = node.firstChild;
|
|
35811
35995
|
if (row) {
|
|
@@ -35815,9 +35999,6 @@ function updateDynamicColumns(node, colgroup, table, overrideCol, overrideValue)
|
|
|
35815
35999
|
const rawWidth = overrideCol === col ? overrideValue : colwidth?.[spanIndex];
|
|
35816
36000
|
const width = rawWidth ? Math.max(rawWidth, MIN_RESIZED_TABLE_COLUMN_WIDTH) : null;
|
|
35817
36001
|
totalWidth += width ?? DEFAULT_TABLE_COLUMN_WIDTH;
|
|
35818
|
-
if (!width) {
|
|
35819
|
-
fixedWidth = false;
|
|
35820
|
-
}
|
|
35821
36002
|
const colElement = isTableColumnElement(nextDOM) ? nextDOM : colgroup.appendChild(document.createElement("col"));
|
|
35822
36003
|
setColumnStyle(colElement, width);
|
|
35823
36004
|
nextDOM = colElement.nextSibling;
|
|
@@ -35830,11 +36011,10 @@ function updateDynamicColumns(node, colgroup, table, overrideCol, overrideValue)
|
|
|
35830
36011
|
nextDOM = after;
|
|
35831
36012
|
}
|
|
35832
36013
|
const hasUserWidth = typeof node.attrs.style === "string" && /\bwidth\s*:/i.test(node.attrs.style);
|
|
35833
|
-
if (
|
|
36014
|
+
if (!hasUserWidth) {
|
|
35834
36015
|
table.style.width = `${totalWidth}px`;
|
|
35835
36016
|
table.style.minWidth = "";
|
|
35836
36017
|
} else {
|
|
35837
|
-
table.style.width = "";
|
|
35838
36018
|
table.style.minWidth = `${totalWidth}px`;
|
|
35839
36019
|
}
|
|
35840
36020
|
}
|
|
@@ -35847,6 +36027,7 @@ var UEditorTableView = class {
|
|
|
35847
36027
|
if (node.attrs.style) {
|
|
35848
36028
|
this.table.style.cssText = node.attrs.style;
|
|
35849
36029
|
}
|
|
36030
|
+
this.table.style.tableLayout = "fixed";
|
|
35850
36031
|
this.colgroup = this.table.appendChild(document.createElement("colgroup"));
|
|
35851
36032
|
updateDynamicColumns(node, this.colgroup, this.table);
|
|
35852
36033
|
this.contentDOM = this.table.appendChild(document.createElement("tbody"));
|
|
@@ -36028,7 +36209,7 @@ function handleMouseDown(view, event, cellMinWidth) {
|
|
|
36028
36209
|
colspan: attrs.colspan ?? 1,
|
|
36029
36210
|
colwidth: attrs.colwidth
|
|
36030
36211
|
});
|
|
36031
|
-
const minWidth =
|
|
36212
|
+
const minWidth = getColumnResizeMinWidth(cellMinWidth);
|
|
36032
36213
|
const dragging = {
|
|
36033
36214
|
startX: event.clientX,
|
|
36034
36215
|
startWidth: width,
|
|
@@ -36157,15 +36338,37 @@ function parseTableAlign(element) {
|
|
|
36157
36338
|
function renderTableAlignStyle(tableAlign) {
|
|
36158
36339
|
switch (tableAlign) {
|
|
36159
36340
|
case "center":
|
|
36160
|
-
return "
|
|
36341
|
+
return "table-layout: fixed; margin-left: auto; margin-right: auto;";
|
|
36161
36342
|
case "right":
|
|
36162
|
-
return "
|
|
36343
|
+
return "table-layout: fixed; margin-left: auto; margin-right: 0;";
|
|
36163
36344
|
case "left":
|
|
36164
|
-
return "
|
|
36345
|
+
return "table-layout: fixed; margin-left: 0; margin-right: auto;";
|
|
36165
36346
|
default:
|
|
36166
36347
|
return "";
|
|
36167
36348
|
}
|
|
36168
36349
|
}
|
|
36350
|
+
function createUEditorColGroup(node) {
|
|
36351
|
+
const columns = [];
|
|
36352
|
+
let totalWidth = 0;
|
|
36353
|
+
const firstRow = node.firstChild;
|
|
36354
|
+
if (firstRow) {
|
|
36355
|
+
for (let cellIndex = 0; cellIndex < firstRow.childCount; cellIndex += 1) {
|
|
36356
|
+
const cell = firstRow.child(cellIndex);
|
|
36357
|
+
const colspan = Math.max(1, Number(cell.attrs.colspan) || 1);
|
|
36358
|
+
const colwidth = Array.isArray(cell.attrs.colwidth) ? cell.attrs.colwidth : [];
|
|
36359
|
+
for (let spanIndex = 0; spanIndex < colspan; spanIndex += 1) {
|
|
36360
|
+
const storedWidth = Number(colwidth[spanIndex]);
|
|
36361
|
+
const width = Number.isFinite(storedWidth) && storedWidth > 0 ? Math.max(MIN_RESIZED_TABLE_COLUMN_WIDTH, Math.round(storedWidth)) : DEFAULT_TABLE_COLUMN_WIDTH;
|
|
36362
|
+
totalWidth += width;
|
|
36363
|
+
columns.push(["col", { style: `width: ${width}px; min-width: ${width}px;`, width: String(width) }]);
|
|
36364
|
+
}
|
|
36365
|
+
}
|
|
36366
|
+
}
|
|
36367
|
+
return {
|
|
36368
|
+
colgroup: ["colgroup", {}, ...columns],
|
|
36369
|
+
tableWidth: totalWidth > 0 ? `${totalWidth}px` : ""
|
|
36370
|
+
};
|
|
36371
|
+
}
|
|
36169
36372
|
var UEditorTable = import_extension_table.Table.extend({
|
|
36170
36373
|
addGlobalAttributes() {
|
|
36171
36374
|
return [
|
|
@@ -36219,6 +36422,18 @@ var UEditorTable = import_extension_table.Table.extend({
|
|
|
36219
36422
|
}
|
|
36220
36423
|
};
|
|
36221
36424
|
},
|
|
36425
|
+
renderHTML({ node, HTMLAttributes }) {
|
|
36426
|
+
const { colgroup, tableWidth } = createUEditorColGroup(node);
|
|
36427
|
+
const table = [
|
|
36428
|
+
"table",
|
|
36429
|
+
(0, import_core17.mergeAttributes)(this.options.HTMLAttributes, HTMLAttributes, {
|
|
36430
|
+
style: tableWidth ? `width: ${tableWidth};` : "table-layout: fixed;"
|
|
36431
|
+
}),
|
|
36432
|
+
colgroup,
|
|
36433
|
+
["tbody", 0]
|
|
36434
|
+
];
|
|
36435
|
+
return this.options.renderWrapper ? ["div", { class: "tableWrapper" }, table] : table;
|
|
36436
|
+
},
|
|
36222
36437
|
addProseMirrorPlugins() {
|
|
36223
36438
|
const isResizable = this.options.resizable && this.editor.isEditable;
|
|
36224
36439
|
return [
|
|
@@ -36372,7 +36587,7 @@ var CodeBlockView = ({
|
|
|
36372
36587
|
};
|
|
36373
36588
|
|
|
36374
36589
|
// src/components/UEditor/optimized-lowlight.ts
|
|
36375
|
-
var
|
|
36590
|
+
var import_core18 = require("@tiptap/core");
|
|
36376
36591
|
var import_state8 = require("@tiptap/pm/state");
|
|
36377
36592
|
var import_view3 = require("@tiptap/pm/view");
|
|
36378
36593
|
function parseHighlightNodes(nodes, inheritedClasses = []) {
|
|
@@ -36419,7 +36634,7 @@ function buildLowlightDecorations({
|
|
|
36419
36634
|
nodeName
|
|
36420
36635
|
}) {
|
|
36421
36636
|
const decorations = [];
|
|
36422
|
-
for (const block of (0,
|
|
36637
|
+
for (const block of (0, import_core18.findChildren)(doc, (node) => node.type.name === nodeName)) {
|
|
36423
36638
|
let from = block.pos + 1;
|
|
36424
36639
|
const language = block.node.attrs.language || defaultLanguage;
|
|
36425
36640
|
const result = highlightCode(lowlight, language, block.node.textContent);
|
|
@@ -36560,7 +36775,7 @@ function createOptimizedLowlightPlugin({
|
|
|
36560
36775
|
}
|
|
36561
36776
|
|
|
36562
36777
|
// src/components/UEditor/table-formula-recalculation.ts
|
|
36563
|
-
var
|
|
36778
|
+
var import_core19 = require("@tiptap/core");
|
|
36564
36779
|
var import_state11 = require("@tiptap/pm/state");
|
|
36565
36780
|
|
|
36566
36781
|
// src/components/UEditor/table-formula-commands.ts
|
|
@@ -37584,7 +37799,7 @@ function recalculateAllTableFormulas(editor) {
|
|
|
37584
37799
|
}
|
|
37585
37800
|
|
|
37586
37801
|
// src/components/UEditor/table-formula-recalculation.ts
|
|
37587
|
-
var TableFormulaRecalculation =
|
|
37802
|
+
var TableFormulaRecalculation = import_core19.Extension.create({
|
|
37588
37803
|
name: "tableFormulaRecalculation",
|
|
37589
37804
|
addProseMirrorPlugins() {
|
|
37590
37805
|
return [
|
|
@@ -37615,6 +37830,21 @@ function getFormulaStateAttributes(attributes) {
|
|
|
37615
37830
|
"data-formula-state": computedValue.startsWith("#") ? "error" : "computed"
|
|
37616
37831
|
};
|
|
37617
37832
|
}
|
|
37833
|
+
function normalizeTableCellTextWrap(value) {
|
|
37834
|
+
return value === "nowrap" ? "nowrap" : "wrap";
|
|
37835
|
+
}
|
|
37836
|
+
function parseTableCellTextWrap(element) {
|
|
37837
|
+
if (element.getAttribute("data-text-wrap") === "nowrap" || element.style.whiteSpace === "nowrap") {
|
|
37838
|
+
return "nowrap";
|
|
37839
|
+
}
|
|
37840
|
+
return "wrap";
|
|
37841
|
+
}
|
|
37842
|
+
function renderTableCellTextWrap(attributes) {
|
|
37843
|
+
return normalizeTableCellTextWrap(attributes.textWrap) === "nowrap" ? { "data-text-wrap": "nowrap" } : {};
|
|
37844
|
+
}
|
|
37845
|
+
function getTableCellTextWrapStyle(value) {
|
|
37846
|
+
return normalizeTableCellTextWrap(value) === "nowrap" ? "white-space: nowrap; overflow-wrap: normal; word-break: normal" : "white-space: normal; overflow-wrap: anywhere; word-break: normal";
|
|
37847
|
+
}
|
|
37618
37848
|
var CustomTableCell = import_extension_table_cell.TableCell.extend({
|
|
37619
37849
|
addAttributes() {
|
|
37620
37850
|
return {
|
|
@@ -37715,6 +37945,11 @@ var CustomTableCell = import_extension_table_cell.TableCell.extend({
|
|
|
37715
37945
|
default: null,
|
|
37716
37946
|
parseHTML: (element) => element.getAttribute("data-text-direction") === "vertical" || ["sideways-lr", "vertical-lr", "vertical-rl"].includes(element.style.writingMode) ? "vertical" : null,
|
|
37717
37947
|
renderHTML: (attributes) => attributes.textDirection === "vertical" ? { "data-text-direction": "vertical" } : {}
|
|
37948
|
+
},
|
|
37949
|
+
textWrap: {
|
|
37950
|
+
default: "wrap",
|
|
37951
|
+
parseHTML: parseTableCellTextWrap,
|
|
37952
|
+
renderHTML: renderTableCellTextWrap
|
|
37718
37953
|
}
|
|
37719
37954
|
};
|
|
37720
37955
|
},
|
|
@@ -37726,6 +37961,7 @@ var CustomTableCell = import_extension_table_cell.TableCell.extend({
|
|
|
37726
37961
|
const borderWidth = HTMLAttributes["data-border-width"];
|
|
37727
37962
|
const verticalAlign = HTMLAttributes["data-vertical-align"];
|
|
37728
37963
|
const textDirection = HTMLAttributes["data-text-direction"];
|
|
37964
|
+
const textWrap = HTMLAttributes["data-text-wrap"];
|
|
37729
37965
|
let mergedStyle = style;
|
|
37730
37966
|
if (bg) mergedStyle += `; background-color: ${bg}`;
|
|
37731
37967
|
if (borderColor) mergedStyle += `; border-color: ${borderColor}`;
|
|
@@ -37733,10 +37969,11 @@ var CustomTableCell = import_extension_table_cell.TableCell.extend({
|
|
|
37733
37969
|
if (borderWidth) mergedStyle += `; border-width: ${borderWidth}`;
|
|
37734
37970
|
if (verticalAlign) mergedStyle += `; vertical-align: ${verticalAlign}`;
|
|
37735
37971
|
if (textDirection === "vertical") mergedStyle += "; writing-mode: sideways-lr; text-orientation: mixed";
|
|
37972
|
+
mergedStyle += `; ${getTableCellTextWrapStyle(textWrap)}`;
|
|
37736
37973
|
mergedStyle = mergedStyle.replace(/^;/, "").trim();
|
|
37737
37974
|
return [
|
|
37738
37975
|
"td",
|
|
37739
|
-
(0,
|
|
37976
|
+
(0, import_core20.mergeAttributes)(this.options.HTMLAttributes, HTMLAttributes, getFormulaStateAttributes(HTMLAttributes), mergedStyle ? { style: mergedStyle } : {}),
|
|
37740
37977
|
0
|
|
37741
37978
|
];
|
|
37742
37979
|
}
|
|
@@ -37841,6 +38078,11 @@ var CustomTableHeader = import_extension_table_header.TableHeader.extend({
|
|
|
37841
38078
|
default: null,
|
|
37842
38079
|
parseHTML: (element) => element.getAttribute("data-text-direction") === "vertical" || ["sideways-lr", "vertical-lr", "vertical-rl"].includes(element.style.writingMode) ? "vertical" : null,
|
|
37843
38080
|
renderHTML: (attributes) => attributes.textDirection === "vertical" ? { "data-text-direction": "vertical" } : {}
|
|
38081
|
+
},
|
|
38082
|
+
textWrap: {
|
|
38083
|
+
default: "wrap",
|
|
38084
|
+
parseHTML: parseTableCellTextWrap,
|
|
38085
|
+
renderHTML: renderTableCellTextWrap
|
|
37844
38086
|
}
|
|
37845
38087
|
};
|
|
37846
38088
|
},
|
|
@@ -37852,6 +38094,7 @@ var CustomTableHeader = import_extension_table_header.TableHeader.extend({
|
|
|
37852
38094
|
const borderWidth = HTMLAttributes["data-border-width"];
|
|
37853
38095
|
const verticalAlign = HTMLAttributes["data-vertical-align"];
|
|
37854
38096
|
const textDirection = HTMLAttributes["data-text-direction"];
|
|
38097
|
+
const textWrap = HTMLAttributes["data-text-wrap"];
|
|
37855
38098
|
let mergedStyle = style;
|
|
37856
38099
|
if (bg) mergedStyle += `; background-color: ${bg}`;
|
|
37857
38100
|
if (borderColor) mergedStyle += `; border-color: ${borderColor}`;
|
|
@@ -37859,10 +38102,11 @@ var CustomTableHeader = import_extension_table_header.TableHeader.extend({
|
|
|
37859
38102
|
if (borderWidth) mergedStyle += `; border-width: ${borderWidth}`;
|
|
37860
38103
|
if (verticalAlign) mergedStyle += `; vertical-align: ${verticalAlign}`;
|
|
37861
38104
|
if (textDirection === "vertical") mergedStyle += "; writing-mode: sideways-lr; text-orientation: mixed";
|
|
38105
|
+
mergedStyle += `; ${getTableCellTextWrapStyle(textWrap)}`;
|
|
37862
38106
|
mergedStyle = mergedStyle.replace(/^;/, "").trim();
|
|
37863
38107
|
return [
|
|
37864
38108
|
"th",
|
|
37865
|
-
(0,
|
|
38109
|
+
(0, import_core20.mergeAttributes)(this.options.HTMLAttributes, HTMLAttributes, getFormulaStateAttributes(HTMLAttributes), mergedStyle ? { style: mergedStyle } : {}),
|
|
37866
38110
|
0
|
|
37867
38111
|
];
|
|
37868
38112
|
}
|
|
@@ -37870,15 +38114,15 @@ var CustomTableHeader = import_extension_table_header.TableHeader.extend({
|
|
|
37870
38114
|
var CustomTaskList = import_extension_task_list.TaskList.extend({
|
|
37871
38115
|
addInputRules() {
|
|
37872
38116
|
return [
|
|
37873
|
-
(0,
|
|
38117
|
+
(0, import_core21.wrappingInputRule)({
|
|
37874
38118
|
find: /^\s*(\[ \]|\[\])\s$/,
|
|
37875
38119
|
type: this.type
|
|
37876
38120
|
}),
|
|
37877
|
-
(0,
|
|
38121
|
+
(0, import_core21.wrappingInputRule)({
|
|
37878
38122
|
find: /^\s*(-\s*\[ \]|-\s*\[\])\s$/,
|
|
37879
38123
|
type: this.type
|
|
37880
38124
|
}),
|
|
37881
|
-
(0,
|
|
38125
|
+
(0, import_core21.wrappingInputRule)({
|
|
37882
38126
|
find: /^\s*(\*\s*\[ \]|-\s*\[\])\s$/,
|
|
37883
38127
|
type: this.type
|
|
37884
38128
|
})
|
|
@@ -38024,7 +38268,8 @@ function buildUEditorExtensions({
|
|
|
38024
38268
|
handleWidth: 10,
|
|
38025
38269
|
allowTableNodeSelection: true,
|
|
38026
38270
|
HTMLAttributes: {
|
|
38027
|
-
class: "border-collapse my-4"
|
|
38271
|
+
class: "border-collapse my-4",
|
|
38272
|
+
style: "table-layout: fixed;"
|
|
38028
38273
|
}
|
|
38029
38274
|
}),
|
|
38030
38275
|
table_row_default,
|
|
@@ -38437,6 +38682,7 @@ var BubbleMenuContent = ({
|
|
|
38437
38682
|
const [activeBorderPosition, setActiveBorderPosition] = (0, import_react75.useState)("all");
|
|
38438
38683
|
const currentCellVerticalAlign = normalizeStyleValue(editor.getAttributes("tableCell").verticalAlign || editor.getAttributes("tableHeader").verticalAlign) || "";
|
|
38439
38684
|
const currentCellTextDirection = normalizeStyleValue(editor.getAttributes("tableCell").textDirection || editor.getAttributes("tableHeader").textDirection) || "horizontal";
|
|
38685
|
+
const currentCellTextWrap = normalizeStyleValue(editor.getAttributes("tableCell").textWrap || editor.getAttributes("tableHeader").textWrap) || "wrap";
|
|
38440
38686
|
const isInTable3 = (0, import_tables8.isInTable)(editor.state);
|
|
38441
38687
|
const canMergeCells = isInTable3 && editor.can().mergeCells();
|
|
38442
38688
|
const canSplitCell = isInTable3 && editor.can().splitCell();
|
|
@@ -39097,6 +39343,20 @@ var BubbleMenuContent = ({
|
|
|
39097
39343
|
children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_lucide_react53.TableCellsMerge, { className: "w-4 h-4" })
|
|
39098
39344
|
}
|
|
39099
39345
|
),
|
|
39346
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
39347
|
+
ToolbarButton,
|
|
39348
|
+
{
|
|
39349
|
+
onClick: () => applyTableCellAttribute2(
|
|
39350
|
+
editor,
|
|
39351
|
+
"textWrap",
|
|
39352
|
+
currentCellTextWrap === "nowrap" ? "wrap" : "nowrap",
|
|
39353
|
+
{ focus: false }
|
|
39354
|
+
),
|
|
39355
|
+
active: currentCellTextWrap !== "nowrap",
|
|
39356
|
+
title: currentCellTextWrap === "nowrap" ? t("tableMenu.wrapText") : t("tableMenu.noWrapText"),
|
|
39357
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_lucide_react53.WrapText, { className: "h-4 w-4" })
|
|
39358
|
+
}
|
|
39359
|
+
),
|
|
39100
39360
|
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(
|
|
39101
39361
|
DropdownMenu,
|
|
39102
39362
|
{
|
|
@@ -47588,17 +47848,20 @@ function getUnderverseMessages(locale = "en") {
|
|
|
47588
47848
|
Popover,
|
|
47589
47849
|
Progress,
|
|
47590
47850
|
PulseBadge,
|
|
47851
|
+
RadioButtonGroup,
|
|
47591
47852
|
RadioGroup,
|
|
47592
47853
|
RadioGroupItem,
|
|
47593
47854
|
SIZE_STYLES_BTN,
|
|
47594
47855
|
ScrollArea,
|
|
47595
47856
|
SearchInput,
|
|
47596
47857
|
Section,
|
|
47858
|
+
SegmentedControl,
|
|
47597
47859
|
SegmentedProgress,
|
|
47598
47860
|
SelectDropdown,
|
|
47599
47861
|
Sheet,
|
|
47600
47862
|
SidebarSheet,
|
|
47601
47863
|
SimplePagination,
|
|
47864
|
+
SimpleRadioGroup,
|
|
47602
47865
|
SimpleTabs,
|
|
47603
47866
|
Skeleton,
|
|
47604
47867
|
SkeletonAvatar,
|
|
@@ -47635,6 +47898,7 @@ function getUnderverseMessages(locale = "en") {
|
|
|
47635
47898
|
Timeline,
|
|
47636
47899
|
TimelineItem,
|
|
47637
47900
|
ToastProvider,
|
|
47901
|
+
ToggleGroup,
|
|
47638
47902
|
Tooltip,
|
|
47639
47903
|
TranslationProvider,
|
|
47640
47904
|
UEditor,
|