@underverse-ui/underverse 1.0.129 → 1.0.130

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/dist/index.js CHANGED
@@ -26926,42 +26926,32 @@ var BubbleMenuContent = ({
26926
26926
  if (activeColorPalette) {
26927
26927
  const isTextPalette = activeColorPalette === "text";
26928
26928
  const isHighlightPalette = activeColorPalette === "highlight";
26929
- return /* @__PURE__ */ jsxs68("div", { className: "w-56", children: [
26930
- /* @__PURE__ */ jsx82(
26931
- EditorColorPalette,
26932
- {
26933
- colors: isTextPalette ? textColors : highlightColors,
26934
- currentColor: isTextPalette ? currentTextColor : isHighlightPalette ? currentHighlightColor : currentCellBgColor,
26935
- onSelect: (color) => {
26936
- if (isTextPalette) {
26937
- if (color === "inherit") {
26938
- editor.chain().focus().unsetColor().run();
26939
- } else {
26940
- editor.chain().focus().setColor(color).run();
26941
- }
26942
- } else if (isHighlightPalette) {
26943
- if (color === "") {
26944
- editor.chain().focus().unsetHighlight().run();
26945
- } else {
26946
- editor.chain().focus().toggleHighlight({ color }).run();
26947
- }
26929
+ return /* @__PURE__ */ jsx82("div", { className: "w-56", children: /* @__PURE__ */ jsx82(
26930
+ EditorColorPalette,
26931
+ {
26932
+ colors: isTextPalette ? textColors : highlightColors,
26933
+ currentColor: isTextPalette ? currentTextColor : isHighlightPalette ? currentHighlightColor : currentCellBgColor,
26934
+ onSelect: (color) => {
26935
+ if (isTextPalette) {
26936
+ if (color === "inherit") {
26937
+ editor.chain().focus().unsetColor().run();
26948
26938
  } else {
26949
- applyTableCellBackground(editor, color);
26939
+ editor.chain().focus().setColor(color).run();
26950
26940
  }
26951
- },
26952
- label: isTextPalette ? t("colors.textColor") : isHighlightPalette ? t("colors.highlight") : t("tableMenu.cellBackground") || "Cell background"
26953
- }
26954
- ),
26955
- /* @__PURE__ */ jsx82("div", { className: "p-2 border-t", children: /* @__PURE__ */ jsx82(
26956
- "button",
26957
- {
26958
- type: "button",
26959
- onClick: () => setActiveColorPalette(null),
26960
- className: "w-full py-1.5 text-sm rounded-lg hover:bg-muted transition-colors",
26961
- children: t("colors.done")
26962
- }
26963
- ) })
26964
- ] });
26941
+ } else if (isHighlightPalette) {
26942
+ if (color === "") {
26943
+ editor.chain().focus().unsetHighlight().run();
26944
+ } else {
26945
+ editor.chain().focus().toggleHighlight({ color }).run();
26946
+ }
26947
+ } else {
26948
+ applyTableCellBackground(editor, color);
26949
+ }
26950
+ setActiveColorPalette(null);
26951
+ },
26952
+ label: isTextPalette ? t("colors.textColor") : isHighlightPalette ? t("colors.highlight") : t("tableMenu.cellBackground") || "Cell background"
26953
+ }
26954
+ ) });
26965
26955
  }
26966
26956
  if (isImageSelected) {
26967
26957
  return /* @__PURE__ */ jsxs68("div", { className: "flex items-center gap-0.5 p-1", children: [