@underverse-ui/underverse 1.0.187 → 1.0.188
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 +202 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +40 -0
- package/dist/index.d.ts +40 -0
- package/dist/index.js +215 -13
- 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",
|
|
@@ -28379,6 +28399,7 @@ var import_lucide_react45 = require("lucide-react");
|
|
|
28379
28399
|
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
28380
28400
|
var FormCheckboxView = ({ node, updateAttributes, editor, selected }) => {
|
|
28381
28401
|
const isChecked = !!node.attrs.checked;
|
|
28402
|
+
const isCircle = node.attrs.variant === "circle";
|
|
28382
28403
|
const isEditable = editor.isEditable;
|
|
28383
28404
|
const handleToggle = (e) => {
|
|
28384
28405
|
if (!isEditable) return;
|
|
@@ -28408,7 +28429,8 @@ var FormCheckboxView = ({ node, updateAttributes, editor, selected }) => {
|
|
|
28408
28429
|
onClick: handleToggle,
|
|
28409
28430
|
onKeyDown: handleKeyDown2,
|
|
28410
28431
|
className: cn(
|
|
28411
|
-
"flex items-center justify-center w-5 h-5
|
|
28432
|
+
"flex items-center justify-center w-5 h-5 border text-primary-foreground transition-all duration-200 outline-none",
|
|
28433
|
+
isCircle ? "rounded-full" : "rounded-md",
|
|
28412
28434
|
isChecked ? "bg-primary border-primary scale-100" : "bg-background border-border/70 hover:border-primary/50",
|
|
28413
28435
|
selected && "ring-2 ring-primary/30 ring-offset-1",
|
|
28414
28436
|
isEditable && "focus-visible:ring-2 focus-visible:ring-primary/45 focus-visible:ring-offset-1 focus-visible:border-primary"
|
|
@@ -28480,6 +28502,11 @@ var FormCheckbox2 = import_core4.Node.create({
|
|
|
28480
28502
|
name: attributes.name
|
|
28481
28503
|
};
|
|
28482
28504
|
}
|
|
28505
|
+
},
|
|
28506
|
+
variant: {
|
|
28507
|
+
default: "square",
|
|
28508
|
+
parseHTML: (element) => element.getAttribute("data-variant") === "circle" ? "circle" : "square",
|
|
28509
|
+
renderHTML: (attributes) => attributes.variant === "circle" ? { "data-variant": "circle" } : {}
|
|
28483
28510
|
}
|
|
28484
28511
|
};
|
|
28485
28512
|
},
|
|
@@ -28816,6 +28843,8 @@ var DEFAULT_MESSAGES = {
|
|
|
28816
28843
|
fileCardDesc: "Upload a file card attachment",
|
|
28817
28844
|
formCheckbox: "Form Checkbox",
|
|
28818
28845
|
formCheckboxDesc: "Insert an interactive checkbox field",
|
|
28846
|
+
roundCheckbox: "Round Checkbox",
|
|
28847
|
+
roundCheckboxDesc: "Insert a circular interactive checkbox",
|
|
28819
28848
|
formRadio: "Form Radio Button",
|
|
28820
28849
|
formRadioDesc: "Insert an interactive radio button field"
|
|
28821
28850
|
};
|
|
@@ -28871,6 +28900,8 @@ function buildSlashCommandMessages(translate) {
|
|
|
28871
28900
|
fileCardDesc: translate("slashCommand.fileCardDesc") || "Upload a file card attachment",
|
|
28872
28901
|
formCheckbox: translate("slashCommand.formCheckbox") || "Form Checkbox",
|
|
28873
28902
|
formCheckboxDesc: translate("slashCommand.formCheckboxDesc") || "Insert an interactive checkbox field",
|
|
28903
|
+
roundCheckbox: translate("slashCommand.roundCheckbox") || "Round Checkbox",
|
|
28904
|
+
roundCheckboxDesc: translate("slashCommand.roundCheckboxDesc") || "Insert a circular interactive checkbox",
|
|
28874
28905
|
formRadio: translate("slashCommand.formRadio") || "Form Radio Button",
|
|
28875
28906
|
formRadioDesc: translate("slashCommand.formRadioDesc") || "Insert an interactive radio button field"
|
|
28876
28907
|
};
|
|
@@ -29017,10 +29048,20 @@ function buildSlashCommandItems({
|
|
|
29017
29048
|
icon: import_lucide_react47.CheckSquare,
|
|
29018
29049
|
title: messages.formCheckbox,
|
|
29019
29050
|
description: messages.formCheckboxDesc,
|
|
29051
|
+
searchTerms: ["checkbox", "square checkbox"],
|
|
29020
29052
|
command: run(({ editor, range }) => {
|
|
29021
29053
|
getCommandChain(editor, range).setFormCheckbox().run();
|
|
29022
29054
|
})
|
|
29023
29055
|
},
|
|
29056
|
+
{
|
|
29057
|
+
icon: import_lucide_react47.CircleCheckBig,
|
|
29058
|
+
title: messages.roundCheckbox,
|
|
29059
|
+
description: messages.roundCheckboxDesc,
|
|
29060
|
+
searchTerms: ["roundcheckbox", "round checkbox", "circle checkbox"],
|
|
29061
|
+
command: run(({ editor, range }) => {
|
|
29062
|
+
getCommandChain(editor, range).setFormCheckbox({ variant: "circle" }).run();
|
|
29063
|
+
})
|
|
29064
|
+
},
|
|
29024
29065
|
{
|
|
29025
29066
|
icon: import_lucide_react47.CircleDot,
|
|
29026
29067
|
title: messages.formRadio,
|
|
@@ -29029,7 +29070,11 @@ function buildSlashCommandItems({
|
|
|
29029
29070
|
getCommandChain(editor, range).setFormRadio({ name: `radio-group-${Math.random().toString(36).substring(2, 6)}` }).run();
|
|
29030
29071
|
})
|
|
29031
29072
|
}
|
|
29032
|
-
].filter((item) =>
|
|
29073
|
+
].filter((item) => {
|
|
29074
|
+
const normalizedQuery = query.trim().toLowerCase();
|
|
29075
|
+
if (!normalizedQuery) return true;
|
|
29076
|
+
return [item.title, item.description, ...item.searchTerms ?? []].some((value) => value.toLowerCase().includes(normalizedQuery));
|
|
29077
|
+
});
|
|
29033
29078
|
}
|
|
29034
29079
|
var SlashCommandList = (0, import_react58.forwardRef)((props, ref) => {
|
|
29035
29080
|
const [selectedIndex, setSelectedIndex] = useResettingIndex2(props.items);
|
|
@@ -31827,6 +31872,11 @@ var CustomTableCell = import_extension_table_cell.default.extend({
|
|
|
31827
31872
|
"data-vertical-align": attributes.verticalAlign
|
|
31828
31873
|
};
|
|
31829
31874
|
}
|
|
31875
|
+
},
|
|
31876
|
+
textDirection: {
|
|
31877
|
+
default: null,
|
|
31878
|
+
parseHTML: (element) => element.getAttribute("data-text-direction") === "vertical" || element.style.writingMode === "vertical-rl" ? "vertical" : null,
|
|
31879
|
+
renderHTML: (attributes) => attributes.textDirection === "vertical" ? { "data-text-direction": "vertical" } : {}
|
|
31830
31880
|
}
|
|
31831
31881
|
};
|
|
31832
31882
|
},
|
|
@@ -31837,12 +31887,14 @@ var CustomTableCell = import_extension_table_cell.default.extend({
|
|
|
31837
31887
|
const borderStyle = HTMLAttributes["data-border-style"];
|
|
31838
31888
|
const borderWidth = HTMLAttributes["data-border-width"];
|
|
31839
31889
|
const verticalAlign = HTMLAttributes["data-vertical-align"];
|
|
31890
|
+
const textDirection = HTMLAttributes["data-text-direction"];
|
|
31840
31891
|
let mergedStyle = style;
|
|
31841
31892
|
if (bg) mergedStyle += `; background-color: ${bg}`;
|
|
31842
31893
|
if (borderColor) mergedStyle += `; border-color: ${borderColor}`;
|
|
31843
31894
|
if (borderStyle) mergedStyle += `; border-style: ${borderStyle}`;
|
|
31844
31895
|
if (borderWidth) mergedStyle += `; border-width: ${borderWidth}`;
|
|
31845
31896
|
if (verticalAlign) mergedStyle += `; vertical-align: ${verticalAlign}`;
|
|
31897
|
+
if (textDirection === "vertical") mergedStyle += "; writing-mode: vertical-rl; text-orientation: mixed";
|
|
31846
31898
|
mergedStyle = mergedStyle.replace(/^;/, "").trim();
|
|
31847
31899
|
return [
|
|
31848
31900
|
"td",
|
|
@@ -31946,6 +31998,11 @@ var CustomTableHeader = import_extension_table_header.default.extend({
|
|
|
31946
31998
|
"data-vertical-align": attributes.verticalAlign
|
|
31947
31999
|
};
|
|
31948
32000
|
}
|
|
32001
|
+
},
|
|
32002
|
+
textDirection: {
|
|
32003
|
+
default: null,
|
|
32004
|
+
parseHTML: (element) => element.getAttribute("data-text-direction") === "vertical" || element.style.writingMode === "vertical-rl" ? "vertical" : null,
|
|
32005
|
+
renderHTML: (attributes) => attributes.textDirection === "vertical" ? { "data-text-direction": "vertical" } : {}
|
|
31949
32006
|
}
|
|
31950
32007
|
};
|
|
31951
32008
|
},
|
|
@@ -31956,12 +32013,14 @@ var CustomTableHeader = import_extension_table_header.default.extend({
|
|
|
31956
32013
|
const borderStyle = HTMLAttributes["data-border-style"];
|
|
31957
32014
|
const borderWidth = HTMLAttributes["data-border-width"];
|
|
31958
32015
|
const verticalAlign = HTMLAttributes["data-vertical-align"];
|
|
32016
|
+
const textDirection = HTMLAttributes["data-text-direction"];
|
|
31959
32017
|
let mergedStyle = style;
|
|
31960
32018
|
if (bg) mergedStyle += `; background-color: ${bg}`;
|
|
31961
32019
|
if (borderColor) mergedStyle += `; border-color: ${borderColor}`;
|
|
31962
32020
|
if (borderStyle) mergedStyle += `; border-style: ${borderStyle}`;
|
|
31963
32021
|
if (borderWidth) mergedStyle += `; border-width: ${borderWidth}`;
|
|
31964
32022
|
if (verticalAlign) mergedStyle += `; vertical-align: ${verticalAlign}`;
|
|
32023
|
+
if (textDirection === "vertical") mergedStyle += "; writing-mode: vertical-rl; text-orientation: mixed";
|
|
31965
32024
|
mergedStyle = mergedStyle.replace(/^;/, "").trim();
|
|
31966
32025
|
return [
|
|
31967
32026
|
"th",
|
|
@@ -33164,6 +33223,7 @@ var EditorToolbar = ({
|
|
|
33164
33223
|
const canMergeCells = hasTableContext && editor.can().mergeCells();
|
|
33165
33224
|
const canSplitCell = hasTableContext && editor.can().splitCell();
|
|
33166
33225
|
const currentCellVerticalAlign = normalizeStyleValue(editor.getAttributes("tableCell").verticalAlign || editor.getAttributes("tableHeader").verticalAlign) || "";
|
|
33226
|
+
const currentCellTextDirection = normalizeStyleValue(editor.getAttributes("tableCell").textDirection || editor.getAttributes("tableHeader").textDirection) || "horizontal";
|
|
33167
33227
|
const currentFontFamily = normalizeStyleValue(textStyleAttrs.fontFamily);
|
|
33168
33228
|
const currentFontSize = normalizeStyleValue(textStyleAttrs.fontSize);
|
|
33169
33229
|
const currentTextColor = normalizeStyleValue(textStyleAttrs.color) || "inherit";
|
|
@@ -33225,6 +33285,34 @@ var EditorToolbar = ({
|
|
|
33225
33285
|
children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_lucide_react53.List, { className: "w-4 h-4" })
|
|
33226
33286
|
}
|
|
33227
33287
|
),
|
|
33288
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(
|
|
33289
|
+
DropdownMenu,
|
|
33290
|
+
{
|
|
33291
|
+
trigger: /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(ToolbarButton, { onClick: () => {
|
|
33292
|
+
}, active: editor.isActive("formCheckbox"), title: t("slashCommand.formCheckbox"), children: [
|
|
33293
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_lucide_react53.SquareCheckBig, { className: "w-4 h-4" }),
|
|
33294
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_lucide_react53.ChevronDown, { className: "w-3 h-3" })
|
|
33295
|
+
] }),
|
|
33296
|
+
children: [
|
|
33297
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
33298
|
+
DropdownMenuItem,
|
|
33299
|
+
{
|
|
33300
|
+
icon: import_lucide_react53.SquareCheckBig,
|
|
33301
|
+
label: t("slashCommand.formCheckbox"),
|
|
33302
|
+
onClick: () => editor.chain().focus().setFormCheckbox().run()
|
|
33303
|
+
}
|
|
33304
|
+
),
|
|
33305
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
33306
|
+
DropdownMenuItem,
|
|
33307
|
+
{
|
|
33308
|
+
icon: import_lucide_react53.CircleCheckBig,
|
|
33309
|
+
label: t("slashCommand.roundCheckbox"),
|
|
33310
|
+
onClick: () => editor.chain().focus().setFormCheckbox({ variant: "circle" }).run()
|
|
33311
|
+
}
|
|
33312
|
+
)
|
|
33313
|
+
]
|
|
33314
|
+
}
|
|
33315
|
+
),
|
|
33228
33316
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
33229
33317
|
DropdownMenu,
|
|
33230
33318
|
{
|
|
@@ -33650,6 +33738,36 @@ var EditorToolbar = ({
|
|
|
33650
33738
|
] })
|
|
33651
33739
|
]
|
|
33652
33740
|
}
|
|
33741
|
+
),
|
|
33742
|
+
hasTableContext && /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(
|
|
33743
|
+
DropdownMenu,
|
|
33744
|
+
{
|
|
33745
|
+
trigger: /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(ToolbarButton, { onClick: () => {
|
|
33746
|
+
}, title: t("tableMenu.textDirection"), children: [
|
|
33747
|
+
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" }),
|
|
33748
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_lucide_react53.ChevronDown, { className: "w-3 h-3" })
|
|
33749
|
+
] }),
|
|
33750
|
+
children: [
|
|
33751
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
33752
|
+
DropdownMenuItem,
|
|
33753
|
+
{
|
|
33754
|
+
icon: import_lucide_react53.ArrowRight,
|
|
33755
|
+
label: t("tableMenu.horizontalText"),
|
|
33756
|
+
onClick: () => applyTableCellAttribute(editor, "textDirection", null),
|
|
33757
|
+
active: currentCellTextDirection === "horizontal"
|
|
33758
|
+
}
|
|
33759
|
+
),
|
|
33760
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
33761
|
+
DropdownMenuItem,
|
|
33762
|
+
{
|
|
33763
|
+
icon: import_lucide_react53.ArrowDown,
|
|
33764
|
+
label: t("tableMenu.verticalText"),
|
|
33765
|
+
onClick: () => applyTableCellAttribute(editor, "textDirection", "vertical"),
|
|
33766
|
+
active: currentCellTextDirection === "vertical"
|
|
33767
|
+
}
|
|
33768
|
+
)
|
|
33769
|
+
]
|
|
33770
|
+
}
|
|
33653
33771
|
)
|
|
33654
33772
|
] }),
|
|
33655
33773
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(ToolbarDivider, {}),
|
|
@@ -33695,6 +33813,34 @@ var EditorToolbar = ({
|
|
|
33695
33813
|
]
|
|
33696
33814
|
}
|
|
33697
33815
|
),
|
|
33816
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(
|
|
33817
|
+
DropdownMenu,
|
|
33818
|
+
{
|
|
33819
|
+
trigger: /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(ToolbarButton, { onClick: () => {
|
|
33820
|
+
}, active: editor.isActive("formCheckbox"), title: t("slashCommand.formCheckbox"), children: [
|
|
33821
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_lucide_react53.SquareCheckBig, { className: "w-4 h-4" }),
|
|
33822
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_lucide_react53.ChevronDown, { className: "w-3 h-3" })
|
|
33823
|
+
] }),
|
|
33824
|
+
children: [
|
|
33825
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
33826
|
+
DropdownMenuItem,
|
|
33827
|
+
{
|
|
33828
|
+
icon: import_lucide_react53.SquareCheckBig,
|
|
33829
|
+
label: t("slashCommand.formCheckbox"),
|
|
33830
|
+
onClick: () => editor.chain().focus().setFormCheckbox().run()
|
|
33831
|
+
}
|
|
33832
|
+
),
|
|
33833
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
33834
|
+
DropdownMenuItem,
|
|
33835
|
+
{
|
|
33836
|
+
icon: import_lucide_react53.CircleCheckBig,
|
|
33837
|
+
label: t("slashCommand.roundCheckbox"),
|
|
33838
|
+
onClick: () => editor.chain().focus().setFormCheckbox({ variant: "circle" }).run()
|
|
33839
|
+
}
|
|
33840
|
+
)
|
|
33841
|
+
]
|
|
33842
|
+
}
|
|
33843
|
+
),
|
|
33698
33844
|
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
33845
|
isFull && /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(
|
|
33700
33846
|
DropdownMenu,
|
|
@@ -35141,6 +35287,7 @@ var BubbleMenuContent = ({
|
|
|
35141
35287
|
const currentCellBorderStyle = editor.getAttributes("tableCell").borderStyle || editor.getAttributes("tableHeader").borderStyle || "solid";
|
|
35142
35288
|
const currentCellBorderWidth = editor.getAttributes("tableCell").borderWidth || editor.getAttributes("tableHeader").borderWidth || "1px";
|
|
35143
35289
|
const currentCellVerticalAlign = normalizeStyleValue(editor.getAttributes("tableCell").verticalAlign || editor.getAttributes("tableHeader").verticalAlign) || "";
|
|
35290
|
+
const currentCellTextDirection = normalizeStyleValue(editor.getAttributes("tableCell").textDirection || editor.getAttributes("tableHeader").textDirection) || "horizontal";
|
|
35144
35291
|
const isInTable2 = (0, import_tables6.isInTable)(editor.state);
|
|
35145
35292
|
const canMergeCells = isInTable2 && editor.can().mergeCells();
|
|
35146
35293
|
const canSplitCell = isInTable2 && editor.can().splitCell();
|
|
@@ -35784,6 +35931,49 @@ var BubbleMenuContent = ({
|
|
|
35784
35931
|
)
|
|
35785
35932
|
]
|
|
35786
35933
|
}
|
|
35934
|
+
),
|
|
35935
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(
|
|
35936
|
+
DropdownMenu,
|
|
35937
|
+
{
|
|
35938
|
+
onOpenChange: (open) => {
|
|
35939
|
+
onKeepOpenChange?.(open);
|
|
35940
|
+
},
|
|
35941
|
+
trigger: /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(
|
|
35942
|
+
ToolbarButton,
|
|
35943
|
+
{
|
|
35944
|
+
onMouseDown: () => {
|
|
35945
|
+
onKeepOpenChange?.(true);
|
|
35946
|
+
},
|
|
35947
|
+
onClick: () => {
|
|
35948
|
+
},
|
|
35949
|
+
title: t("tableMenu.textDirection"),
|
|
35950
|
+
children: [
|
|
35951
|
+
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" }),
|
|
35952
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react54.ChevronDown, { className: "w-3 h-3" })
|
|
35953
|
+
]
|
|
35954
|
+
}
|
|
35955
|
+
),
|
|
35956
|
+
children: [
|
|
35957
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
35958
|
+
DropdownMenuItem,
|
|
35959
|
+
{
|
|
35960
|
+
icon: import_lucide_react54.ArrowRight,
|
|
35961
|
+
label: t("tableMenu.horizontalText"),
|
|
35962
|
+
onClick: () => applyTableCellAttribute2(editor, "textDirection", null, { focus: false }),
|
|
35963
|
+
active: currentCellTextDirection === "horizontal"
|
|
35964
|
+
}
|
|
35965
|
+
),
|
|
35966
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
35967
|
+
DropdownMenuItem,
|
|
35968
|
+
{
|
|
35969
|
+
icon: import_lucide_react54.ArrowDown,
|
|
35970
|
+
label: t("tableMenu.verticalText"),
|
|
35971
|
+
onClick: () => applyTableCellAttribute2(editor, "textDirection", "vertical", { focus: false }),
|
|
35972
|
+
active: currentCellTextDirection === "vertical"
|
|
35973
|
+
}
|
|
35974
|
+
)
|
|
35975
|
+
]
|
|
35976
|
+
}
|
|
35787
35977
|
)
|
|
35788
35978
|
] }),
|
|
35789
35979
|
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
@@ -43703,6 +43893,12 @@ var MenuBar = ({
|
|
|
43703
43893
|
icon: import_lucide_react58.Square,
|
|
43704
43894
|
onClick: () => editor.chain().focus().setFormCheckbox().run()
|
|
43705
43895
|
},
|
|
43896
|
+
{
|
|
43897
|
+
type: "action",
|
|
43898
|
+
label: t("slashCommand.roundCheckbox") || "Round Checkbox",
|
|
43899
|
+
icon: import_lucide_react58.CircleCheckBig,
|
|
43900
|
+
onClick: () => editor.chain().focus().setFormCheckbox({ variant: "circle" }).run()
|
|
43901
|
+
},
|
|
43706
43902
|
{
|
|
43707
43903
|
type: "action",
|
|
43708
43904
|
label: t("menubar.formRadio") || "Form Radio Button",
|