@underverse-ui/underverse 1.0.187 → 1.0.189
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/index.cjs +212 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +42 -0
- package/dist/index.d.ts +42 -0
- package/dist/index.js +225 -21
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/api-reference.json
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -1003,6 +1003,8 @@ var en_default = {
|
|
|
1003
1003
|
fileCardDesc: "Upload a file card attachment",
|
|
1004
1004
|
formCheckbox: "Form Checkbox",
|
|
1005
1005
|
formCheckboxDesc: "Insert an interactive checkbox field",
|
|
1006
|
+
roundCheckbox: "Round Checkbox",
|
|
1007
|
+
roundCheckboxDesc: "Insert a circular interactive checkbox",
|
|
1006
1008
|
formRadio: "Form Radio Button",
|
|
1007
1009
|
formRadioDesc: "Insert an interactive radio button field"
|
|
1008
1010
|
},
|
|
@@ -1102,7 +1104,10 @@ var en_default = {
|
|
|
1102
1104
|
alignVertical: "Vertical Alignment",
|
|
1103
1105
|
alignVerticalTop: "Top Align",
|
|
1104
1106
|
alignVerticalMiddle: "Middle Align",
|
|
1105
|
-
alignVerticalBottom: "Bottom Align"
|
|
1107
|
+
alignVerticalBottom: "Bottom Align",
|
|
1108
|
+
textDirection: "Text Direction",
|
|
1109
|
+
horizontalText: "Horizontal Text",
|
|
1110
|
+
verticalText: "Vertical Text"
|
|
1106
1111
|
},
|
|
1107
1112
|
callout: {
|
|
1108
1113
|
selectEmoji: "Select Emoji",
|
|
@@ -1431,6 +1436,8 @@ var vi_default = {
|
|
|
1431
1436
|
fileCardDesc: "T\u1EA3i l\xEAn t\u1EC7p tin \u0111\xEDnh k\xE8m",
|
|
1432
1437
|
formCheckbox: "Checkbox bi\u1EC3u m\u1EABu",
|
|
1433
1438
|
formCheckboxDesc: "Th\xEAm \xF4 checkbox bi\u1EC3u m\u1EABu",
|
|
1439
|
+
roundCheckbox: "Checkbox tr\xF2n",
|
|
1440
|
+
roundCheckboxDesc: "Th\xEAm checkbox t\u01B0\u01A1ng t\xE1c h\xECnh tr\xF2n",
|
|
1434
1441
|
formRadio: "Radio bi\u1EC3u m\u1EABu",
|
|
1435
1442
|
formRadioDesc: "Th\xEAm n\xFAt ch\u1ECDn m\u1ED9t (Radio) bi\u1EC3u m\u1EABu"
|
|
1436
1443
|
},
|
|
@@ -1530,7 +1537,10 @@ var vi_default = {
|
|
|
1530
1537
|
alignVertical: "C\u0103n l\u1EC1 d\u1ECDc",
|
|
1531
1538
|
alignVerticalTop: "C\u0103n tr\xEAn",
|
|
1532
1539
|
alignVerticalMiddle: "C\u0103n gi\u1EEFa",
|
|
1533
|
-
alignVerticalBottom: "C\u0103n d\u01B0\u1EDBi"
|
|
1540
|
+
alignVerticalBottom: "C\u0103n d\u01B0\u1EDBi",
|
|
1541
|
+
textDirection: "H\u01B0\u1EDBng ch\u1EEF",
|
|
1542
|
+
horizontalText: "Ch\u1EEF ngang",
|
|
1543
|
+
verticalText: "Ch\u1EEF d\u1ECDc"
|
|
1534
1544
|
},
|
|
1535
1545
|
callout: {
|
|
1536
1546
|
selectEmoji: "Ch\u1ECDn Bi\u1EC3u t\u01B0\u1EE3ng",
|
|
@@ -1859,6 +1869,8 @@ var ko_default = {
|
|
|
1859
1869
|
fileCardDesc: "\uD30C\uC77C \uCE74\uB4DC \uCCA8\uBD80 \uD30C\uC77C\uC744 \uC5C5\uB85C\uB4DC\uD569\uB2C8\uB2E4",
|
|
1860
1870
|
formCheckbox: "\uC591\uC2DD \uCCB4\uD06C\uBC15\uC2A4",
|
|
1861
1871
|
formCheckboxDesc: "\uB300\uD654\uD615 \uCCB4\uD06C\uBC15\uC2A4 \uD544\uB4DC \uC0BD\uC785",
|
|
1872
|
+
roundCheckbox: "\uC6D0\uD615 \uCCB4\uD06C\uBC15\uC2A4",
|
|
1873
|
+
roundCheckboxDesc: "\uC6D0\uD615 \uB300\uD654\uD615 \uCCB4\uD06C\uBC15\uC2A4 \uC0BD\uC785",
|
|
1862
1874
|
formRadio: "\uC591\uC2DD \uB77C\uB514\uC624 \uBC84\uD2BC",
|
|
1863
1875
|
formRadioDesc: "\uB300\uD654\uD615 \uB77C\uB514\uC624 \uBC84\uD2BC \uD544\uB4DC \uC0BD\uC785"
|
|
1864
1876
|
},
|
|
@@ -1958,7 +1970,10 @@ var ko_default = {
|
|
|
1958
1970
|
alignVertical: "\uC138\uB85C \uB9DE\uCDA4",
|
|
1959
1971
|
alignVerticalTop: "\uC704\uCABD \uB9DE\uCDA4",
|
|
1960
1972
|
alignVerticalMiddle: "\uAC00\uC6B4\uB370 \uB9DE\uCDA4",
|
|
1961
|
-
alignVerticalBottom: "\uC544\uB798\uCABD \uB9DE\uCDA4"
|
|
1973
|
+
alignVerticalBottom: "\uC544\uB798\uCABD \uB9DE\uCDA4",
|
|
1974
|
+
textDirection: "\uD14D\uC2A4\uD2B8 \uBC29\uD5A5",
|
|
1975
|
+
horizontalText: "\uAC00\uB85C\uC4F0\uAE30",
|
|
1976
|
+
verticalText: "\uC138\uB85C\uC4F0\uAE30"
|
|
1962
1977
|
},
|
|
1963
1978
|
callout: {
|
|
1964
1979
|
selectEmoji: "\uC774\uBAA8\uC9C0 \uC120\uD0DD",
|
|
@@ -2287,6 +2302,8 @@ var ja_default = {
|
|
|
2287
2302
|
fileCardDesc: "\u30D5\u30A1\u30A4\u30EB\u30AB\u30FC\u30C9\u306E\u6DFB\u4ED8\u30D5\u30A1\u30A4\u30EB\u3092\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3057\u307E\u3059",
|
|
2288
2303
|
formCheckbox: "\u30D5\u30A9\u30FC\u30E0\u30C1\u30A7\u30C3\u30AF\u30DC\u30C3\u30AF\u30B9",
|
|
2289
2304
|
formCheckboxDesc: "\u30A4\u30F3\u30BF\u30E9\u30AF\u30C6\u30A3\u30D6\u306A\u30C1\u30A7\u30C3\u30AF\u30DC\u30C3\u30AF\u30B9\u3092\u633F\u5165\u3057\u307E\u3059",
|
|
2305
|
+
roundCheckbox: "\u4E38\u578B\u30C1\u30A7\u30C3\u30AF\u30DC\u30C3\u30AF\u30B9",
|
|
2306
|
+
roundCheckboxDesc: "\u4E38\u578B\u306E\u30A4\u30F3\u30BF\u30E9\u30AF\u30C6\u30A3\u30D6\u306A\u30C1\u30A7\u30C3\u30AF\u30DC\u30C3\u30AF\u30B9\u3092\u633F\u5165\u3057\u307E\u3059",
|
|
2290
2307
|
formRadio: "\u30D5\u30A9\u30FC\u30E0\u30E9\u30B8\u30AA\u30DC\u30BF\u30F3",
|
|
2291
2308
|
formRadioDesc: "\u30A4\u30F3\u30BF\u30E9\u30AF\u30C6\u30A3\u30D6\u306A\u30E9\u30B8\u30AA\u30DC\u30BF\u30F3\u3092\u633F\u5165\u3057\u307E\u3059"
|
|
2292
2309
|
},
|
|
@@ -2386,7 +2403,10 @@ var ja_default = {
|
|
|
2386
2403
|
alignVertical: "\u5782\u76F4\u63C3\u3048",
|
|
2387
2404
|
alignVerticalTop: "\u4E0A\u63C3\u3048",
|
|
2388
2405
|
alignVerticalMiddle: "\u4E0A\u4E0B\u4E2D\u592E\u63C3\u3048",
|
|
2389
|
-
alignVerticalBottom: "\u4E0B\u63C3\u3048"
|
|
2406
|
+
alignVerticalBottom: "\u4E0B\u63C3\u3048",
|
|
2407
|
+
textDirection: "\u6587\u5B57\u65B9\u5411",
|
|
2408
|
+
horizontalText: "\u6A2A\u66F8\u304D",
|
|
2409
|
+
verticalText: "\u7E26\u66F8\u304D"
|
|
2390
2410
|
},
|
|
2391
2411
|
callout: {
|
|
2392
2412
|
selectEmoji: "\u7D75\u6587\u5B57\u3092\u9078\u629E",
|
|
@@ -25839,7 +25859,8 @@ function DataTableHeader({
|
|
|
25839
25859
|
const columnLabel = getColumnLabel(col.title) || col.key;
|
|
25840
25860
|
const sortByText = sortByLabel ?? gi18n.sortBy ?? "Sort by";
|
|
25841
25861
|
const sortLabel = `${sortByText} ${columnLabel}`;
|
|
25842
|
-
const
|
|
25862
|
+
const useEndIcon = col.iconPosition === "end";
|
|
25863
|
+
const titleContent = /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: cn("flex items-center gap-1", useEndIcon && "flex-1 justify-between"), children: [
|
|
25843
25864
|
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { className: cn("font-medium whitespace-nowrap select-text", headerTitleClass), children: col.title }),
|
|
25844
25865
|
col.sortable && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
25845
25866
|
Tooltip,
|
|
@@ -25852,8 +25873,8 @@ function DataTableHeader({
|
|
|
25852
25873
|
type: "button",
|
|
25853
25874
|
title: sortLabel,
|
|
25854
25875
|
className: cn(
|
|
25855
|
-
"p-1 rounded-lg transition-all duration-200 hover:bg-
|
|
25856
|
-
sort?.key === col.key ? "opacity-100 bg-
|
|
25876
|
+
"p-1 rounded-lg transition-all duration-200 hover:bg-foreground/10",
|
|
25877
|
+
sort?.key === col.key ? "opacity-100 bg-foreground/10" : "opacity-60 hover:opacity-100"
|
|
25857
25878
|
),
|
|
25858
25879
|
onClick: () => {
|
|
25859
25880
|
setCurPage(1);
|
|
@@ -25868,7 +25889,7 @@ function DataTableHeader({
|
|
|
25868
25889
|
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
25869
25890
|
"path",
|
|
25870
25891
|
{
|
|
25871
|
-
d: "
|
|
25892
|
+
d: "M5 7.5l5-5 5 5",
|
|
25872
25893
|
stroke: "currentColor",
|
|
25873
25894
|
strokeWidth: "1.5",
|
|
25874
25895
|
strokeLinecap: "round",
|
|
@@ -25879,7 +25900,7 @@ function DataTableHeader({
|
|
|
25879
25900
|
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
25880
25901
|
"path",
|
|
25881
25902
|
{
|
|
25882
|
-
d: "
|
|
25903
|
+
d: "M5 12.5l5 5 5-5",
|
|
25883
25904
|
stroke: "currentColor",
|
|
25884
25905
|
strokeWidth: "1.5",
|
|
25885
25906
|
strokeLinecap: "round",
|
|
@@ -25908,8 +25929,8 @@ function DataTableHeader({
|
|
|
25908
25929
|
type: "button",
|
|
25909
25930
|
title: gi18n.filterByColumn ? gi18n.filterByColumn(columnLabel) : `Filter by ${columnLabel}`,
|
|
25910
25931
|
className: cn(
|
|
25911
|
-
"p-1.5 rounded-lg transition-all duration-200 hover:bg-
|
|
25912
|
-
filters[col.key] ? "bg-
|
|
25932
|
+
"p-1.5 rounded-lg transition-all duration-200 hover:bg-foreground/10",
|
|
25933
|
+
filters[col.key] ? "bg-foreground/10 opacity-100" : "opacity-60 hover:opacity-100"
|
|
25913
25934
|
),
|
|
25914
25935
|
"aria-label": gi18n.filterByColumn ? gi18n.filterByColumn(columnLabel) : `Filter by ${columnLabel}`,
|
|
25915
25936
|
children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_lucide_react38.Filter, { className: "w-4 h-4" })
|
|
@@ -25944,7 +25965,8 @@ function DataTableHeader({
|
|
|
25944
25965
|
headerMinHeightClass,
|
|
25945
25966
|
isRightAlign && "justify-end",
|
|
25946
25967
|
isCenterAlign && "justify-center",
|
|
25947
|
-
!isRightAlign && !isCenterAlign && "justify-start"
|
|
25968
|
+
!isRightAlign && !isCenterAlign && "justify-start",
|
|
25969
|
+
useEndIcon && "w-full"
|
|
25948
25970
|
),
|
|
25949
25971
|
children: isRightAlign ? /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(import_jsx_runtime68.Fragment, { children: [
|
|
25950
25972
|
filterContent,
|
|
@@ -28379,6 +28401,7 @@ var import_lucide_react45 = require("lucide-react");
|
|
|
28379
28401
|
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
28380
28402
|
var FormCheckboxView = ({ node, updateAttributes, editor, selected }) => {
|
|
28381
28403
|
const isChecked = !!node.attrs.checked;
|
|
28404
|
+
const isCircle = node.attrs.variant === "circle";
|
|
28382
28405
|
const isEditable = editor.isEditable;
|
|
28383
28406
|
const handleToggle = (e) => {
|
|
28384
28407
|
if (!isEditable) return;
|
|
@@ -28408,7 +28431,8 @@ var FormCheckboxView = ({ node, updateAttributes, editor, selected }) => {
|
|
|
28408
28431
|
onClick: handleToggle,
|
|
28409
28432
|
onKeyDown: handleKeyDown2,
|
|
28410
28433
|
className: cn(
|
|
28411
|
-
"flex items-center justify-center w-5 h-5
|
|
28434
|
+
"flex items-center justify-center w-5 h-5 border text-primary-foreground transition-all duration-200 outline-none",
|
|
28435
|
+
isCircle ? "rounded-full" : "rounded-md",
|
|
28412
28436
|
isChecked ? "bg-primary border-primary scale-100" : "bg-background border-border/70 hover:border-primary/50",
|
|
28413
28437
|
selected && "ring-2 ring-primary/30 ring-offset-1",
|
|
28414
28438
|
isEditable && "focus-visible:ring-2 focus-visible:ring-primary/45 focus-visible:ring-offset-1 focus-visible:border-primary"
|
|
@@ -28480,6 +28504,11 @@ var FormCheckbox2 = import_core4.Node.create({
|
|
|
28480
28504
|
name: attributes.name
|
|
28481
28505
|
};
|
|
28482
28506
|
}
|
|
28507
|
+
},
|
|
28508
|
+
variant: {
|
|
28509
|
+
default: "square",
|
|
28510
|
+
parseHTML: (element) => element.getAttribute("data-variant") === "circle" ? "circle" : "square",
|
|
28511
|
+
renderHTML: (attributes) => attributes.variant === "circle" ? { "data-variant": "circle" } : {}
|
|
28483
28512
|
}
|
|
28484
28513
|
};
|
|
28485
28514
|
},
|
|
@@ -28816,6 +28845,8 @@ var DEFAULT_MESSAGES = {
|
|
|
28816
28845
|
fileCardDesc: "Upload a file card attachment",
|
|
28817
28846
|
formCheckbox: "Form Checkbox",
|
|
28818
28847
|
formCheckboxDesc: "Insert an interactive checkbox field",
|
|
28848
|
+
roundCheckbox: "Round Checkbox",
|
|
28849
|
+
roundCheckboxDesc: "Insert a circular interactive checkbox",
|
|
28819
28850
|
formRadio: "Form Radio Button",
|
|
28820
28851
|
formRadioDesc: "Insert an interactive radio button field"
|
|
28821
28852
|
};
|
|
@@ -28871,6 +28902,8 @@ function buildSlashCommandMessages(translate) {
|
|
|
28871
28902
|
fileCardDesc: translate("slashCommand.fileCardDesc") || "Upload a file card attachment",
|
|
28872
28903
|
formCheckbox: translate("slashCommand.formCheckbox") || "Form Checkbox",
|
|
28873
28904
|
formCheckboxDesc: translate("slashCommand.formCheckboxDesc") || "Insert an interactive checkbox field",
|
|
28905
|
+
roundCheckbox: translate("slashCommand.roundCheckbox") || "Round Checkbox",
|
|
28906
|
+
roundCheckboxDesc: translate("slashCommand.roundCheckboxDesc") || "Insert a circular interactive checkbox",
|
|
28874
28907
|
formRadio: translate("slashCommand.formRadio") || "Form Radio Button",
|
|
28875
28908
|
formRadioDesc: translate("slashCommand.formRadioDesc") || "Insert an interactive radio button field"
|
|
28876
28909
|
};
|
|
@@ -29017,10 +29050,20 @@ function buildSlashCommandItems({
|
|
|
29017
29050
|
icon: import_lucide_react47.CheckSquare,
|
|
29018
29051
|
title: messages.formCheckbox,
|
|
29019
29052
|
description: messages.formCheckboxDesc,
|
|
29053
|
+
searchTerms: ["checkbox", "square checkbox"],
|
|
29020
29054
|
command: run(({ editor, range }) => {
|
|
29021
29055
|
getCommandChain(editor, range).setFormCheckbox().run();
|
|
29022
29056
|
})
|
|
29023
29057
|
},
|
|
29058
|
+
{
|
|
29059
|
+
icon: import_lucide_react47.CircleCheckBig,
|
|
29060
|
+
title: messages.roundCheckbox,
|
|
29061
|
+
description: messages.roundCheckboxDesc,
|
|
29062
|
+
searchTerms: ["roundcheckbox", "round checkbox", "circle checkbox"],
|
|
29063
|
+
command: run(({ editor, range }) => {
|
|
29064
|
+
getCommandChain(editor, range).setFormCheckbox({ variant: "circle" }).run();
|
|
29065
|
+
})
|
|
29066
|
+
},
|
|
29024
29067
|
{
|
|
29025
29068
|
icon: import_lucide_react47.CircleDot,
|
|
29026
29069
|
title: messages.formRadio,
|
|
@@ -29029,7 +29072,11 @@ function buildSlashCommandItems({
|
|
|
29029
29072
|
getCommandChain(editor, range).setFormRadio({ name: `radio-group-${Math.random().toString(36).substring(2, 6)}` }).run();
|
|
29030
29073
|
})
|
|
29031
29074
|
}
|
|
29032
|
-
].filter((item) =>
|
|
29075
|
+
].filter((item) => {
|
|
29076
|
+
const normalizedQuery = query.trim().toLowerCase();
|
|
29077
|
+
if (!normalizedQuery) return true;
|
|
29078
|
+
return [item.title, item.description, ...item.searchTerms ?? []].some((value) => value.toLowerCase().includes(normalizedQuery));
|
|
29079
|
+
});
|
|
29033
29080
|
}
|
|
29034
29081
|
var SlashCommandList = (0, import_react58.forwardRef)((props, ref) => {
|
|
29035
29082
|
const [selectedIndex, setSelectedIndex] = useResettingIndex2(props.items);
|
|
@@ -31827,6 +31874,11 @@ var CustomTableCell = import_extension_table_cell.default.extend({
|
|
|
31827
31874
|
"data-vertical-align": attributes.verticalAlign
|
|
31828
31875
|
};
|
|
31829
31876
|
}
|
|
31877
|
+
},
|
|
31878
|
+
textDirection: {
|
|
31879
|
+
default: null,
|
|
31880
|
+
parseHTML: (element) => element.getAttribute("data-text-direction") === "vertical" || element.style.writingMode === "vertical-rl" ? "vertical" : null,
|
|
31881
|
+
renderHTML: (attributes) => attributes.textDirection === "vertical" ? { "data-text-direction": "vertical" } : {}
|
|
31830
31882
|
}
|
|
31831
31883
|
};
|
|
31832
31884
|
},
|
|
@@ -31837,12 +31889,14 @@ var CustomTableCell = import_extension_table_cell.default.extend({
|
|
|
31837
31889
|
const borderStyle = HTMLAttributes["data-border-style"];
|
|
31838
31890
|
const borderWidth = HTMLAttributes["data-border-width"];
|
|
31839
31891
|
const verticalAlign = HTMLAttributes["data-vertical-align"];
|
|
31892
|
+
const textDirection = HTMLAttributes["data-text-direction"];
|
|
31840
31893
|
let mergedStyle = style;
|
|
31841
31894
|
if (bg) mergedStyle += `; background-color: ${bg}`;
|
|
31842
31895
|
if (borderColor) mergedStyle += `; border-color: ${borderColor}`;
|
|
31843
31896
|
if (borderStyle) mergedStyle += `; border-style: ${borderStyle}`;
|
|
31844
31897
|
if (borderWidth) mergedStyle += `; border-width: ${borderWidth}`;
|
|
31845
31898
|
if (verticalAlign) mergedStyle += `; vertical-align: ${verticalAlign}`;
|
|
31899
|
+
if (textDirection === "vertical") mergedStyle += "; writing-mode: vertical-rl; text-orientation: mixed";
|
|
31846
31900
|
mergedStyle = mergedStyle.replace(/^;/, "").trim();
|
|
31847
31901
|
return [
|
|
31848
31902
|
"td",
|
|
@@ -31946,6 +32000,11 @@ var CustomTableHeader = import_extension_table_header.default.extend({
|
|
|
31946
32000
|
"data-vertical-align": attributes.verticalAlign
|
|
31947
32001
|
};
|
|
31948
32002
|
}
|
|
32003
|
+
},
|
|
32004
|
+
textDirection: {
|
|
32005
|
+
default: null,
|
|
32006
|
+
parseHTML: (element) => element.getAttribute("data-text-direction") === "vertical" || element.style.writingMode === "vertical-rl" ? "vertical" : null,
|
|
32007
|
+
renderHTML: (attributes) => attributes.textDirection === "vertical" ? { "data-text-direction": "vertical" } : {}
|
|
31949
32008
|
}
|
|
31950
32009
|
};
|
|
31951
32010
|
},
|
|
@@ -31956,12 +32015,14 @@ var CustomTableHeader = import_extension_table_header.default.extend({
|
|
|
31956
32015
|
const borderStyle = HTMLAttributes["data-border-style"];
|
|
31957
32016
|
const borderWidth = HTMLAttributes["data-border-width"];
|
|
31958
32017
|
const verticalAlign = HTMLAttributes["data-vertical-align"];
|
|
32018
|
+
const textDirection = HTMLAttributes["data-text-direction"];
|
|
31959
32019
|
let mergedStyle = style;
|
|
31960
32020
|
if (bg) mergedStyle += `; background-color: ${bg}`;
|
|
31961
32021
|
if (borderColor) mergedStyle += `; border-color: ${borderColor}`;
|
|
31962
32022
|
if (borderStyle) mergedStyle += `; border-style: ${borderStyle}`;
|
|
31963
32023
|
if (borderWidth) mergedStyle += `; border-width: ${borderWidth}`;
|
|
31964
32024
|
if (verticalAlign) mergedStyle += `; vertical-align: ${verticalAlign}`;
|
|
32025
|
+
if (textDirection === "vertical") mergedStyle += "; writing-mode: vertical-rl; text-orientation: mixed";
|
|
31965
32026
|
mergedStyle = mergedStyle.replace(/^;/, "").trim();
|
|
31966
32027
|
return [
|
|
31967
32028
|
"th",
|
|
@@ -33164,6 +33225,7 @@ var EditorToolbar = ({
|
|
|
33164
33225
|
const canMergeCells = hasTableContext && editor.can().mergeCells();
|
|
33165
33226
|
const canSplitCell = hasTableContext && editor.can().splitCell();
|
|
33166
33227
|
const currentCellVerticalAlign = normalizeStyleValue(editor.getAttributes("tableCell").verticalAlign || editor.getAttributes("tableHeader").verticalAlign) || "";
|
|
33228
|
+
const currentCellTextDirection = normalizeStyleValue(editor.getAttributes("tableCell").textDirection || editor.getAttributes("tableHeader").textDirection) || "horizontal";
|
|
33167
33229
|
const currentFontFamily = normalizeStyleValue(textStyleAttrs.fontFamily);
|
|
33168
33230
|
const currentFontSize = normalizeStyleValue(textStyleAttrs.fontSize);
|
|
33169
33231
|
const currentTextColor = normalizeStyleValue(textStyleAttrs.color) || "inherit";
|
|
@@ -33225,6 +33287,34 @@ var EditorToolbar = ({
|
|
|
33225
33287
|
children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_lucide_react53.List, { className: "w-4 h-4" })
|
|
33226
33288
|
}
|
|
33227
33289
|
),
|
|
33290
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(
|
|
33291
|
+
DropdownMenu,
|
|
33292
|
+
{
|
|
33293
|
+
trigger: /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(ToolbarButton, { onClick: () => {
|
|
33294
|
+
}, active: editor.isActive("formCheckbox"), title: t("slashCommand.formCheckbox"), children: [
|
|
33295
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_lucide_react53.SquareCheckBig, { className: "w-4 h-4" }),
|
|
33296
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_lucide_react53.ChevronDown, { className: "w-3 h-3" })
|
|
33297
|
+
] }),
|
|
33298
|
+
children: [
|
|
33299
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
33300
|
+
DropdownMenuItem,
|
|
33301
|
+
{
|
|
33302
|
+
icon: import_lucide_react53.SquareCheckBig,
|
|
33303
|
+
label: t("slashCommand.formCheckbox"),
|
|
33304
|
+
onClick: () => editor.chain().focus().setFormCheckbox().run()
|
|
33305
|
+
}
|
|
33306
|
+
),
|
|
33307
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
33308
|
+
DropdownMenuItem,
|
|
33309
|
+
{
|
|
33310
|
+
icon: import_lucide_react53.CircleCheckBig,
|
|
33311
|
+
label: t("slashCommand.roundCheckbox"),
|
|
33312
|
+
onClick: () => editor.chain().focus().setFormCheckbox({ variant: "circle" }).run()
|
|
33313
|
+
}
|
|
33314
|
+
)
|
|
33315
|
+
]
|
|
33316
|
+
}
|
|
33317
|
+
),
|
|
33228
33318
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
33229
33319
|
DropdownMenu,
|
|
33230
33320
|
{
|
|
@@ -33650,6 +33740,36 @@ var EditorToolbar = ({
|
|
|
33650
33740
|
] })
|
|
33651
33741
|
]
|
|
33652
33742
|
}
|
|
33743
|
+
),
|
|
33744
|
+
hasTableContext && /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(
|
|
33745
|
+
DropdownMenu,
|
|
33746
|
+
{
|
|
33747
|
+
trigger: /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(ToolbarButton, { onClick: () => {
|
|
33748
|
+
}, title: t("tableMenu.textDirection"), children: [
|
|
33749
|
+
currentCellTextDirection === "vertical" ? /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_lucide_react53.ArrowDown, { className: "w-4 h-4" }) : /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_lucide_react53.ArrowRight, { className: "w-4 h-4" }),
|
|
33750
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_lucide_react53.ChevronDown, { className: "w-3 h-3" })
|
|
33751
|
+
] }),
|
|
33752
|
+
children: [
|
|
33753
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
33754
|
+
DropdownMenuItem,
|
|
33755
|
+
{
|
|
33756
|
+
icon: import_lucide_react53.ArrowRight,
|
|
33757
|
+
label: t("tableMenu.horizontalText"),
|
|
33758
|
+
onClick: () => applyTableCellAttribute(editor, "textDirection", null),
|
|
33759
|
+
active: currentCellTextDirection === "horizontal"
|
|
33760
|
+
}
|
|
33761
|
+
),
|
|
33762
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
33763
|
+
DropdownMenuItem,
|
|
33764
|
+
{
|
|
33765
|
+
icon: import_lucide_react53.ArrowDown,
|
|
33766
|
+
label: t("tableMenu.verticalText"),
|
|
33767
|
+
onClick: () => applyTableCellAttribute(editor, "textDirection", "vertical"),
|
|
33768
|
+
active: currentCellTextDirection === "vertical"
|
|
33769
|
+
}
|
|
33770
|
+
)
|
|
33771
|
+
]
|
|
33772
|
+
}
|
|
33653
33773
|
)
|
|
33654
33774
|
] }),
|
|
33655
33775
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(ToolbarDivider, {}),
|
|
@@ -33695,6 +33815,34 @@ var EditorToolbar = ({
|
|
|
33695
33815
|
]
|
|
33696
33816
|
}
|
|
33697
33817
|
),
|
|
33818
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(
|
|
33819
|
+
DropdownMenu,
|
|
33820
|
+
{
|
|
33821
|
+
trigger: /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(ToolbarButton, { onClick: () => {
|
|
33822
|
+
}, active: editor.isActive("formCheckbox"), title: t("slashCommand.formCheckbox"), children: [
|
|
33823
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_lucide_react53.SquareCheckBig, { className: "w-4 h-4" }),
|
|
33824
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_lucide_react53.ChevronDown, { className: "w-3 h-3" })
|
|
33825
|
+
] }),
|
|
33826
|
+
children: [
|
|
33827
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
33828
|
+
DropdownMenuItem,
|
|
33829
|
+
{
|
|
33830
|
+
icon: import_lucide_react53.SquareCheckBig,
|
|
33831
|
+
label: t("slashCommand.formCheckbox"),
|
|
33832
|
+
onClick: () => editor.chain().focus().setFormCheckbox().run()
|
|
33833
|
+
}
|
|
33834
|
+
),
|
|
33835
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
33836
|
+
DropdownMenuItem,
|
|
33837
|
+
{
|
|
33838
|
+
icon: import_lucide_react53.CircleCheckBig,
|
|
33839
|
+
label: t("slashCommand.roundCheckbox"),
|
|
33840
|
+
onClick: () => editor.chain().focus().setFormCheckbox({ variant: "circle" }).run()
|
|
33841
|
+
}
|
|
33842
|
+
)
|
|
33843
|
+
]
|
|
33844
|
+
}
|
|
33845
|
+
),
|
|
33698
33846
|
isMediumFull && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().toggleBlockquote().run(), active: editor.isActive("blockquote"), title: t("toolbar.quote"), children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_lucide_react53.Quote, { className: "w-4 h-4" }) }),
|
|
33699
33847
|
isFull && /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(
|
|
33700
33848
|
DropdownMenu,
|
|
@@ -35141,6 +35289,7 @@ var BubbleMenuContent = ({
|
|
|
35141
35289
|
const currentCellBorderStyle = editor.getAttributes("tableCell").borderStyle || editor.getAttributes("tableHeader").borderStyle || "solid";
|
|
35142
35290
|
const currentCellBorderWidth = editor.getAttributes("tableCell").borderWidth || editor.getAttributes("tableHeader").borderWidth || "1px";
|
|
35143
35291
|
const currentCellVerticalAlign = normalizeStyleValue(editor.getAttributes("tableCell").verticalAlign || editor.getAttributes("tableHeader").verticalAlign) || "";
|
|
35292
|
+
const currentCellTextDirection = normalizeStyleValue(editor.getAttributes("tableCell").textDirection || editor.getAttributes("tableHeader").textDirection) || "horizontal";
|
|
35144
35293
|
const isInTable2 = (0, import_tables6.isInTable)(editor.state);
|
|
35145
35294
|
const canMergeCells = isInTable2 && editor.can().mergeCells();
|
|
35146
35295
|
const canSplitCell = isInTable2 && editor.can().splitCell();
|
|
@@ -35784,6 +35933,49 @@ var BubbleMenuContent = ({
|
|
|
35784
35933
|
)
|
|
35785
35934
|
]
|
|
35786
35935
|
}
|
|
35936
|
+
),
|
|
35937
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(
|
|
35938
|
+
DropdownMenu,
|
|
35939
|
+
{
|
|
35940
|
+
onOpenChange: (open) => {
|
|
35941
|
+
onKeepOpenChange?.(open);
|
|
35942
|
+
},
|
|
35943
|
+
trigger: /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(
|
|
35944
|
+
ToolbarButton,
|
|
35945
|
+
{
|
|
35946
|
+
onMouseDown: () => {
|
|
35947
|
+
onKeepOpenChange?.(true);
|
|
35948
|
+
},
|
|
35949
|
+
onClick: () => {
|
|
35950
|
+
},
|
|
35951
|
+
title: t("tableMenu.textDirection"),
|
|
35952
|
+
children: [
|
|
35953
|
+
currentCellTextDirection === "vertical" ? /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react54.ArrowDown, { className: "w-4 h-4" }) : /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react54.ArrowRight, { className: "w-4 h-4" }),
|
|
35954
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react54.ChevronDown, { className: "w-3 h-3" })
|
|
35955
|
+
]
|
|
35956
|
+
}
|
|
35957
|
+
),
|
|
35958
|
+
children: [
|
|
35959
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
35960
|
+
DropdownMenuItem,
|
|
35961
|
+
{
|
|
35962
|
+
icon: import_lucide_react54.ArrowRight,
|
|
35963
|
+
label: t("tableMenu.horizontalText"),
|
|
35964
|
+
onClick: () => applyTableCellAttribute2(editor, "textDirection", null, { focus: false }),
|
|
35965
|
+
active: currentCellTextDirection === "horizontal"
|
|
35966
|
+
}
|
|
35967
|
+
),
|
|
35968
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
35969
|
+
DropdownMenuItem,
|
|
35970
|
+
{
|
|
35971
|
+
icon: import_lucide_react54.ArrowDown,
|
|
35972
|
+
label: t("tableMenu.verticalText"),
|
|
35973
|
+
onClick: () => applyTableCellAttribute2(editor, "textDirection", "vertical", { focus: false }),
|
|
35974
|
+
active: currentCellTextDirection === "vertical"
|
|
35975
|
+
}
|
|
35976
|
+
)
|
|
35977
|
+
]
|
|
35978
|
+
}
|
|
35787
35979
|
)
|
|
35788
35980
|
] }),
|
|
35789
35981
|
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
@@ -43703,6 +43895,12 @@ var MenuBar = ({
|
|
|
43703
43895
|
icon: import_lucide_react58.Square,
|
|
43704
43896
|
onClick: () => editor.chain().focus().setFormCheckbox().run()
|
|
43705
43897
|
},
|
|
43898
|
+
{
|
|
43899
|
+
type: "action",
|
|
43900
|
+
label: t("slashCommand.roundCheckbox") || "Round Checkbox",
|
|
43901
|
+
icon: import_lucide_react58.CircleCheckBig,
|
|
43902
|
+
onClick: () => editor.chain().focus().setFormCheckbox({ variant: "circle" }).run()
|
|
43903
|
+
},
|
|
43706
43904
|
{
|
|
43707
43905
|
type: "action",
|
|
43708
43906
|
label: t("menubar.formRadio") || "Form Radio Button",
|