@daisychainapp/maily-to-core 0.4.4 → 0.4.5

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.mjs CHANGED
@@ -53,7 +53,7 @@ var __async = (__this, __arguments, generator) => {
53
53
 
54
54
  // src/editor/index.tsx
55
55
  import { EditorContent, useEditor } from "@tiptap/react";
56
- import { useMemo as useMemo12, useRef as useRef13 } from "react";
56
+ import { useMemo as useMemo13, useRef as useRef13 } from "react";
57
57
 
58
58
  // src/editor/components/column-menu/columns-bubble-menu.tsx
59
59
  import { BubbleMenu } from "@tiptap/react";
@@ -3445,7 +3445,10 @@ function Divider(props) {
3445
3445
  import * as React from "react";
3446
3446
  import * as TooltipPrimitive from "@radix-ui/react-tooltip";
3447
3447
  import { jsx as jsx2 } from "react/jsx-runtime";
3448
- var TooltipProvider = TooltipPrimitive.Provider;
3448
+ var TooltipProvider = (_a) => {
3449
+ var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
3450
+ return /* @__PURE__ */ jsx2(TooltipPrimitive.Provider, __spreadProps(__spreadValues({ delayDuration: 80, skipDelayDuration: 120 }, props), { children }));
3451
+ };
3449
3452
  var Tooltip = TooltipPrimitive.Root;
3450
3453
  var TooltipTrigger = TooltipPrimitive.Trigger;
3451
3454
  var TooltipContent = React.forwardRef((_a, ref) => {
@@ -3530,6 +3533,7 @@ function BubbleMenuButton(item) {
3530
3533
  }, item.command ? { onClick: item.command } : {}), {
3531
3534
  "data-state": isActive,
3532
3535
  className: cn(
3536
+ "menu-option",
3533
3537
  isActive && "menu-active-option",
3534
3538
  "mly:size-7! mly:px-2.5 mly:disabled:cursor-not-allowed",
3535
3539
  item == null ? void 0 : item.className
@@ -3957,11 +3961,11 @@ function ColumnsWidthConfig(props) {
3957
3961
  onColumnWidthChange
3958
3962
  } = props;
3959
3963
  return /* @__PURE__ */ jsxs4(Popover, { children: [
3960
- /* @__PURE__ */ jsx9(PopoverTrigger, { className: "mly:flex mly:size-7 mly:items-center mly:justify-center mly:gap-1 mly:rounded-md mly:text-sm mly:data-[state=open]:bg-soft-gray mly:hover:bg-soft-gray", children: /* @__PURE__ */ jsx9(SlidersVertical, { className: "mly:h-3 mly:w-3 mly:stroke-[2.5]" }) }),
3964
+ /* @__PURE__ */ jsx9(PopoverTrigger, { className: "menu-option mly:flex mly:size-7 mly:items-center mly:justify-center mly:gap-1 mly:rounded-md mly:text-sm mly:data-[state=open]:bg-soft-gray mly:hover:bg-soft-gray", children: /* @__PURE__ */ jsx9(SlidersVertical, { className: "mly:h-3 mly:w-3 mly:stroke-[2.5]" }) }),
3961
3965
  /* @__PURE__ */ jsxs4(
3962
3966
  PopoverContent,
3963
3967
  {
3964
- className: "mly:w-[300px] mly:rounded-lg mly:p-0.5!",
3968
+ className: "menu-dropdown-surface mly:w-[300px] mly:rounded-lg mly:p-0.5!",
3965
3969
  side: "top",
3966
3970
  sideOffset: 8,
3967
3971
  align: "center",
@@ -4040,8 +4044,8 @@ function SwitchButton(props) {
4040
4044
  "button",
4041
4045
  {
4042
4046
  className: cn(
4043
- "mly:flex mly:h-7 mly:items-center mly:gap-1 mly:rounded-md mly:px-2 mly:text-sm mly:text-gray-500 mly:hover:bg-soft-gray mly:hover:text-midnight-gray",
4044
- isActive && "mly:bg-soft-gray mly:text-midnight-gray"
4047
+ "menu-option mly:flex mly:h-7 mly:items-center mly:gap-1 mly:rounded-md mly:px-2 mly:text-sm mly:text-gray-500 mly:hover:bg-soft-gray mly:hover:text-midnight-gray",
4048
+ isActive && "menu-active-option mly:bg-soft-gray mly:text-midnight-gray"
4045
4049
  ),
4046
4050
  onClick,
4047
4051
  children
@@ -4066,7 +4070,7 @@ function Select(props) {
4066
4070
  placeholder
4067
4071
  } = props;
4068
4072
  const selectId = `mly${useId()}`;
4069
- const content = /* @__PURE__ */ jsxs5("div", { className: "mly:relative mly:inline-flex mly:h-7 mly:items-center mly:overflow-hidden", children: [
4073
+ const content = /* @__PURE__ */ jsxs5("div", { className: "menu-select-wrap mly:relative mly:inline-flex mly:h-7 mly:items-center mly:overflow-hidden", children: [
4070
4074
  /* @__PURE__ */ jsx10("label", { htmlFor: selectId, className: "mly:sr-only", children: label }),
4071
4075
  Icon && /* @__PURE__ */ jsx10("div", { className: "mly:pointer-events-none mly:absolute mly:left-2 mly:top-1/2 mly:z-20 mly:flex mly:h-7 mly:-translate-y-1/2 mly:items-center", children: /* @__PURE__ */ jsx10(Icon, { className: cn("mly:size-3.5", iconClassName) }) }),
4072
4076
  /* @__PURE__ */ jsxs5(
@@ -4074,7 +4078,7 @@ function Select(props) {
4074
4078
  {
4075
4079
  id: selectId,
4076
4080
  className: cn(
4077
- "mly-select-padding mly:flex mly:h-7 mly:max-w-max mly:appearance-none mly:items-center mly:rounded-md mly:bg-white mly:text-sm mly:leading-none mly:text-midnight-gray mly:ring-offset-white mly:transition-colors mly:hover:bg-soft-gray mly:focus-visible:relative mly:focus-visible:z-10 mly:focus-visible:outline-hidden mly:focus-visible:ring-2 mly:focus-visible:ring-gray-400 mly:focus-visible:ring-offset-2 mly:active:bg-soft-gray",
4081
+ "menu-option menu-select-control mly-select-padding mly:flex mly:h-7 mly:max-w-max mly:appearance-none mly:items-center mly:rounded-md mly:bg-white mly:text-sm mly:leading-none mly:text-midnight-gray mly:ring-offset-white mly:transition-colors mly:hover:bg-soft-gray mly:focus-visible:relative mly:focus-visible:z-10 mly:focus-visible:outline-hidden mly:focus-visible:ring-2 mly:focus-visible:ring-gray-400 mly:focus-visible:ring-offset-2 mly:active:bg-soft-gray",
4078
4082
  !!Icon && "mly:pl-[25px]",
4079
4083
  className
4080
4084
  ),
@@ -4799,14 +4803,14 @@ function ContentMenu(props) {
4799
4803
  },
4800
4804
  onNodeChange: handleNodeChange,
4801
4805
  className: cn(editor.isEditable ? "mly:visible" : "mly:hidden"),
4802
- children: /* @__PURE__ */ jsx14(TooltipProvider, { children: /* @__PURE__ */ jsxs7("div", { className: "mly:flex mly:items-center mly:pr-1.5", children: [
4806
+ children: /* @__PURE__ */ jsx14(TooltipProvider, { children: /* @__PURE__ */ jsxs7("div", { className: "menu-content-actions-offset mly:flex mly:items-center mly:pr-1.5", children: [
4803
4807
  /* @__PURE__ */ jsxs7(Tooltip, { children: [
4804
4808
  /* @__PURE__ */ jsx14(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx14(
4805
4809
  BaseButton,
4806
4810
  {
4807
4811
  variant: "ghost",
4808
4812
  size: "icon",
4809
- className: "mly:size-5! mly:cursor-grab mly:text-gray-500 mly:hover:text-black",
4813
+ className: "menu-icon-button mly:size-5! mly:cursor-grab mly:text-gray-500 mly:hover:text-black",
4810
4814
  onClick: handleAddNewNode,
4811
4815
  type: "button",
4812
4816
  children: /* @__PURE__ */ jsx14(Plus, { className: "mly:size-3.5 mly:shrink-0" })
@@ -4829,7 +4833,7 @@ function ContentMenu(props) {
4829
4833
  {
4830
4834
  variant: "ghost",
4831
4835
  size: "icon",
4832
- className: "mly:relative mly:z-1 mly:size-5! mly:cursor-grab mly:text-gray-500 mly:hover:text-black",
4836
+ className: "menu-icon-button mly:relative mly:z-1 mly:size-5! mly:cursor-grab mly:text-gray-500 mly:hover:text-black",
4833
4837
  onClick: (e) => {
4834
4838
  e.preventDefault();
4835
4839
  setMenuOpen(true);
@@ -4856,26 +4860,26 @@ function ContentMenu(props) {
4856
4860
  align: "start",
4857
4861
  side: "bottom",
4858
4862
  sideOffset: 8,
4859
- className: "mly:flex mly:w-max mly:flex-col mly:rounded-md mly:border mly:border-gray-200 mly:bg-white mly:p-1 mly:shadow-md",
4863
+ className: "menu-actions-surface mly:flex mly:w-max mly:flex-col mly:rounded-md mly:border mly:border-gray-200 mly:bg-white mly:p-1 mly:shadow-md",
4860
4864
  children: [
4861
4865
  /* @__PURE__ */ jsxs7(
4862
4866
  BaseButton,
4863
4867
  {
4864
4868
  variant: "ghost",
4865
4869
  onClick: duplicateNode,
4866
- className: "mly:h-auto mly:justify-start mly:gap-2 mly:rounded! mly:!px-2 mly:!py-1.5 mly:text-sm mly:font-normal mly:hover:bg-soft-gray",
4870
+ className: "menu-action-item mly:h-auto mly:justify-start mly:gap-2 mly:rounded! mly:!px-2 mly:!py-1.5 mly:text-sm mly:font-normal mly:hover:bg-soft-gray",
4867
4871
  children: [
4868
4872
  /* @__PURE__ */ jsx14(Copy, { className: "mly:size-[15px] mly:shrink-0" }),
4869
4873
  "Duplicate"
4870
4874
  ]
4871
4875
  }
4872
4876
  ),
4873
- /* @__PURE__ */ jsx14(Divider, { type: "horizontal" }),
4877
+ /* @__PURE__ */ jsx14(Divider, { type: "horizontal", className: "menu-actions-divider" }),
4874
4878
  /* @__PURE__ */ jsxs7(
4875
4879
  BaseButton,
4876
4880
  {
4877
4881
  onClick: deleteCurrentNode,
4878
- className: "mly:h-auto mly:justify-start mly:gap-2 mly:rounded! mly:bg-red-100 mly:!px-2 mly:!py-1.5 mly:text-sm mly:font-normal mly:text-red-600 mly:hover:bg-red-200 mly:focus:bg-red-200",
4882
+ className: "menu-action-item menu-action-item-danger mly:h-auto mly:justify-start mly:gap-2 mly:rounded! mly:bg-red-100 mly:!px-2 mly:!py-1.5 mly:text-sm mly:font-normal mly:text-red-600 mly:hover:bg-red-200 mly:focus:bg-red-200",
4879
4883
  children: [
4880
4884
  /* @__PURE__ */ jsx14(Trash2, { className: "mly:size-[15px] mly:shrink-0" }),
4881
4885
  "Delete"
@@ -4891,8 +4895,59 @@ function ContentMenu(props) {
4891
4895
  );
4892
4896
  }
4893
4897
 
4894
- // src/editor/components/editor-menu-bar.tsx
4898
+ // src/editor/components/divider-menu/divider-bubble-menu.tsx
4899
+ import { BubbleMenu as BubbleMenu2 } from "@tiptap/react";
4895
4900
  import { useMemo as useMemo3 } from "react";
4901
+ import { jsx as jsx15 } from "react/jsx-runtime";
4902
+ function DividerBubbleMenu(props) {
4903
+ const { editor, appendTo } = props;
4904
+ if (!editor) {
4905
+ return null;
4906
+ }
4907
+ const items = useMemo3(
4908
+ () => spacing.map((space) => {
4909
+ const { value: size, short: name } = space;
4910
+ return {
4911
+ name,
4912
+ isActive: () => editor.isActive("horizontalRule", { size }),
4913
+ command: () => {
4914
+ editor.chain().focus().updateAttributes("horizontalRule", { size }).run();
4915
+ }
4916
+ };
4917
+ }),
4918
+ [editor]
4919
+ );
4920
+ const bubbleMenuProps = __spreadProps(__spreadValues(__spreadValues({}, props), appendTo ? { appendTo: appendTo.current } : {}), {
4921
+ shouldShow: ({ editor: editor2 }) => {
4922
+ if (!editor2.isEditable) {
4923
+ return false;
4924
+ }
4925
+ return editor2.isActive("horizontalRule");
4926
+ },
4927
+ tippyOptions: {
4928
+ maxWidth: "100%",
4929
+ moveTransition: "mly:transform 0.15s mly:ease-out"
4930
+ }
4931
+ });
4932
+ return /* @__PURE__ */ jsx15(
4933
+ BubbleMenu2,
4934
+ __spreadProps(__spreadValues({}, bubbleMenuProps), {
4935
+ className: "menu-surface mly:flex mly:gap-0.5 mly:rounded-lg mly:border mly:border-gray-200 mly:bg-white mly:p-0.5 mly:shadow-md",
4936
+ children: /* @__PURE__ */ jsx15(TooltipProvider, { children: items.map((item, index) => /* @__PURE__ */ jsx15(
4937
+ BubbleMenuButton,
4938
+ __spreadValues({
4939
+ className: "!mly:h-7 mly:w-7 mly:shrink-0 mly:p-0",
4940
+ iconClassName: "mly:w-3 mly:h-3",
4941
+ nameClassName: "mly:text-xs"
4942
+ }, item),
4943
+ index
4944
+ )) })
4945
+ })
4946
+ );
4947
+ }
4948
+
4949
+ // src/editor/components/editor-menu-bar.tsx
4950
+ import { useMemo as useMemo4 } from "react";
4896
4951
  import {
4897
4952
  AlignCenter,
4898
4953
  AlignLeft,
@@ -4905,10 +4960,10 @@ import {
4905
4960
  StrikethroughIcon,
4906
4961
  UnderlineIcon
4907
4962
  } from "lucide-react";
4908
- import { jsx as jsx15 } from "react/jsx-runtime";
4963
+ import { jsx as jsx16 } from "react/jsx-runtime";
4909
4964
  var EditorMenuBar = (props) => {
4910
4965
  const { editor, config } = props;
4911
- const items = useMemo3(
4966
+ const items = useMemo4(
4912
4967
  () => [
4913
4968
  {
4914
4969
  name: "bold",
@@ -4947,7 +5002,21 @@ var EditorMenuBar = (props) => {
4947
5002
  },
4948
5003
  {
4949
5004
  name: "divider",
4950
- command: () => editor.chain().focus().setHorizontalRule().run(),
5005
+ command: () => {
5006
+ editor.chain().focus().setHorizontalRule().run();
5007
+ const { from } = editor.state.selection;
5008
+ const nearbyPositions = [from, from - 1, from - 2, from + 1];
5009
+ const dividerPos = nearbyPositions.find((pos) => {
5010
+ var _a;
5011
+ if (pos < 0) {
5012
+ return false;
5013
+ }
5014
+ return ((_a = editor.state.doc.nodeAt(pos)) == null ? void 0 : _a.type.name) === "horizontalRule";
5015
+ });
5016
+ if (dividerPos != null) {
5017
+ editor.chain().focus().setNodeSelection(dividerPos).run();
5018
+ }
5019
+ },
4951
5020
  isActive: () => editor.isActive("horizontalRule"),
4952
5021
  group: "custom",
4953
5022
  icon: SeparatorHorizontal
@@ -4992,7 +5061,7 @@ var EditorMenuBar = (props) => {
4992
5061
  ],
4993
5062
  [editor]
4994
5063
  );
4995
- const groups = useMemo3(
5064
+ const groups = useMemo4(
4996
5065
  () => items.reduce((acc, item) => {
4997
5066
  if (!acc.includes(item.group)) {
4998
5067
  acc.push(item.group);
@@ -5004,15 +5073,15 @@ var EditorMenuBar = (props) => {
5004
5073
  if (!editor) {
5005
5074
  return null;
5006
5075
  }
5007
- return /* @__PURE__ */ jsx15(
5076
+ return /* @__PURE__ */ jsx16(
5008
5077
  "div",
5009
5078
  {
5010
5079
  className: `mly:flex mly:items-center mly:gap-3 ${config == null ? void 0 : config.toolbarClassName}`,
5011
- children: groups.map((group, index) => /* @__PURE__ */ jsx15(
5080
+ children: groups.map((group, index) => /* @__PURE__ */ jsx16(
5012
5081
  "div",
5013
5082
  {
5014
5083
  className: "mly:flex mly:items-center mly:gap-1 mly:rounded-md mly:border mly:border-gray-200 mly:bg-white mly:p-1",
5015
- children: items.filter((item) => item.group === group).map((item, index2) => /* @__PURE__ */ jsx15(BubbleMenuButton, __spreadValues({}, item), index2))
5084
+ children: items.filter((item) => item.group === group).map((item, index2) => /* @__PURE__ */ jsx16(BubbleMenuButton, __spreadValues({}, item), index2))
5016
5085
  },
5017
5086
  index
5018
5087
  ))
@@ -5429,7 +5498,7 @@ function ImageUploadPlugin(options) {
5429
5498
 
5430
5499
  // src/editor/extensions/image-upload/image-upload.ts
5431
5500
  import { Extension } from "@tiptap/core";
5432
- import { useMemo as useMemo4 } from "react";
5501
+ import { useMemo as useMemo5 } from "react";
5433
5502
  var ImageUploadExtension = Extension.create({
5434
5503
  name: "imageUpload",
5435
5504
  addOptions() {
@@ -5464,7 +5533,7 @@ var ImageUploadExtension = Extension.create({
5464
5533
  }
5465
5534
  });
5466
5535
  function useImageUploadOptions(editor) {
5467
- return useMemo4(() => {
5536
+ return useMemo5(() => {
5468
5537
  const node = editor.extensionManager.extensions.find(
5469
5538
  (extension) => extension.name === "imageUpload"
5470
5539
  );
@@ -5497,12 +5566,9 @@ function getNewHeight(width, aspectRatio) {
5497
5566
  }
5498
5567
  return width / aspectRatio;
5499
5568
  }
5500
- function getNewWidth(height, aspectRatio) {
5501
- return height * aspectRatio;
5502
- }
5503
5569
 
5504
5570
  // src/editor/nodes/image/image-view.tsx
5505
- import { Fragment as Fragment3, jsx as jsx16, jsxs as jsxs8 } from "react/jsx-runtime";
5571
+ import { Fragment as Fragment3, jsx as jsx17, jsxs as jsxs8 } from "react/jsx-runtime";
5506
5572
  var MIN_WIDTH = 20;
5507
5573
  var IMAGE_MAX_WIDTH = 600;
5508
5574
  var IMAGE_MAX_HEIGHT = 400;
@@ -5576,7 +5642,7 @@ function ImageView(props) {
5576
5642
  if (isPlaceholderImage) {
5577
5643
  return null;
5578
5644
  }
5579
- return /* @__PURE__ */ jsx16(
5645
+ return /* @__PURE__ */ jsx17(
5580
5646
  "div",
5581
5647
  {
5582
5648
  role: "button",
@@ -5761,7 +5827,7 @@ function ImageView(props) {
5761
5827
  onDrop: handleDrop
5762
5828
  } : {}), {
5763
5829
  children: [
5764
- !hasImageSrc && status === "idle" && /* @__PURE__ */ jsx16(
5830
+ !hasImageSrc && status === "idle" && /* @__PURE__ */ jsx17(
5765
5831
  ImageStatusLabel,
5766
5832
  {
5767
5833
  status: "idle",
@@ -5769,11 +5835,11 @@ function ImageView(props) {
5769
5835
  isDropZone: isDroppable
5770
5836
  }
5771
5837
  ),
5772
- !hasImageSrc && status === "loading" && !isSrcVariable && /* @__PURE__ */ jsx16(ImageStatusLabel, { status: "loading", minHeight: height }),
5773
- hasImageSrc && isSrcVariable && /* @__PURE__ */ jsx16(ImageStatusLabel, { status: "variable", minHeight: height }),
5774
- hasImageSrc && status === "loading" && !isSrcVariable && /* @__PURE__ */ jsx16(ImageStatusLabel, { status: "loading", minHeight: height }),
5775
- hasImageSrc && status === "error" && !isSrcVariable && /* @__PURE__ */ jsx16(ImageStatusLabel, { status: "error", minHeight: height }),
5776
- isDroppable && /* @__PURE__ */ jsx16(
5838
+ !hasImageSrc && status === "loading" && !isSrcVariable && /* @__PURE__ */ jsx17(ImageStatusLabel, { status: "loading", minHeight: height }),
5839
+ hasImageSrc && isSrcVariable && /* @__PURE__ */ jsx17(ImageStatusLabel, { status: "variable", minHeight: height }),
5840
+ hasImageSrc && status === "loading" && !isSrcVariable && /* @__PURE__ */ jsx17(ImageStatusLabel, { status: "loading", minHeight: height }),
5841
+ hasImageSrc && status === "error" && !isSrcVariable && /* @__PURE__ */ jsx17(ImageStatusLabel, { status: "error", minHeight: height }),
5842
+ isDroppable && /* @__PURE__ */ jsx17(
5777
5843
  "input",
5778
5844
  {
5779
5845
  type: "file",
@@ -5784,7 +5850,7 @@ function ImageView(props) {
5784
5850
  }
5785
5851
  ),
5786
5852
  hasImageSrc && status === "loaded" && !isSrcVariable && /* @__PURE__ */ jsxs8(Fragment3, { children: [
5787
- /* @__PURE__ */ jsx16(
5853
+ /* @__PURE__ */ jsx17(
5788
5854
  "img",
5789
5855
  __spreadProps(__spreadValues({}, attrs), {
5790
5856
  ref: imgRef,
@@ -5810,7 +5876,7 @@ function ImageView(props) {
5810
5876
  { right: 0, top: 0, height: "100%", width: "1px" },
5811
5877
  { top: 0, left: 0, width: "100%", height: "1px" },
5812
5878
  { bottom: 0, left: 0, width: "100%", height: "1px" }
5813
- ].map((style, i) => /* @__PURE__ */ jsx16(
5879
+ ].map((style, i) => /* @__PURE__ */ jsx17(
5814
5880
  "div",
5815
5881
  {
5816
5882
  className: "mly:bg-rose-500",
@@ -5853,24 +5919,24 @@ function ImageStatusLabel(props) {
5853
5919
  } : {}), style),
5854
5920
  children: [
5855
5921
  status === "idle" && !isDropZone && /* @__PURE__ */ jsxs8(Fragment3, { children: [
5856
- /* @__PURE__ */ jsx16(ImageOffIcon, { className: "mly:size-4 mly:stroke-[2.5]" }),
5857
- /* @__PURE__ */ jsx16("span", { children: "No image selected" })
5922
+ /* @__PURE__ */ jsx17(ImageOffIcon, { className: "mly:size-4 mly:stroke-[2.5]" }),
5923
+ /* @__PURE__ */ jsx17("span", { children: "No image selected" })
5858
5924
  ] }),
5859
5925
  status === "idle" && isDropZone && /* @__PURE__ */ jsxs8(Fragment3, { children: [
5860
- /* @__PURE__ */ jsx16(GrabIcon, { className: "mly:size-4 mly:stroke-[2.5]" }),
5861
- /* @__PURE__ */ jsx16("span", { children: "Click or Drop image here" })
5926
+ /* @__PURE__ */ jsx17(GrabIcon, { className: "mly:size-4 mly:stroke-[2.5]" }),
5927
+ /* @__PURE__ */ jsx17("span", { children: "Click or Drop image here" })
5862
5928
  ] }),
5863
5929
  status === "loading" && /* @__PURE__ */ jsxs8(Fragment3, { children: [
5864
- /* @__PURE__ */ jsx16(Loader2, { className: "mly:size-4 mly:animate-spin mly:stroke-[2.5]" }),
5865
- /* @__PURE__ */ jsx16("span", { children: "Loading image..." })
5930
+ /* @__PURE__ */ jsx17(Loader2, { className: "mly:size-4 mly:animate-spin mly:stroke-[2.5]" }),
5931
+ /* @__PURE__ */ jsx17("span", { children: "Loading image..." })
5866
5932
  ] }),
5867
5933
  status === "error" && /* @__PURE__ */ jsxs8(Fragment3, { children: [
5868
- /* @__PURE__ */ jsx16(Ban, { className: "mly:size-4 mly:stroke-[2.5]" }),
5869
- /* @__PURE__ */ jsx16("span", { children: "Error loading image" })
5934
+ /* @__PURE__ */ jsx17(Ban, { className: "mly:size-4 mly:stroke-[2.5]" }),
5935
+ /* @__PURE__ */ jsx17("span", { children: "Error loading image" })
5870
5936
  ] }),
5871
5937
  status === "variable" && /* @__PURE__ */ jsxs8(Fragment3, { children: [
5872
- /* @__PURE__ */ jsx16(BracesIcon, { className: "mly:size-4 mly:stroke-[2.5]" }),
5873
- /* @__PURE__ */ jsx16("span", { children: "Variable Image URL" })
5938
+ /* @__PURE__ */ jsx17(BracesIcon, { className: "mly:size-4 mly:stroke-[2.5]" }),
5939
+ /* @__PURE__ */ jsx17("span", { children: "Variable Image URL" })
5874
5940
  ] })
5875
5941
  ]
5876
5942
  })
@@ -5878,7 +5944,7 @@ function ImageStatusLabel(props) {
5878
5944
  }
5879
5945
 
5880
5946
  // src/editor/nodes/logo/logo-view.tsx
5881
- import { jsx as jsx17, jsxs as jsxs9 } from "react/jsx-runtime";
5947
+ import { jsx as jsx18, jsxs as jsxs9 } from "react/jsx-runtime";
5882
5948
  function LogoView(props) {
5883
5949
  const { node, editor, updateAttributes: updateAttributes2 } = props;
5884
5950
  const [status, setStatus] = useState5("idle");
@@ -6004,7 +6070,7 @@ function LogoView(props) {
6004
6070
  onDrop: handleDrop
6005
6071
  } : {}), {
6006
6072
  children: [
6007
- !hasImageSrc && status === "idle" && /* @__PURE__ */ jsx17(
6073
+ !hasImageSrc && status === "idle" && /* @__PURE__ */ jsx18(
6008
6074
  ImageStatusLabel,
6009
6075
  {
6010
6076
  status: "idle",
@@ -6012,11 +6078,11 @@ function LogoView(props) {
6012
6078
  isDropZone: isDroppable
6013
6079
  }
6014
6080
  ),
6015
- !hasImageSrc && status === "loading" && !isSrcVariable && /* @__PURE__ */ jsx17(ImageStatusLabel, { status: "loading", minHeight: logoSize }),
6016
- hasImageSrc && isSrcVariable && /* @__PURE__ */ jsx17(ImageStatusLabel, { status: "variable", minHeight: logoSize }),
6017
- hasImageSrc && status === "loading" && !isSrcVariable && /* @__PURE__ */ jsx17(ImageStatusLabel, { status: "loading", minHeight: logoSize }),
6018
- hasImageSrc && status === "error" && !isSrcVariable && /* @__PURE__ */ jsx17(ImageStatusLabel, { status: "error", minHeight: logoSize }),
6019
- isDroppable && /* @__PURE__ */ jsx17(
6081
+ !hasImageSrc && status === "loading" && !isSrcVariable && /* @__PURE__ */ jsx18(ImageStatusLabel, { status: "loading", minHeight: logoSize }),
6082
+ hasImageSrc && isSrcVariable && /* @__PURE__ */ jsx18(ImageStatusLabel, { status: "variable", minHeight: logoSize }),
6083
+ hasImageSrc && status === "loading" && !isSrcVariable && /* @__PURE__ */ jsx18(ImageStatusLabel, { status: "loading", minHeight: logoSize }),
6084
+ hasImageSrc && status === "error" && !isSrcVariable && /* @__PURE__ */ jsx18(ImageStatusLabel, { status: "error", minHeight: logoSize }),
6085
+ isDroppable && /* @__PURE__ */ jsx18(
6020
6086
  "input",
6021
6087
  {
6022
6088
  type: "file",
@@ -6026,7 +6092,7 @@ function LogoView(props) {
6026
6092
  multiple: false
6027
6093
  }
6028
6094
  ),
6029
- hasImageSrc && status === "loaded" && !isSrcVariable && /* @__PURE__ */ jsx17(
6095
+ hasImageSrc && status === "loaded" && !isSrcVariable && /* @__PURE__ */ jsx18(
6030
6096
  "img",
6031
6097
  {
6032
6098
  src: logoSrc,
@@ -6177,13 +6243,13 @@ var borderRadius = [
6177
6243
  ];
6178
6244
 
6179
6245
  // src/editor/components/image-menu/image-bubble-menu.tsx
6180
- import { BubbleMenu as BubbleMenu2 } from "@tiptap/react";
6181
- import { ImageDown, LockIcon, LockOpenIcon } from "lucide-react";
6246
+ import { BubbleMenu as BubbleMenu3 } from "@tiptap/react";
6247
+ import { LockIcon, LockOpenIcon } from "lucide-react";
6182
6248
  import { sticky as sticky2 } from "tippy.js";
6183
6249
 
6184
6250
  // src/editor/components/alignment-switch.tsx
6185
6251
  import { AlignCenter as AlignCenter2, AlignLeft as AlignLeft2, AlignRight as AlignRight2 } from "lucide-react";
6186
- import { jsx as jsx18, jsxs as jsxs10 } from "react/jsx-runtime";
6252
+ import { jsx as jsx19, jsxs as jsxs10 } from "react/jsx-runtime";
6187
6253
  function AlignmentSwitch(props) {
6188
6254
  const { alignment: rawAlignment, onAlignmentChange } = props;
6189
6255
  const alignment = allowedLogoAlignment.includes(
@@ -6215,16 +6281,16 @@ function AlignmentSwitch(props) {
6215
6281
  const activeAlignment = alignments[alignment];
6216
6282
  return /* @__PURE__ */ jsxs10(Popover, { children: [
6217
6283
  /* @__PURE__ */ jsxs10(Tooltip, { children: [
6218
- /* @__PURE__ */ jsx18(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx18(
6284
+ /* @__PURE__ */ jsx19(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx19(
6219
6285
  PopoverTrigger,
6220
6286
  {
6221
6287
  className: cn(
6222
- "mly:flex mly:size-7 mly:items-center mly:justify-center mly:gap-1 mly:rounded-md mly:px-1.5 mly:text-sm mly:data-[state=open]:bg-soft-gray mly:hover:bg-soft-gray mly:focus-visible:relative mly:focus-visible:z-10 mly:focus-visible:outline-hidden mly:focus-visible:ring-2 mly:focus-visible:ring-gray-400 mly:focus-visible:ring-offset-2"
6288
+ "menu-option mly:flex mly:size-7 mly:items-center mly:justify-center mly:gap-1 mly:rounded-md mly:px-1.5 mly:text-sm mly:data-[state=open]:bg-soft-gray mly:hover:bg-soft-gray mly:focus-visible:relative mly:focus-visible:z-10 mly:focus-visible:outline-hidden mly:focus-visible:ring-2 mly:focus-visible:ring-gray-400 mly:focus-visible:ring-offset-2"
6223
6289
  ),
6224
- children: /* @__PURE__ */ jsx18(activeAlignment.icon, { className: "mly:h-3 mly:w-3 mly:stroke-[2.5]" })
6290
+ children: /* @__PURE__ */ jsx19(activeAlignment.icon, { className: "mly:h-3 mly:w-3 mly:stroke-[2.5]" })
6225
6291
  }
6226
6292
  ) }),
6227
- /* @__PURE__ */ jsx18(
6293
+ /* @__PURE__ */ jsx19(
6228
6294
  TooltipContent,
6229
6295
  {
6230
6296
  sideOffset: 8,
@@ -6233,7 +6299,7 @@ function AlignmentSwitch(props) {
6233
6299
  }
6234
6300
  )
6235
6301
  ] }),
6236
- /* @__PURE__ */ jsx18(
6302
+ /* @__PURE__ */ jsx19(
6237
6303
  PopoverContent,
6238
6304
  {
6239
6305
  className: "mly:flex mly:w-max mly:gap-0.5 mly:rounded-lg mly:p-0.5!",
@@ -6247,7 +6313,7 @@ function AlignmentSwitch(props) {
6247
6313
  e.preventDefault();
6248
6314
  },
6249
6315
  children: Object.entries(alignments).map(([key, value]) => {
6250
- return /* @__PURE__ */ jsx18(
6316
+ return /* @__PURE__ */ jsx19(
6251
6317
  BubbleMenuButton,
6252
6318
  {
6253
6319
  icon: value.icon,
@@ -6263,6 +6329,300 @@ function AlignmentSwitch(props) {
6263
6329
  ] });
6264
6330
  }
6265
6331
 
6332
+ // src/editor/components/image-menu/use-image-state.tsx
6333
+ import { useEditorState as useEditorState2 } from "@tiptap/react";
6334
+ import deepEql2 from "fast-deep-equal";
6335
+ var useImageState = (editor) => {
6336
+ const states = useEditorState2({
6337
+ editor,
6338
+ selector: ({ editor: editor2 }) => {
6339
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
6340
+ return {
6341
+ width: String(editor2.getAttributes("image").width),
6342
+ height: String(editor2.getAttributes("image").height),
6343
+ isImageActive: editor2.isActive("image"),
6344
+ isLogoActive: editor2.isActive("logo"),
6345
+ alignment: ((_a = editor2.getAttributes("image")) == null ? void 0 : _a.alignment) || ((_b = editor2.getAttributes("logo")) == null ? void 0 : _b.alignment),
6346
+ borderRadius: (_c = editor2.getAttributes("image")) == null ? void 0 : _c.borderRadius,
6347
+ logoSize: ((_d = editor2.getAttributes("logo")) == null ? void 0 : _d.size) || DEFAULT_LOGO_SIZE,
6348
+ imageSrc: ((_e = editor2.getAttributes("image")) == null ? void 0 : _e.src) || ((_f = editor2.getAttributes("logo")) == null ? void 0 : _f.src) || "",
6349
+ isSrcVariable: (_j = (_i = (_g = editor2.getAttributes("image")) == null ? void 0 : _g.isSrcVariable) != null ? _i : (_h = editor2.getAttributes("logo")) == null ? void 0 : _h.isSrcVariable) != null ? _j : false,
6350
+ imageExternalLink: ((_k = editor2.getAttributes("image")) == null ? void 0 : _k.externalLink) || "",
6351
+ isExternalLinkVariable: (_l = editor2.getAttributes("image")) == null ? void 0 : _l.isExternalLinkVariable,
6352
+ lockAspectRatio: (_m = editor2.getAttributes("image")) == null ? void 0 : _m.lockAspectRatio,
6353
+ aspectRatio: (_n = editor2.getAttributes("image")) == null ? void 0 : _n.aspectRatio,
6354
+ currentShowIfKey: ((_o = editor2.getAttributes("image")) == null ? void 0 : _o.showIfKey) || ((_p = editor2.getAttributes("logo")) == null ? void 0 : _p.showIfKey) || ""
6355
+ };
6356
+ },
6357
+ equalityFn: deepEql2
6358
+ });
6359
+ return states;
6360
+ };
6361
+
6362
+ // src/editor/components/image-menu/image-bubble-menu.tsx
6363
+ import { Fragment as Fragment4, jsx as jsx20, jsxs as jsxs11 } from "react/jsx-runtime";
6364
+ function ImageBubbleMenu(props) {
6365
+ const { editor, appendTo } = props;
6366
+ if (!editor) {
6367
+ return null;
6368
+ }
6369
+ const state = useImageState(editor);
6370
+ const bubbleMenuProps = __spreadProps(__spreadValues(__spreadValues({}, props), appendTo ? { appendTo: appendTo.current } : {}), {
6371
+ shouldShow: ({ editor: editor2 }) => {
6372
+ if (!editor2.isEditable) {
6373
+ return false;
6374
+ }
6375
+ return editor2.isActive("logo") || editor2.isActive("image");
6376
+ },
6377
+ tippyOptions: {
6378
+ popperOptions: {
6379
+ modifiers: [{ name: "flip", enabled: false }]
6380
+ },
6381
+ plugins: [sticky2],
6382
+ sticky: "popper",
6383
+ maxWidth: "100%"
6384
+ }
6385
+ });
6386
+ const { lockAspectRatio } = state;
6387
+ return /* @__PURE__ */ jsx20(
6388
+ BubbleMenu3,
6389
+ __spreadProps(__spreadValues({}, bubbleMenuProps), {
6390
+ className: "menu-surface image-menu-surface mly:flex mly:rounded-lg mly:border mly:border-gray-200 mly:bg-white mly:p-0.5 mly:shadow-md",
6391
+ children: /* @__PURE__ */ jsxs11(TooltipProvider, { children: [
6392
+ state.isLogoActive && state.imageSrc && /* @__PURE__ */ jsxs11(Fragment4, { children: [
6393
+ /* @__PURE__ */ jsx20(
6394
+ Select,
6395
+ {
6396
+ label: "Size",
6397
+ tooltip: "Size",
6398
+ value: state.logoSize,
6399
+ options: allowedLogoSize.map((size) => ({
6400
+ value: size,
6401
+ label: size
6402
+ })),
6403
+ onValueChange: (value) => {
6404
+ editor == null ? void 0 : editor.chain().focus().setLogoAttributes({ size: value }).run();
6405
+ }
6406
+ }
6407
+ ),
6408
+ /* @__PURE__ */ jsx20(Divider, {})
6409
+ ] }),
6410
+ /* @__PURE__ */ jsx20("div", { className: "menu-inline-gap mly:flex mly:gap-x-0.5", children: /* @__PURE__ */ jsx20(
6411
+ AlignmentSwitch,
6412
+ {
6413
+ alignment: state.alignment,
6414
+ onAlignmentChange: (alignment) => {
6415
+ const isCurrentNodeImage = state.isImageActive;
6416
+ if (!isCurrentNodeImage) {
6417
+ editor == null ? void 0 : editor.chain().focus().setLogoAttributes({ alignment }).run();
6418
+ } else {
6419
+ editor == null ? void 0 : editor.chain().focus().updateAttributes("image", { alignment }).run();
6420
+ }
6421
+ }
6422
+ }
6423
+ ) }),
6424
+ state.isImageActive && state.imageSrc && /* @__PURE__ */ jsxs11(Fragment4, { children: [
6425
+ /* @__PURE__ */ jsx20(Divider, {}),
6426
+ /* @__PURE__ */ jsx20(
6427
+ Select,
6428
+ {
6429
+ label: "Border Radius",
6430
+ value: state == null ? void 0 : state.borderRadius,
6431
+ options: borderRadius.map((value) => ({
6432
+ value: String(value.value),
6433
+ label: value.name
6434
+ })),
6435
+ onValueChange: (value) => {
6436
+ editor == null ? void 0 : editor.chain().updateAttributes("image", {
6437
+ borderRadius: Number(value)
6438
+ }).run();
6439
+ },
6440
+ tooltip: "Border Radius",
6441
+ className: "mly:capitalize"
6442
+ }
6443
+ ),
6444
+ /* @__PURE__ */ jsx20("div", { className: "menu-inline-gap mly:flex mly:gap-x-0.5", children: /* @__PURE__ */ jsx20(
6445
+ BubbleMenuButton,
6446
+ {
6447
+ isActive: () => lockAspectRatio,
6448
+ command: () => {
6449
+ const width = Number(state.width) || 0;
6450
+ const height = Number(state.height) || 0;
6451
+ const aspectRatio = width / height;
6452
+ editor == null ? void 0 : editor.chain().updateAttributes("image", {
6453
+ lockAspectRatio: !lockAspectRatio,
6454
+ aspectRatio
6455
+ }).run();
6456
+ },
6457
+ icon: lockAspectRatio ? LockIcon : LockOpenIcon,
6458
+ tooltip: "Lock Aspect Ratio"
6459
+ }
6460
+ ) })
6461
+ ] })
6462
+ ] })
6463
+ })
6464
+ );
6465
+ }
6466
+
6467
+ // src/editor/components/inline-image-menu/inline-image-bubble-menu.tsx
6468
+ import { BubbleMenu as BubbleMenu4 } from "@tiptap/react";
6469
+ import { sticky as sticky3 } from "tippy.js";
6470
+
6471
+ // src/editor/components/image-menu/image-size.tsx
6472
+ import { jsx as jsx21, jsxs as jsxs12 } from "react/jsx-runtime";
6473
+ function ImageSize(props) {
6474
+ const { value, onValueChange, dimension } = props;
6475
+ return /* @__PURE__ */ jsxs12("label", { className: "menu-option image-size-control mly:relative mly:flex mly:items-center", children: [
6476
+ /* @__PURE__ */ jsx21("span", { className: "mly:absolute mly:inset-y-0 mly:left-2 mly:flex mly:items-center mly:text-xs mly:leading-none mly:text-gray-400", children: dimension === "width" ? "W" : "H" }),
6477
+ /* @__PURE__ */ jsx21(
6478
+ "input",
6479
+ __spreadProps(__spreadValues({}, AUTOCOMPLETE_PASSWORD_MANAGERS_OFF), {
6480
+ className: "hide-number-controls image-size-input mly:h-auto mly:max-w-20 mly:appearance-none mly:border-0 mly:border-none mly:p-1 mly:px-[26px] mly:text-sm mly:uppercase mly:tabular-nums mly:outline-hidden mly:focus-visible:outline-hidden",
6481
+ type: "number",
6482
+ value,
6483
+ onChange: (e) => onValueChange(e.target.value)
6484
+ })
6485
+ ),
6486
+ /* @__PURE__ */ jsx21("span", { className: "mly:absolute mly:inset-y-0 mly:right-1 mly:flex mly:items-center mly:text-xs mly:leading-none mly:text-gray-400", children: "PX" })
6487
+ ] });
6488
+ }
6489
+
6490
+ // src/editor/nodes/inline-image/inline-image.tsx
6491
+ import { mergeAttributes as mergeAttributes3, Node as Node4 } from "@tiptap/core";
6492
+ import { PluginKey as PluginKey3, Plugin as Plugin3 } from "@tiptap/pm/state";
6493
+ var DEFAULT_INLINE_IMAGE_HEIGHT = 20;
6494
+ var DEFAULT_INLINE_IMAGE_WIDTH = 20;
6495
+ var InlineImageExtension = Node4.create({
6496
+ name: "inlineImage",
6497
+ inline: true,
6498
+ group: "inline",
6499
+ selectable: false,
6500
+ addOptions() {
6501
+ return {
6502
+ HTMLAttributes: {}
6503
+ };
6504
+ },
6505
+ addAttributes() {
6506
+ return {
6507
+ height: {
6508
+ default: DEFAULT_INLINE_IMAGE_HEIGHT
6509
+ },
6510
+ width: {
6511
+ default: DEFAULT_INLINE_IMAGE_WIDTH
6512
+ },
6513
+ src: {
6514
+ default: null
6515
+ },
6516
+ isSrcVariable: {
6517
+ default: false,
6518
+ renderHTML(attributes) {
6519
+ if (!attributes.isSrcVariable) {
6520
+ return {};
6521
+ }
6522
+ return {
6523
+ "data-is-src-variable": "true"
6524
+ };
6525
+ }
6526
+ },
6527
+ alt: {
6528
+ default: null
6529
+ },
6530
+ title: {
6531
+ default: null
6532
+ },
6533
+ externalLink: {
6534
+ default: null,
6535
+ renderHTML(attributes) {
6536
+ if (!attributes.externalLink) {
6537
+ return {};
6538
+ }
6539
+ return {
6540
+ "data-external-link": attributes.externalLink
6541
+ };
6542
+ }
6543
+ },
6544
+ isExternalLinkVariable: {
6545
+ default: false,
6546
+ renderHTML(attributes) {
6547
+ if (!attributes.isExternalLinkVariable) {
6548
+ return {};
6549
+ }
6550
+ return {
6551
+ "data-is-external-link-variable": "true"
6552
+ };
6553
+ }
6554
+ }
6555
+ };
6556
+ },
6557
+ parseHTML() {
6558
+ return [
6559
+ {
6560
+ tag: `img[data-type="${this.name}"]`
6561
+ }
6562
+ ];
6563
+ },
6564
+ renderHTML({ HTMLAttributes: HTMLAttributes2 }) {
6565
+ const attrs = mergeAttributes3(this.options.HTMLAttributes, HTMLAttributes2, {
6566
+ "data-type": this.name,
6567
+ class: "mly:relative",
6568
+ style: `display: inline; --mly-inline-image-height: ${HTMLAttributes2.height}px; --mly-inline-image-width: ${HTMLAttributes2.width}px; margin:0; vertical-align: middle;`,
6569
+ draggable: "false",
6570
+ loading: "lazy"
6571
+ });
6572
+ return ["img", attrs];
6573
+ },
6574
+ addCommands() {
6575
+ return {
6576
+ setInlineImage: (options) => ({ commands }) => {
6577
+ return commands.insertContent({
6578
+ type: this.name,
6579
+ attrs: options
6580
+ });
6581
+ }
6582
+ };
6583
+ },
6584
+ addProseMirrorPlugins() {
6585
+ return [
6586
+ new Plugin3({
6587
+ key: new PluginKey3("inlineImage"),
6588
+ props: {
6589
+ handleClickOn: (_, pos, node) => {
6590
+ if (node.type !== this.type) {
6591
+ return false;
6592
+ }
6593
+ const from = pos;
6594
+ const to = pos + node.nodeSize;
6595
+ this.editor.commands.setTextSelection({ from, to });
6596
+ return true;
6597
+ }
6598
+ }
6599
+ })
6600
+ ];
6601
+ }
6602
+ });
6603
+
6604
+ // src/editor/components/inline-image-menu/use-inline-image-state.tsx
6605
+ import { useEditorState as useEditorState3 } from "@tiptap/react";
6606
+ import deepEql3 from "fast-deep-equal";
6607
+ var useInlineImageState = (editor) => {
6608
+ const states = useEditorState3({
6609
+ editor,
6610
+ selector: ({ editor: editor2 }) => {
6611
+ var _a, _b, _c, _d, _e, _f, _g, _h;
6612
+ return {
6613
+ height: ((_a = editor2.getAttributes("inlineImage")) == null ? void 0 : _a.height) || DEFAULT_INLINE_IMAGE_HEIGHT,
6614
+ width: ((_b = editor2.getAttributes("inlineImage")) == null ? void 0 : _b.width) || DEFAULT_INLINE_IMAGE_WIDTH,
6615
+ src: ((_c = editor2.getAttributes("inlineImage")) == null ? void 0 : _c.src) || "",
6616
+ isSrcVariable: (_e = (_d = editor2.getAttributes("inlineImage")) == null ? void 0 : _d.isSrcVariable) != null ? _e : false,
6617
+ imageExternalLink: ((_f = editor2.getAttributes("inlineImage")) == null ? void 0 : _f.externalLink) || "",
6618
+ isExternalLinkVariable: (_h = (_g = editor2.getAttributes("inlineImage")) == null ? void 0 : _g.isExternalLinkVariable) != null ? _h : false
6619
+ };
6620
+ },
6621
+ equalityFn: deepEql3
6622
+ });
6623
+ return states;
6624
+ };
6625
+
6266
6626
  // src/editor/components/ui/link-input-popover.tsx
6267
6627
  import { Link, LinkIcon as LinkIcon2 } from "lucide-react";
6268
6628
  import { useRef as useRef7, useState as useState7 } from "react";
@@ -6275,12 +6635,12 @@ import { FootprintsIcon as FootprintsIcon2, Heading1 as Heading12 } from "lucide
6275
6635
 
6276
6636
  // src/blocks/button.tsx
6277
6637
  import { MousePointer, ArrowUpRightSquare } from "lucide-react";
6278
- import { jsx as jsx19 } from "react/jsx-runtime";
6638
+ import { jsx as jsx22 } from "react/jsx-runtime";
6279
6639
  var button = {
6280
6640
  title: "Button",
6281
6641
  description: "Add a call to action button to email.",
6282
6642
  searchTerms: ["link", "button", "cta"],
6283
- icon: /* @__PURE__ */ jsx19(MousePointer, { className: "mly:h-4 mly:w-4" }),
6643
+ icon: /* @__PURE__ */ jsx22(MousePointer, { className: "mly:h-4 mly:w-4" }),
6284
6644
  command: ({ editor, range }) => {
6285
6645
  editor.chain().focus().deleteRange(range).setButton().run();
6286
6646
  }
@@ -6289,7 +6649,7 @@ var linkCard = {
6289
6649
  title: "Link Card",
6290
6650
  description: "Add a link card to email.",
6291
6651
  searchTerms: ["link", "button", "image"],
6292
- icon: /* @__PURE__ */ jsx19(ArrowUpRightSquare, { className: "mly:h-4 mly:w-4" }),
6652
+ icon: /* @__PURE__ */ jsx22(ArrowUpRightSquare, { className: "mly:h-4 mly:w-4" }),
6293
6653
  command: ({ editor, range }) => {
6294
6654
  editor.chain().focus().deleteRange(range).setLinkCard().run();
6295
6655
  },
@@ -6302,12 +6662,12 @@ var linkCard = {
6302
6662
 
6303
6663
  // src/blocks/code.tsx
6304
6664
  import { CodeXmlIcon } from "lucide-react";
6305
- import { jsx as jsx20 } from "react/jsx-runtime";
6665
+ import { jsx as jsx23 } from "react/jsx-runtime";
6306
6666
  var htmlCodeBlock = {
6307
6667
  title: "Custom HTML",
6308
6668
  description: "Insert a custom HTML block",
6309
6669
  searchTerms: ["html", "code", "custom"],
6310
- icon: /* @__PURE__ */ jsx20(CodeXmlIcon, { className: "mly:h-4 mly:w-4" }),
6670
+ icon: /* @__PURE__ */ jsx23(CodeXmlIcon, { className: "mly:h-4 mly:w-4" }),
6311
6671
  command: ({ editor, range }) => {
6312
6672
  editor.chain().focus().deleteRange(range).setHtmlCodeBlock({ language: "html" }).run();
6313
6673
  }
@@ -6316,12 +6676,12 @@ var htmlCodeBlock = {
6316
6676
  // src/blocks/image.tsx
6317
6677
  import { TextSelection as TextSelection2 } from "@tiptap/pm/state";
6318
6678
  import { ImageIcon } from "lucide-react";
6319
- import { jsx as jsx21 } from "react/jsx-runtime";
6679
+ import { jsx as jsx24 } from "react/jsx-runtime";
6320
6680
  var image = {
6321
6681
  title: "Image",
6322
6682
  description: "Full width image",
6323
6683
  searchTerms: ["image"],
6324
- icon: /* @__PURE__ */ jsx21(ImageIcon, { className: "mly:h-4 mly:w-4" }),
6684
+ icon: /* @__PURE__ */ jsx24(ImageIcon, { className: "mly:h-4 mly:w-4" }),
6325
6685
  command: ({ editor, range }) => {
6326
6686
  editor.chain().focus().deleteRange(range).setImage({ src: "" }).run();
6327
6687
  }
@@ -6330,7 +6690,7 @@ var logo = {
6330
6690
  title: "Logo",
6331
6691
  description: "Add your brand logo",
6332
6692
  searchTerms: ["image", "logo"],
6333
- icon: /* @__PURE__ */ jsx21(ImageIcon, { className: "mly:h-4 mly:w-4" }),
6693
+ icon: /* @__PURE__ */ jsx24(ImageIcon, { className: "mly:h-4 mly:w-4" }),
6334
6694
  command: ({ editor, range }) => {
6335
6695
  editor.chain().focus().deleteRange(range).setLogoImage({ src: "" }).run();
6336
6696
  }
@@ -6339,7 +6699,7 @@ var inlineImage = {
6339
6699
  title: "Inline Image",
6340
6700
  description: "Inline image",
6341
6701
  searchTerms: ["image", "inline"],
6342
- icon: /* @__PURE__ */ jsx21(ImageIcon, { className: "mly:h-4 mly:w-4" }),
6702
+ icon: /* @__PURE__ */ jsx24(ImageIcon, { className: "mly:h-4 mly:w-4" }),
6343
6703
  command: ({ editor, range }) => {
6344
6704
  editor.chain().focus().deleteRange(range).setInlineImage({
6345
6705
  src: "https://maily.to/brand/logo.png"
@@ -6369,12 +6729,12 @@ import {
6369
6729
  RectangleHorizontal,
6370
6730
  Minus
6371
6731
  } from "lucide-react";
6372
- import { jsx as jsx22 } from "react/jsx-runtime";
6732
+ import { jsx as jsx25 } from "react/jsx-runtime";
6373
6733
  var columns = {
6374
6734
  title: "Columns",
6375
6735
  description: "Add columns to email.",
6376
6736
  searchTerms: ["layout", "columns"],
6377
- icon: /* @__PURE__ */ jsx22(ColumnsIcon, { className: "mly:h-4 mly:w-4" }),
6737
+ icon: /* @__PURE__ */ jsx25(ColumnsIcon, { className: "mly:h-4 mly:w-4" }),
6378
6738
  command: ({ editor, range }) => {
6379
6739
  editor.chain().focus().deleteRange(range).setColumns().focus(editor.state.selection.head - 2).run();
6380
6740
  }
@@ -6383,7 +6743,7 @@ var section = {
6383
6743
  title: "Section",
6384
6744
  description: "Add a section to email.",
6385
6745
  searchTerms: ["layout", "section"],
6386
- icon: /* @__PURE__ */ jsx22(RectangleHorizontal, { className: "mly:h-4 mly:w-4" }),
6746
+ icon: /* @__PURE__ */ jsx25(RectangleHorizontal, { className: "mly:h-4 mly:w-4" }),
6387
6747
  command: ({ editor, range }) => {
6388
6748
  editor.chain().focus().deleteRange(range).setSection().run();
6389
6749
  }
@@ -6392,7 +6752,7 @@ var repeat = {
6392
6752
  title: "Repeat",
6393
6753
  description: "Loop over an array of items.",
6394
6754
  searchTerms: ["repeat", "for", "loop"],
6395
- icon: /* @__PURE__ */ jsx22(Repeat2, { className: "mly:h-4 mly:w-4" }),
6755
+ icon: /* @__PURE__ */ jsx25(Repeat2, { className: "mly:h-4 mly:w-4" }),
6396
6756
  command: ({ editor, range }) => {
6397
6757
  editor.chain().focus().deleteRange(range).setRepeat().run();
6398
6758
  }
@@ -6401,7 +6761,7 @@ var spacer = {
6401
6761
  title: "Spacer",
6402
6762
  description: "Add space between blocks.",
6403
6763
  searchTerms: ["space", "gap", "divider"],
6404
- icon: /* @__PURE__ */ jsx22(MoveVertical, { className: "mly:h-4 mly:w-4" }),
6764
+ icon: /* @__PURE__ */ jsx25(MoveVertical, { className: "mly:h-4 mly:w-4" }),
6405
6765
  command: ({ editor, range }) => {
6406
6766
  editor.chain().focus().deleteRange(range).setSpacer({ height: "sm" }).run();
6407
6767
  }
@@ -6410,20 +6770,32 @@ var divider = {
6410
6770
  title: "Divider",
6411
6771
  description: "Add a horizontal divider.",
6412
6772
  searchTerms: ["divider", "line"],
6413
- icon: /* @__PURE__ */ jsx22(Minus, { className: "mly:h-4 mly:w-4" }),
6773
+ icon: /* @__PURE__ */ jsx25(Minus, { className: "mly:h-4 mly:w-4" }),
6414
6774
  command: ({ editor, range }) => {
6415
6775
  editor.chain().focus().deleteRange(range).setHorizontalRule().run();
6776
+ const { from } = editor.state.selection;
6777
+ const nearbyPositions = [from, from - 1, from - 2, from + 1];
6778
+ const dividerPos = nearbyPositions.find((pos) => {
6779
+ var _a;
6780
+ if (pos < 0) {
6781
+ return false;
6782
+ }
6783
+ return ((_a = editor.state.doc.nodeAt(pos)) == null ? void 0 : _a.type.name) === "horizontalRule";
6784
+ });
6785
+ if (dividerPos != null) {
6786
+ editor.chain().focus().setNodeSelection(dividerPos).run();
6787
+ }
6416
6788
  }
6417
6789
  };
6418
6790
 
6419
6791
  // src/blocks/list.tsx
6420
6792
  import { List, ListOrdered } from "lucide-react";
6421
- import { jsx as jsx23 } from "react/jsx-runtime";
6793
+ import { jsx as jsx26 } from "react/jsx-runtime";
6422
6794
  var bulletList = {
6423
6795
  title: "Bullet List",
6424
6796
  description: "Create a simple bullet list.",
6425
6797
  searchTerms: ["unordered", "point"],
6426
- icon: /* @__PURE__ */ jsx23(List, { className: "mly:h-4 mly:w-4" }),
6798
+ icon: /* @__PURE__ */ jsx26(List, { className: "mly:h-4 mly:w-4" }),
6427
6799
  command: ({ editor, range }) => {
6428
6800
  editor.chain().focus().deleteRange(range).toggleBulletList().run();
6429
6801
  }
@@ -6432,7 +6804,7 @@ var orderedList = {
6432
6804
  title: "Numbered List",
6433
6805
  description: "Create a list with numbering.",
6434
6806
  searchTerms: ["ordered"],
6435
- icon: /* @__PURE__ */ jsx23(ListOrdered, { className: "mly:h-4 mly:w-4" }),
6807
+ icon: /* @__PURE__ */ jsx26(ListOrdered, { className: "mly:h-4 mly:w-4" }),
6436
6808
  command: ({ editor, range }) => {
6437
6809
  editor.chain().focus().deleteRange(range).toggleOrderedList().run();
6438
6810
  }
@@ -6449,12 +6821,12 @@ import {
6449
6821
  FootprintsIcon,
6450
6822
  EraserIcon as EraserIcon2
6451
6823
  } from "lucide-react";
6452
- import { jsx as jsx24 } from "react/jsx-runtime";
6824
+ import { jsx as jsx27 } from "react/jsx-runtime";
6453
6825
  var text = {
6454
6826
  title: "Text",
6455
6827
  description: "Just start typing with plain text.",
6456
6828
  searchTerms: ["p", "paragraph"],
6457
- icon: /* @__PURE__ */ jsx24(Text, { className: "mly:h-4 mly:w-4" }),
6829
+ icon: /* @__PURE__ */ jsx27(Text, { className: "mly:h-4 mly:w-4" }),
6458
6830
  command: ({ editor, range }) => {
6459
6831
  editor.chain().focus().deleteRange(range).toggleNode("paragraph", "paragraph").run();
6460
6832
  }
@@ -6463,7 +6835,7 @@ var heading1 = {
6463
6835
  title: "Heading 1",
6464
6836
  description: "Big heading.",
6465
6837
  searchTerms: ["h1", "title", "big", "large"],
6466
- icon: /* @__PURE__ */ jsx24(Heading1, { className: "mly:h-4 mly:w-4" }),
6838
+ icon: /* @__PURE__ */ jsx27(Heading1, { className: "mly:h-4 mly:w-4" }),
6467
6839
  command: ({ editor, range }) => {
6468
6840
  editor.chain().focus().deleteRange(range).setNode("heading", { level: 1 }).run();
6469
6841
  }
@@ -6472,7 +6844,7 @@ var heading2 = {
6472
6844
  title: "Heading 2",
6473
6845
  description: "Medium heading.",
6474
6846
  searchTerms: ["h2", "subtitle", "medium"],
6475
- icon: /* @__PURE__ */ jsx24(Heading2, { className: "mly:h-4 mly:w-4" }),
6847
+ icon: /* @__PURE__ */ jsx27(Heading2, { className: "mly:h-4 mly:w-4" }),
6476
6848
  command: ({ editor, range }) => {
6477
6849
  editor.chain().focus().deleteRange(range).setNode("heading", { level: 2 }).run();
6478
6850
  }
@@ -6481,7 +6853,7 @@ var heading3 = {
6481
6853
  title: "Heading 3",
6482
6854
  description: "Small heading.",
6483
6855
  searchTerms: ["h3", "subtitle", "small"],
6484
- icon: /* @__PURE__ */ jsx24(Heading3, { className: "mly:h-4 mly:w-4" }),
6856
+ icon: /* @__PURE__ */ jsx27(Heading3, { className: "mly:h-4 mly:w-4" }),
6485
6857
  command: ({ editor, range }) => {
6486
6858
  editor.chain().focus().deleteRange(range).setNode("heading", { level: 3 }).run();
6487
6859
  }
@@ -6490,7 +6862,7 @@ var hardBreak = {
6490
6862
  title: "Hard Break",
6491
6863
  description: "Add a break between lines.",
6492
6864
  searchTerms: ["break", "line"],
6493
- icon: /* @__PURE__ */ jsx24(DivideIcon, { className: "mly:h-4 mly:w-4" }),
6865
+ icon: /* @__PURE__ */ jsx27(DivideIcon, { className: "mly:h-4 mly:w-4" }),
6494
6866
  command: ({ editor, range }) => {
6495
6867
  editor.chain().focus().deleteRange(range).setHardBreak().run();
6496
6868
  }
@@ -6499,7 +6871,7 @@ var blockquote = {
6499
6871
  title: "Blockquote",
6500
6872
  description: "Add blockquote.",
6501
6873
  searchTerms: ["quote", "blockquote"],
6502
- icon: /* @__PURE__ */ jsx24(TextQuote, { className: "mly:h-4 mly:w-4" }),
6874
+ icon: /* @__PURE__ */ jsx27(TextQuote, { className: "mly:h-4 mly:w-4" }),
6503
6875
  command: ({ editor, range }) => {
6504
6876
  editor.chain().focus().deleteRange(range).toggleBlockquote().run();
6505
6877
  }
@@ -6508,7 +6880,7 @@ var footer = {
6508
6880
  title: "Footer",
6509
6881
  description: "Add a footer text to email.",
6510
6882
  searchTerms: ["footer", "text"],
6511
- icon: /* @__PURE__ */ jsx24(FootprintsIcon, { className: "mly:h-4 mly:w-4" }),
6883
+ icon: /* @__PURE__ */ jsx27(FootprintsIcon, { className: "mly:h-4 mly:w-4" }),
6512
6884
  command: ({ editor, range }) => {
6513
6885
  editor.chain().focus().deleteRange(range).setFooter().run();
6514
6886
  }
@@ -6517,16 +6889,16 @@ var clearLine = {
6517
6889
  title: "Clear Line",
6518
6890
  description: "Clear the current line.",
6519
6891
  searchTerms: ["clear", "line"],
6520
- icon: /* @__PURE__ */ jsx24(EraserIcon2, { className: "mly:h-4 mly:w-4" }),
6892
+ icon: /* @__PURE__ */ jsx27(EraserIcon2, { className: "mly:h-4 mly:w-4" }),
6521
6893
  command: ({ editor, range }) => {
6522
6894
  editor.chain().focus().selectParentNode().deleteSelection().run();
6523
6895
  }
6524
6896
  };
6525
6897
 
6526
6898
  // src/editor/components/icons/logo-with-cover-image.tsx
6527
- import { jsx as jsx25, jsxs as jsxs11 } from "react/jsx-runtime";
6899
+ import { jsx as jsx28, jsxs as jsxs13 } from "react/jsx-runtime";
6528
6900
  function LogoWithCoverImageIcon(props) {
6529
- return /* @__PURE__ */ jsxs11(
6901
+ return /* @__PURE__ */ jsxs13(
6530
6902
  "svg",
6531
6903
  __spreadProps(__spreadValues({
6532
6904
  width: "14",
@@ -6536,7 +6908,7 @@ function LogoWithCoverImageIcon(props) {
6536
6908
  xmlns: "http://www.w3.org/2000/svg"
6537
6909
  }, props), {
6538
6910
  children: [
6539
- /* @__PURE__ */ jsx25(
6911
+ /* @__PURE__ */ jsx28(
6540
6912
  "path",
6541
6913
  {
6542
6914
  fillRule: "evenodd",
@@ -6545,7 +6917,7 @@ function LogoWithCoverImageIcon(props) {
6545
6917
  fill: "currentColor"
6546
6918
  }
6547
6919
  ),
6548
- /* @__PURE__ */ jsx25(
6920
+ /* @__PURE__ */ jsx28(
6549
6921
  "path",
6550
6922
  {
6551
6923
  fillRule: "evenodd",
@@ -6554,7 +6926,7 @@ function LogoWithCoverImageIcon(props) {
6554
6926
  fill: "currentColor"
6555
6927
  }
6556
6928
  ),
6557
- /* @__PURE__ */ jsx25(
6929
+ /* @__PURE__ */ jsx28(
6558
6930
  "path",
6559
6931
  {
6560
6932
  fillRule: "evenodd",
@@ -6563,8 +6935,8 @@ function LogoWithCoverImageIcon(props) {
6563
6935
  fill: "currentColor"
6564
6936
  }
6565
6937
  ),
6566
- /* @__PURE__ */ jsx25("mask", { id: "path-4-inside-1_1046_19527", fill: "white", children: /* @__PURE__ */ jsx25("rect", { x: "3", y: "4", width: "8", height: "3", rx: "0.5" }) }),
6567
- /* @__PURE__ */ jsx25(
6938
+ /* @__PURE__ */ jsx28("mask", { id: "path-4-inside-1_1046_19527", fill: "white", children: /* @__PURE__ */ jsx28("rect", { x: "3", y: "4", width: "8", height: "3", rx: "0.5" }) }),
6939
+ /* @__PURE__ */ jsx28(
6568
6940
  "rect",
6569
6941
  {
6570
6942
  x: "3",
@@ -6577,7 +6949,7 @@ function LogoWithCoverImageIcon(props) {
6577
6949
  mask: "url(#path-4-inside-1_1046_19527)"
6578
6950
  }
6579
6951
  ),
6580
- /* @__PURE__ */ jsx25(
6952
+ /* @__PURE__ */ jsx28(
6581
6953
  "rect",
6582
6954
  {
6583
6955
  x: "6.25",
@@ -6589,16 +6961,16 @@ function LogoWithCoverImageIcon(props) {
6589
6961
  strokeWidth: "0.5"
6590
6962
  }
6591
6963
  ),
6592
- /* @__PURE__ */ jsx25("rect", { x: "3", y: "8", width: "2", height: "1", rx: "0.5", fill: "currentColor" })
6964
+ /* @__PURE__ */ jsx28("rect", { x: "3", y: "8", width: "2", height: "1", rx: "0.5", fill: "currentColor" })
6593
6965
  ]
6594
6966
  })
6595
6967
  );
6596
6968
  }
6597
6969
 
6598
6970
  // src/editor/components/icons/logo-with-text-horizon.tsx
6599
- import { jsx as jsx26, jsxs as jsxs12 } from "react/jsx-runtime";
6971
+ import { jsx as jsx29, jsxs as jsxs14 } from "react/jsx-runtime";
6600
6972
  function LogoWithTextHorizonIcon(props) {
6601
- return /* @__PURE__ */ jsxs12(
6973
+ return /* @__PURE__ */ jsxs14(
6602
6974
  "svg",
6603
6975
  __spreadProps(__spreadValues({
6604
6976
  width: "14",
@@ -6608,7 +6980,7 @@ function LogoWithTextHorizonIcon(props) {
6608
6980
  xmlns: "http://www.w3.org/2000/svg"
6609
6981
  }, props), {
6610
6982
  children: [
6611
- /* @__PURE__ */ jsx26(
6983
+ /* @__PURE__ */ jsx29(
6612
6984
  "path",
6613
6985
  {
6614
6986
  fillRule: "evenodd",
@@ -6617,7 +6989,7 @@ function LogoWithTextHorizonIcon(props) {
6617
6989
  fill: "currentColor"
6618
6990
  }
6619
6991
  ),
6620
- /* @__PURE__ */ jsx26(
6992
+ /* @__PURE__ */ jsx29(
6621
6993
  "rect",
6622
6994
  {
6623
6995
  x: "6.25",
@@ -6629,8 +7001,8 @@ function LogoWithTextHorizonIcon(props) {
6629
7001
  strokeWidth: "0.5"
6630
7002
  }
6631
7003
  ),
6632
- /* @__PURE__ */ jsx26("rect", { x: "3", y: "6.5", width: "2", height: "1", rx: "0.5", fill: "currentColor" }),
6633
- /* @__PURE__ */ jsx26(
7004
+ /* @__PURE__ */ jsx29("rect", { x: "3", y: "6.5", width: "2", height: "1", rx: "0.5", fill: "currentColor" }),
7005
+ /* @__PURE__ */ jsx29(
6634
7006
  "path",
6635
7007
  {
6636
7008
  fillRule: "evenodd",
@@ -6639,7 +7011,7 @@ function LogoWithTextHorizonIcon(props) {
6639
7011
  fill: "currentColor"
6640
7012
  }
6641
7013
  ),
6642
- /* @__PURE__ */ jsx26(
7014
+ /* @__PURE__ */ jsx29(
6643
7015
  "path",
6644
7016
  {
6645
7017
  fillRule: "evenodd",
@@ -6654,9 +7026,9 @@ function LogoWithTextHorizonIcon(props) {
6654
7026
  }
6655
7027
 
6656
7028
  // src/editor/components/icons/logo-with-text-vertical.tsx
6657
- import { jsx as jsx27, jsxs as jsxs13 } from "react/jsx-runtime";
7029
+ import { jsx as jsx30, jsxs as jsxs15 } from "react/jsx-runtime";
6658
7030
  function LogoWithTextVerticalIcon(props) {
6659
- return /* @__PURE__ */ jsxs13(
7031
+ return /* @__PURE__ */ jsxs15(
6660
7032
  "svg",
6661
7033
  __spreadProps(__spreadValues({
6662
7034
  width: "14",
@@ -6666,7 +7038,7 @@ function LogoWithTextVerticalIcon(props) {
6666
7038
  xmlns: "http://www.w3.org/2000/svg"
6667
7039
  }, props), {
6668
7040
  children: [
6669
- /* @__PURE__ */ jsx27(
7041
+ /* @__PURE__ */ jsx30(
6670
7042
  "path",
6671
7043
  {
6672
7044
  fillRule: "evenodd",
@@ -6675,7 +7047,7 @@ function LogoWithTextVerticalIcon(props) {
6675
7047
  fill: "currentColor"
6676
7048
  }
6677
7049
  ),
6678
- /* @__PURE__ */ jsx27(
7050
+ /* @__PURE__ */ jsx30(
6679
7051
  "rect",
6680
7052
  {
6681
7053
  x: "4.25",
@@ -6687,8 +7059,8 @@ function LogoWithTextVerticalIcon(props) {
6687
7059
  strokeWidth: "0.5"
6688
7060
  }
6689
7061
  ),
6690
- /* @__PURE__ */ jsx27("rect", { x: "6", y: "6", width: "2", height: "1", rx: "0.5", fill: "currentColor" }),
6691
- /* @__PURE__ */ jsx27(
7062
+ /* @__PURE__ */ jsx30("rect", { x: "6", y: "6", width: "2", height: "1", rx: "0.5", fill: "currentColor" }),
7063
+ /* @__PURE__ */ jsx30(
6692
7064
  "path",
6693
7065
  {
6694
7066
  fillRule: "evenodd",
@@ -6697,7 +7069,7 @@ function LogoWithTextVerticalIcon(props) {
6697
7069
  fill: "currentColor"
6698
7070
  }
6699
7071
  ),
6700
- /* @__PURE__ */ jsx27(
7072
+ /* @__PURE__ */ jsx30(
6701
7073
  "path",
6702
7074
  {
6703
7075
  fillRule: "evenodd",
@@ -6712,12 +7084,12 @@ function LogoWithTextVerticalIcon(props) {
6712
7084
  }
6713
7085
 
6714
7086
  // src/blocks/headers.tsx
6715
- import { jsx as jsx28 } from "react/jsx-runtime";
7087
+ import { jsx as jsx31 } from "react/jsx-runtime";
6716
7088
  var headerLogoWithTextHorizontal = {
6717
7089
  title: "Logo with Text (Horizontal)",
6718
7090
  description: "Logo and a text horizontally",
6719
7091
  searchTerms: ["logo", "text"],
6720
- icon: /* @__PURE__ */ jsx28(LogoWithTextHorizonIcon, { className: "mly:h-4 mly:w-4" }),
7092
+ icon: /* @__PURE__ */ jsx31(LogoWithTextHorizonIcon, { className: "mly:h-4 mly:w-4" }),
6721
7093
  command: ({ editor, range }) => {
6722
7094
  editor.chain().deleteRange(range).insertContent({
6723
7095
  type: "columns",
@@ -6781,7 +7153,7 @@ var headerLogoWithTextVertical = {
6781
7153
  title: "Logo with Text (Vertical)",
6782
7154
  description: "Logo and a text vertically",
6783
7155
  searchTerms: ["logo", "text"],
6784
- icon: /* @__PURE__ */ jsx28(LogoWithTextVerticalIcon, { className: "mly:h-4 mly:w-4" }),
7156
+ icon: /* @__PURE__ */ jsx31(LogoWithTextVerticalIcon, { className: "mly:h-4 mly:w-4" }),
6785
7157
  command: ({ editor, range }) => {
6786
7158
  editor.chain().deleteRange(range).insertContent([
6787
7159
  {
@@ -6812,7 +7184,7 @@ var headerLogoWithCoverImage = {
6812
7184
  title: "Logo with Cover Image",
6813
7185
  description: "Logo and a cover image",
6814
7186
  searchTerms: ["logo", "cover", "image"],
6815
- icon: /* @__PURE__ */ jsx28(LogoWithCoverImageIcon, { className: "mly:h-4 mly:w-4" }),
7187
+ icon: /* @__PURE__ */ jsx31(LogoWithCoverImageIcon, { className: "mly:h-4 mly:w-4" }),
6816
7188
  command: ({ editor, range }) => {
6817
7189
  const todayFormatted = (/* @__PURE__ */ new Date()).toLocaleDateString("en-US", {
6818
7190
  year: "numeric",
@@ -6905,12 +7277,12 @@ import {
6905
7277
  LayoutTemplateIcon,
6906
7278
  RectangleHorizontalIcon
6907
7279
  } from "lucide-react";
6908
- import { jsx as jsx29 } from "react/jsx-runtime";
7280
+ import { jsx as jsx32 } from "react/jsx-runtime";
6909
7281
  var footerCopyrightText = {
6910
7282
  title: "Footer Copyright",
6911
7283
  description: "Copyright text for the footer.",
6912
7284
  searchTerms: ["footer", "copyright"],
6913
- icon: /* @__PURE__ */ jsx29(CopyrightIcon, { className: "mly:h-4 mly:w-4" }),
7285
+ icon: /* @__PURE__ */ jsx32(CopyrightIcon, { className: "mly:h-4 mly:w-4" }),
6914
7286
  command: ({ editor, range }) => {
6915
7287
  const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
6916
7288
  editor.chain().focus().deleteRange(range).insertContent({
@@ -6930,7 +7302,7 @@ var footerCommunityFeedbackCta = {
6930
7302
  title: "Footer Community Feedback CTA",
6931
7303
  description: "Community feedback CTA for the footer.",
6932
7304
  searchTerms: ["footer", "community", "feedback", "cta"],
6933
- icon: /* @__PURE__ */ jsx29(RectangleHorizontalIcon, { className: "mly:h-4 mly:w-4" }),
7305
+ icon: /* @__PURE__ */ jsx32(RectangleHorizontalIcon, { className: "mly:h-4 mly:w-4" }),
6934
7306
  command: ({ editor, range }) => {
6935
7307
  editor.chain().focus().deleteRange(range).insertContent([
6936
7308
  {
@@ -6973,7 +7345,7 @@ var footerCompanySignature = {
6973
7345
  title: "Footer Company Signature",
6974
7346
  description: "Company signature for the footer.",
6975
7347
  searchTerms: ["footer", "company", "signature"],
6976
- icon: /* @__PURE__ */ jsx29(LayoutTemplateIcon, { className: "mly:h-4 mly:w-4" }),
7348
+ icon: /* @__PURE__ */ jsx32(LayoutTemplateIcon, { className: "mly:h-4 mly:w-4" }),
6977
7349
  command: ({ editor, range }) => {
6978
7350
  editor.chain().focus().deleteRange(range).insertContent([
6979
7351
  { type: "horizontalRule" },
@@ -7127,7 +7499,7 @@ var footerCompanySignature = {
7127
7499
  };
7128
7500
 
7129
7501
  // src/editor/extensions/slash-command/default-slash-commands.tsx
7130
- import { jsx as jsx30 } from "react/jsx-runtime";
7502
+ import { jsx as jsx33 } from "react/jsx-runtime";
7131
7503
  var DEFAULT_SLASH_COMMANDS = [
7132
7504
  {
7133
7505
  title: "Blocks",
@@ -7162,7 +7534,7 @@ var DEFAULT_SLASH_COMMANDS = [
7162
7534
  title: "Headers",
7163
7535
  description: "Add pre-designed headers block",
7164
7536
  searchTerms: ["header", "headers"],
7165
- icon: /* @__PURE__ */ jsx30(Heading12, { className: "mly:h-4 mly:w-4" }),
7537
+ icon: /* @__PURE__ */ jsx33(Heading12, { className: "mly:h-4 mly:w-4" }),
7166
7538
  preview: "https://cdn.usemaily.com/previews/header-preview-xyz.png",
7167
7539
  commands: [
7168
7540
  headerLogoWithTextVertical,
@@ -7175,7 +7547,7 @@ var DEFAULT_SLASH_COMMANDS = [
7175
7547
  title: "Footers",
7176
7548
  description: "Add pre-designed footers block",
7177
7549
  searchTerms: ["footers"],
7178
- icon: /* @__PURE__ */ jsx30(FootprintsIcon2, { className: "mly:h-4 mly:w-4" }),
7550
+ icon: /* @__PURE__ */ jsx33(FootprintsIcon2, { className: "mly:h-4 mly:w-4" }),
7179
7551
  commands: [
7180
7552
  footerCopyrightText,
7181
7553
  footerCommunityFeedbackCta,
@@ -7188,7 +7560,7 @@ var DEFAULT_SLASH_COMMANDS = [
7188
7560
  ];
7189
7561
 
7190
7562
  // src/editor/provider.tsx
7191
- import { jsx as jsx31 } from "react/jsx-runtime";
7563
+ import { jsx as jsx34 } from "react/jsx-runtime";
7192
7564
  var DEFAULT_PLACEHOLDER_URL = "https://maily.to/";
7193
7565
  var MailyContext = createContext({
7194
7566
  placeholderUrl: DEFAULT_PLACEHOLDER_URL,
@@ -7196,7 +7568,7 @@ var MailyContext = createContext({
7196
7568
  });
7197
7569
  function MailyProvider(props) {
7198
7570
  const _a = props, { children } = _a, defaultValues = __objRest(_a, ["children"]);
7199
- return /* @__PURE__ */ jsx31(MailyContext.Provider, { value: defaultValues, children });
7571
+ return /* @__PURE__ */ jsx34(MailyContext.Provider, { value: defaultValues, children });
7200
7572
  }
7201
7573
  function useMailyContext() {
7202
7574
  const values = useContext(MailyContext);
@@ -7207,11 +7579,11 @@ function useMailyContext() {
7207
7579
  }
7208
7580
 
7209
7581
  // src/editor/components/ui/link-input-popover.tsx
7210
- import { useMemo as useMemo6 } from "react";
7582
+ import { useMemo as useMemo7 } from "react";
7211
7583
 
7212
7584
  // src/editor/nodes/variable/variable.ts
7213
- import { mergeAttributes as mergeAttributes3, Node as Node4 } from "@tiptap/core";
7214
- import { PluginKey as PluginKey3 } from "@tiptap/pm/state";
7585
+ import { mergeAttributes as mergeAttributes4, Node as Node5 } from "@tiptap/core";
7586
+ import { PluginKey as PluginKey4 } from "@tiptap/pm/state";
7215
7587
  import { ReactNodeViewRenderer as ReactNodeViewRenderer2 } from "@tiptap/react";
7216
7588
  import Suggestion from "@tiptap/suggestion";
7217
7589
 
@@ -7229,7 +7601,7 @@ import {
7229
7601
  useRef as useRef6,
7230
7602
  useState as useState6
7231
7603
  } from "react";
7232
- import { jsx as jsx32, jsxs as jsxs14 } from "react/jsx-runtime";
7604
+ import { jsx as jsx35, jsxs as jsxs16 } from "react/jsx-runtime";
7233
7605
  var VariableSuggestionsPopover = forwardRef5((props, ref) => {
7234
7606
  const { items, onSelectItem } = props;
7235
7607
  const [selectedIndex, setSelectedIndex] = useState6(0);
@@ -7275,17 +7647,17 @@ var VariableSuggestionsPopover = forwardRef5((props, ref) => {
7275
7647
  onSelectItem(item);
7276
7648
  }
7277
7649
  }));
7278
- return /* @__PURE__ */ jsxs14("div", { className: "mly:z-50 mly:w-64 mly:rounded-lg mly:border mly:border-gray-200 mly:bg-white mly:shadow-md mly:transition-all", children: [
7279
- /* @__PURE__ */ jsxs14("div", { className: "mly:flex mly:items-center mly:justify-between mly:gap-2 mly:border-b mly:border-gray-200 mly:bg-soft-gray/40 mly:px-1 mly:py-1.5 mly:text-gray-500", children: [
7280
- /* @__PURE__ */ jsx32("span", { className: "mly:text-xs mly:uppercase", children: "Variables" }),
7281
- /* @__PURE__ */ jsx32(VariableIcon, { children: /* @__PURE__ */ jsx32(Braces, { className: "mly:size-3 mly:stroke-[2.5]" }) })
7650
+ return /* @__PURE__ */ jsxs16("div", { className: "mly:z-50 mly:w-64 mly:rounded-lg mly:border mly:border-gray-200 mly:bg-white mly:shadow-md mly:transition-all", children: [
7651
+ /* @__PURE__ */ jsxs16("div", { className: "mly:flex mly:items-center mly:justify-between mly:gap-2 mly:border-b mly:border-gray-200 mly:bg-soft-gray/40 mly:px-1 mly:py-1.5 mly:text-gray-500", children: [
7652
+ /* @__PURE__ */ jsx35("span", { className: "mly:text-xs mly:uppercase", children: "Variables" }),
7653
+ /* @__PURE__ */ jsx35(VariableIcon, { children: /* @__PURE__ */ jsx35(Braces, { className: "mly:size-3 mly:stroke-[2.5]" }) })
7282
7654
  ] }),
7283
- /* @__PURE__ */ jsx32(
7655
+ /* @__PURE__ */ jsx35(
7284
7656
  "div",
7285
7657
  {
7286
7658
  ref: scrollContainerRef,
7287
7659
  className: "mly:max-h-52 mly:overflow-y-auto mly:scrollbar-thin mly:scrollbar-track-transparent mly:scrollbar-thumb-gray-200",
7288
- children: /* @__PURE__ */ jsx32("div", { className: "mly:flex mly:w-fit mly:min-w-full mly:flex-col mly:gap-0.5 mly:p-1", children: (items == null ? void 0 : items.length) ? items == null ? void 0 : items.map((item, index) => /* @__PURE__ */ jsxs14(
7660
+ children: /* @__PURE__ */ jsx35("div", { className: "mly:flex mly:w-fit mly:min-w-full mly:flex-col mly:gap-0.5 mly:p-1", children: (items == null ? void 0 : items.length) ? items == null ? void 0 : items.map((item, index) => /* @__PURE__ */ jsxs16(
7289
7661
  "button",
7290
7662
  {
7291
7663
  ref: (el) => itemRefs.current[index] = el,
@@ -7295,27 +7667,27 @@ var VariableSuggestionsPopover = forwardRef5((props, ref) => {
7295
7667
  index === selectedIndex ? "mly:bg-soft-gray" : "mly:bg-white"
7296
7668
  ),
7297
7669
  children: [
7298
- /* @__PURE__ */ jsx32(Braces, { className: "mly:size-3 mly:stroke-[2.5] mly:text-rose-600" }),
7670
+ /* @__PURE__ */ jsx35(Braces, { className: "mly:size-3 mly:stroke-[2.5] mly:text-rose-600" }),
7299
7671
  (item == null ? void 0 : item.label) || item.name
7300
7672
  ]
7301
7673
  },
7302
7674
  index
7303
- )) : /* @__PURE__ */ jsx32("div", { className: "mly:flex mly:h-7 mly:w-full mly:items-center mly:gap-2 mly:rounded-md mly:px-2 mly:py-1 mly:text-left mly:font-mono mly:text-[13px] mly:text-gray-900 mly:hover:bg-soft-gray", children: "No result" }) })
7675
+ )) : /* @__PURE__ */ jsx35("div", { className: "mly:flex mly:h-7 mly:w-full mly:items-center mly:gap-2 mly:rounded-md mly:px-2 mly:py-1 mly:text-left mly:font-mono mly:text-[13px] mly:text-gray-900 mly:hover:bg-soft-gray", children: "No result" }) })
7304
7676
  }
7305
7677
  ),
7306
- /* @__PURE__ */ jsxs14("div", { className: "mly:flex mly:items-center mly:justify-between mly:gap-2 mly:border-t mly:border-gray-200 mly:px-1 mly:py-1.5 mly:text-gray-500", children: [
7307
- /* @__PURE__ */ jsxs14("div", { className: "mly:flex mly:items-center mly:gap-1", children: [
7308
- /* @__PURE__ */ jsx32(VariableIcon, { children: /* @__PURE__ */ jsx32(ArrowDownIcon, { className: "mly:size-3 mly:stroke-[2.5]" }) }),
7309
- /* @__PURE__ */ jsx32(VariableIcon, { children: /* @__PURE__ */ jsx32(ArrowUpIcon, { className: "mly:size-3 mly:stroke-[2.5]" }) }),
7310
- /* @__PURE__ */ jsx32("span", { className: "mly:text-xs mly:text-gray-500", children: "Navigate" })
7678
+ /* @__PURE__ */ jsxs16("div", { className: "mly:flex mly:items-center mly:justify-between mly:gap-2 mly:border-t mly:border-gray-200 mly:px-1 mly:py-1.5 mly:text-gray-500", children: [
7679
+ /* @__PURE__ */ jsxs16("div", { className: "mly:flex mly:items-center mly:gap-1", children: [
7680
+ /* @__PURE__ */ jsx35(VariableIcon, { children: /* @__PURE__ */ jsx35(ArrowDownIcon, { className: "mly:size-3 mly:stroke-[2.5]" }) }),
7681
+ /* @__PURE__ */ jsx35(VariableIcon, { children: /* @__PURE__ */ jsx35(ArrowUpIcon, { className: "mly:size-3 mly:stroke-[2.5]" }) }),
7682
+ /* @__PURE__ */ jsx35("span", { className: "mly:text-xs mly:text-gray-500", children: "Navigate" })
7311
7683
  ] }),
7312
- /* @__PURE__ */ jsx32(VariableIcon, { children: /* @__PURE__ */ jsx32(CornerDownLeftIcon, { className: "mly:size-3 mly:stroke-[2.5]" }) })
7684
+ /* @__PURE__ */ jsx35(VariableIcon, { children: /* @__PURE__ */ jsx35(CornerDownLeftIcon, { className: "mly:size-3 mly:stroke-[2.5]" }) })
7313
7685
  ] })
7314
7686
  ] });
7315
7687
  });
7316
7688
  function VariableIcon(props) {
7317
7689
  const { className, children } = props;
7318
- return /* @__PURE__ */ jsx32(
7690
+ return /* @__PURE__ */ jsx35(
7319
7691
  "div",
7320
7692
  {
7321
7693
  className: cn(
@@ -7330,8 +7702,8 @@ function VariableIcon(props) {
7330
7702
  // src/editor/nodes/variable/variable-view.tsx
7331
7703
  import { NodeViewWrapper as NodeViewWrapper3 } from "@tiptap/react";
7332
7704
  import { AlertTriangle, Braces as Braces2, Pencil } from "lucide-react";
7333
- import { useMemo as useMemo5 } from "react";
7334
- import { Fragment as Fragment4, jsx as jsx33, jsxs as jsxs15 } from "react/jsx-runtime";
7705
+ import { useMemo as useMemo6 } from "react";
7706
+ import { Fragment as Fragment5, jsx as jsx36, jsxs as jsxs17 } from "react/jsx-runtime";
7335
7707
  function VariableView(props) {
7336
7708
  const { node, updateAttributes: updateAttributes2, editor } = props;
7337
7709
  const {
@@ -7341,24 +7713,24 @@ function VariableView(props) {
7341
7713
  hideDefaultValue = false,
7342
7714
  label
7343
7715
  } = node.attrs;
7344
- const renderVariable = useMemo5(() => {
7716
+ const renderVariable = useMemo6(() => {
7345
7717
  var _a, _b;
7346
7718
  const variableRender = (_b = (_a = getNodeOptions(editor, "variable")) == null ? void 0 : _a.renderVariable) != null ? _b : DEFAULT_RENDER_VARIABLE_FUNCTION;
7347
7719
  return variableRender;
7348
7720
  }, [editor]);
7349
- return /* @__PURE__ */ jsx33(
7721
+ return /* @__PURE__ */ jsx36(
7350
7722
  NodeViewWrapper3,
7351
7723
  {
7352
7724
  className: "react-component mly:inline-block mly:leading-none",
7353
7725
  draggable: "false",
7354
- children: /* @__PURE__ */ jsxs15(
7726
+ children: /* @__PURE__ */ jsxs17(
7355
7727
  Popover,
7356
7728
  {
7357
7729
  onOpenChange: (open) => {
7358
7730
  editor.storage.variable.popover = open;
7359
7731
  },
7360
7732
  children: [
7361
- /* @__PURE__ */ jsx33(PopoverTrigger, { children: renderVariable({
7733
+ /* @__PURE__ */ jsx36(PopoverTrigger, { children: renderVariable({
7362
7734
  variable: {
7363
7735
  name: id,
7364
7736
  required,
@@ -7369,7 +7741,7 @@ function VariableView(props) {
7369
7741
  editor,
7370
7742
  from: "content-variable"
7371
7743
  }) }),
7372
- /* @__PURE__ */ jsx33(
7744
+ /* @__PURE__ */ jsx36(
7373
7745
  PopoverContent,
7374
7746
  {
7375
7747
  align: "start",
@@ -7378,10 +7750,10 @@ function VariableView(props) {
7378
7750
  sideOffset: 8,
7379
7751
  onOpenAutoFocus: (e) => e.preventDefault(),
7380
7752
  onCloseAutoFocus: (e) => e.preventDefault(),
7381
- children: /* @__PURE__ */ jsx33(TooltipProvider, { children: /* @__PURE__ */ jsxs15("div", { className: "mly:flex mly:items-stretch mly:text-midnight-gray", children: [
7382
- /* @__PURE__ */ jsxs15("label", { className: "mly:relative", children: [
7383
- /* @__PURE__ */ jsx33("span", { className: "mly:inline-block mly:px-2 mly:text-xs mly:text-midnight-gray", children: "Variable" }),
7384
- /* @__PURE__ */ jsx33(
7753
+ children: /* @__PURE__ */ jsx36(TooltipProvider, { children: /* @__PURE__ */ jsxs17("div", { className: "mly:flex mly:items-stretch mly:text-midnight-gray", children: [
7754
+ /* @__PURE__ */ jsxs17("label", { className: "mly:relative", children: [
7755
+ /* @__PURE__ */ jsx36("span", { className: "mly:inline-block mly:px-2 mly:text-xs mly:text-midnight-gray", children: "Variable" }),
7756
+ /* @__PURE__ */ jsx36(
7385
7757
  "input",
7386
7758
  __spreadProps(__spreadValues({}, AUTOCOMPLETE_PASSWORD_MANAGERS_OFF), {
7387
7759
  value: id != null ? id : "",
@@ -7395,11 +7767,11 @@ function VariableView(props) {
7395
7767
  })
7396
7768
  )
7397
7769
  ] }),
7398
- !hideDefaultValue && /* @__PURE__ */ jsxs15(Fragment4, { children: [
7399
- /* @__PURE__ */ jsx33(Divider, { className: "mly:mx-1.5" }),
7400
- /* @__PURE__ */ jsxs15("label", { className: "mly:relative", children: [
7401
- /* @__PURE__ */ jsx33("span", { className: "mly:inline-block mly:px-2 mly:pl-1 mly:text-xs mly:text-midnight-gray", children: "Default" }),
7402
- /* @__PURE__ */ jsx33(
7770
+ !hideDefaultValue && /* @__PURE__ */ jsxs17(Fragment5, { children: [
7771
+ /* @__PURE__ */ jsx36(Divider, { className: "mly:mx-1.5" }),
7772
+ /* @__PURE__ */ jsxs17("label", { className: "mly:relative", children: [
7773
+ /* @__PURE__ */ jsx36("span", { className: "mly:inline-block mly:px-2 mly:pl-1 mly:text-xs mly:text-midnight-gray", children: "Default" }),
7774
+ /* @__PURE__ */ jsx36(
7403
7775
  "input",
7404
7776
  __spreadProps(__spreadValues({}, AUTOCOMPLETE_PASSWORD_MANAGERS_OFF), {
7405
7777
  value: fallback != null ? fallback : "",
@@ -7412,7 +7784,7 @@ function VariableView(props) {
7412
7784
  className: "mly:h-7 mly:w-32 mly:rounded-md mly:bg-soft-gray mly:px-2 mly:pr-6 mly:text-sm mly:text-midnight-gray mly:focus:bg-soft-gray mly:focus:outline-none"
7413
7785
  })
7414
7786
  ),
7415
- /* @__PURE__ */ jsx33("div", { className: "mly:absolute mly:inset-y-0 mly:right-1 mly:flex mly:items-center", children: /* @__PURE__ */ jsx33(Pencil, { className: "mly:h-3 mly:w-3 mly:stroke-[2.5] mly:text-midnight-gray" }) })
7787
+ /* @__PURE__ */ jsx36("div", { className: "mly:absolute mly:inset-y-0 mly:right-1 mly:flex mly:items-center", children: /* @__PURE__ */ jsx36(Pencil, { className: "mly:h-3 mly:w-3 mly:stroke-[2.5] mly:text-midnight-gray" }) })
7416
7788
  ] })
7417
7789
  ] })
7418
7790
  ] }) })
@@ -7429,13 +7801,13 @@ var DefaultRenderVariable = (props) => {
7429
7801
  const { name, required, valid, label } = variable;
7430
7802
  const variableLabel = label || name;
7431
7803
  if (from === "button-variable") {
7432
- return /* @__PURE__ */ jsxs15("div", { className: "mly:inline-grid mly:max-w-xs mly:grid-cols-[12px_1fr] mly:items-center mly:gap-1.5 mly:rounded-md mly:border mly:border-(--button-var-border-color) mly:px-2 mly:py-px mly:font-mono mly:text-xs", children: [
7433
- /* @__PURE__ */ jsx33(Braces2, { className: "mly:h-3 mly:w-3 mly:shrink-0 mly:stroke-[2.5]" }),
7434
- /* @__PURE__ */ jsx33("span", { className: "mly:min-w-0 mly:truncate mly:text-left", children: variableLabel })
7804
+ return /* @__PURE__ */ jsxs17("div", { className: "mly:inline-grid mly:max-w-xs mly:grid-cols-[12px_1fr] mly:items-center mly:gap-1.5 mly:rounded-md mly:border mly:border-(--button-var-border-color) mly:px-2 mly:py-px mly:font-mono mly:text-xs", children: [
7805
+ /* @__PURE__ */ jsx36(Braces2, { className: "mly:h-3 mly:w-3 mly:shrink-0 mly:stroke-[2.5]" }),
7806
+ /* @__PURE__ */ jsx36("span", { className: "mly:min-w-0 mly:truncate mly:text-left", children: variableLabel })
7435
7807
  ] });
7436
7808
  }
7437
7809
  if (from === "bubble-variable") {
7438
- return /* @__PURE__ */ jsxs15(
7810
+ return /* @__PURE__ */ jsxs17(
7439
7811
  "div",
7440
7812
  {
7441
7813
  className: cn(
@@ -7443,21 +7815,21 @@ var DefaultRenderVariable = (props) => {
7443
7815
  !valid && "mly:border-rose-400 mly:bg-rose-50 mly:text-rose-600 mly:hover:bg-rose-100"
7444
7816
  ),
7445
7817
  children: [
7446
- /* @__PURE__ */ jsx33(Braces2, { className: "mly:h-3 mly:w-3 mly:shrink-0 mly:stroke-[2.5] mly:text-rose-600" }),
7447
- /* @__PURE__ */ jsx33("span", { className: "mly:min-w-0 mly:truncate mly:text-left", children: variableLabel })
7818
+ /* @__PURE__ */ jsx36(Braces2, { className: "mly:h-3 mly:w-3 mly:shrink-0 mly:stroke-[2.5] mly:text-rose-600" }),
7819
+ /* @__PURE__ */ jsx36("span", { className: "mly:min-w-0 mly:truncate mly:text-left", children: variableLabel })
7448
7820
  ]
7449
7821
  }
7450
7822
  );
7451
7823
  }
7452
- return /* @__PURE__ */ jsxs15(
7824
+ return /* @__PURE__ */ jsxs17(
7453
7825
  "span",
7454
7826
  {
7455
7827
  tabIndex: -1,
7456
7828
  className: "mly:inline-flex mly:items-center mly:gap-(--variable-icon-gap) mly:rounded-full mly:border mly:border-gray-200 mly:px-1.5 mly:py-0.5 mly:leading-none",
7457
7829
  children: [
7458
- /* @__PURE__ */ jsx33(Braces2, { className: "mly:size-[var(--variable-icon-size)] mly:shrink-0 mly:stroke-[2.5] mly:text-rose-600" }),
7830
+ /* @__PURE__ */ jsx36(Braces2, { className: "mly:size-[var(--variable-icon-size)] mly:shrink-0 mly:stroke-[2.5] mly:text-rose-600" }),
7459
7831
  variableLabel,
7460
- required && !fallback && /* @__PURE__ */ jsx33(AlertTriangle, { className: "mly:size-[var(--variable-icon-size)] mly:shrink-0 mly:stroke-[2.5]" })
7832
+ required && !fallback && /* @__PURE__ */ jsx36(AlertTriangle, { className: "mly:size-[var(--variable-icon-size)] mly:shrink-0 mly:stroke-[2.5]" })
7461
7833
  ]
7462
7834
  }
7463
7835
  );
@@ -7468,8 +7840,8 @@ var DEFAULT_VARIABLE_TRIGGER_CHAR = "@";
7468
7840
  var DEFAULT_VARIABLES = [];
7469
7841
  var DEFAULT_RENDER_VARIABLE_FUNCTION = DefaultRenderVariable;
7470
7842
  var DEFAULT_VARIABLE_SUGGESTION_POPOVER = VariableSuggestionsPopover;
7471
- var VariablePluginKey = new PluginKey3("variable");
7472
- var VariableExtension = Node4.create({
7843
+ var VariablePluginKey = new PluginKey4("variable");
7844
+ var VariableExtension = Node5.create({
7473
7845
  name: "variable",
7474
7846
  group: "inline",
7475
7847
  inline: true,
@@ -7585,7 +7957,7 @@ var VariableExtension = Node4.create({
7585
7957
  renderHTML({ node, HTMLAttributes: HTMLAttributes2 }) {
7586
7958
  return [
7587
7959
  "div",
7588
- mergeAttributes3({ "data-type": this.name }, HTMLAttributes2),
7960
+ mergeAttributes4({ "data-type": this.name }, HTMLAttributes2),
7589
7961
  this.options.renderLabel({
7590
7962
  options: this.options,
7591
7963
  node
@@ -7638,7 +8010,7 @@ var VariableExtension = Node4.create({
7638
8010
  });
7639
8011
 
7640
8012
  // src/editor/components/ui/link-input-popover.tsx
7641
- import { jsx as jsx34, jsxs as jsxs16 } from "react/jsx-runtime";
8013
+ import { jsx as jsx37, jsxs as jsxs18 } from "react/jsx-runtime";
7642
8014
  function LinkInputPopover(props) {
7643
8015
  var _a, _b;
7644
8016
  const {
@@ -7657,7 +8029,7 @@ function LinkInputPopover(props) {
7657
8029
  const renderVariable = options == null ? void 0 : options.renderVariable;
7658
8030
  const variables = options == null ? void 0 : options.variables;
7659
8031
  const variableTriggerCharacter = (_b = (_a = options == null ? void 0 : options.suggestion) == null ? void 0 : _a.char) != null ? _b : DEFAULT_VARIABLE_TRIGGER_CHAR;
7660
- const autoCompleteOptions = useMemo6(() => {
8032
+ const autoCompleteOptions = useMemo7(() => {
7661
8033
  const withoutTrigger = defaultValue.replace(
7662
8034
  new RegExp(variableTriggerCharacter, "g"),
7663
8035
  ""
@@ -7668,18 +8040,18 @@ function LinkInputPopover(props) {
7668
8040
  editor
7669
8041
  }).map((variable) => variable.name);
7670
8042
  }, [variables, variableTriggerCharacter, defaultValue, editor]);
7671
- const popoverButton = /* @__PURE__ */ jsx34(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx34(
8043
+ const popoverButton = /* @__PURE__ */ jsx37(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx37(
7672
8044
  BaseButton,
7673
8045
  {
7674
8046
  variant: "ghost",
7675
8047
  size: "sm",
7676
8048
  type: "button",
7677
- className: "mly:h-7! mly:w-7!",
8049
+ className: "menu-option mly:h-7! mly:w-7!",
7678
8050
  "data-state": !!defaultValue,
7679
- children: /* @__PURE__ */ jsx34(Icon, { className: "mly:h-3 mly:w-3 mly:shrink-0 mly:stroke-[2.5] mly:text-midnight-gray" })
8051
+ children: /* @__PURE__ */ jsx37(Icon, { className: "mly:h-3 mly:w-3 mly:shrink-0 mly:stroke-[2.5] mly:text-midnight-gray" })
7680
8052
  }
7681
8053
  ) });
7682
- return /* @__PURE__ */ jsxs16(
8054
+ return /* @__PURE__ */ jsxs18(
7683
8055
  Popover,
7684
8056
  {
7685
8057
  open: isOpen,
@@ -7693,9 +8065,9 @@ function LinkInputPopover(props) {
7693
8065
  }
7694
8066
  },
7695
8067
  children: [
7696
- tooltip ? /* @__PURE__ */ jsxs16(Tooltip, { children: [
7697
- /* @__PURE__ */ jsx34(TooltipTrigger, { asChild: true, children: popoverButton }),
7698
- /* @__PURE__ */ jsx34(
8068
+ tooltip ? /* @__PURE__ */ jsxs18(Tooltip, { children: [
8069
+ /* @__PURE__ */ jsx37(TooltipTrigger, { asChild: true, children: popoverButton }),
8070
+ /* @__PURE__ */ jsx37(
7699
8071
  TooltipContent,
7700
8072
  {
7701
8073
  sideOffset: 8,
@@ -7704,7 +8076,7 @@ function LinkInputPopover(props) {
7704
8076
  }
7705
8077
  )
7706
8078
  ] }) : popoverButton,
7707
- /* @__PURE__ */ jsx34(
8079
+ /* @__PURE__ */ jsx37(
7708
8080
  PopoverContent,
7709
8081
  {
7710
8082
  align: "end",
@@ -7712,7 +8084,7 @@ function LinkInputPopover(props) {
7712
8084
  className: "mly:w-max mly:rounded-none mly:border-none mly:bg-transparent mly:p-0! mly:shadow-none",
7713
8085
  sideOffset: 8,
7714
8086
  onCloseAutoFocus: (e) => e.preventDefault(),
7715
- children: /* @__PURE__ */ jsx34(
8087
+ children: /* @__PURE__ */ jsx37(
7716
8088
  "form",
7717
8089
  {
7718
8090
  onSubmit: (e) => {
@@ -7724,8 +8096,8 @@ function LinkInputPopover(props) {
7724
8096
  onValueChange == null ? void 0 : onValueChange(input.value);
7725
8097
  setIsOpen(false);
7726
8098
  },
7727
- children: /* @__PURE__ */ jsxs16("div", { className: "mly:isolate mly:flex mly:rounded-lg", children: [
7728
- !isEditing && /* @__PURE__ */ jsx34("div", { className: "mly:flex mly:h-8 mly:items-center mly:rounded-lg mly:border mly:border-gray-300 mly:bg-white mly:px-0.5", children: /* @__PURE__ */ jsx34(
8099
+ children: /* @__PURE__ */ jsxs18("div", { className: "mly:isolate mly:flex mly:rounded-lg", children: [
8100
+ !isEditing && /* @__PURE__ */ jsx37("div", { className: "mly:flex mly:h-8 mly:items-center mly:rounded-lg mly:border mly:border-gray-300 mly:bg-white mly:px-0.5", children: /* @__PURE__ */ jsx37(
7729
8101
  "button",
7730
8102
  {
7731
8103
  onClick: () => {
@@ -7746,9 +8118,9 @@ function LinkInputPopover(props) {
7746
8118
  })
7747
8119
  }
7748
8120
  ) }),
7749
- isEditing && /* @__PURE__ */ jsxs16("div", { className: "mly:relative", children: [
7750
- /* @__PURE__ */ jsx34("div", { className: "mly:absolute mly:inset-y-0 mly:left-1.5 mly:z-10 mly:flex mly:items-center", children: /* @__PURE__ */ jsx34(LinkIcon2, { className: "mly:h-3 mly:w-3 mly:stroke-[2.5] mly:text-midnight-gray" }) }),
7751
- /* @__PURE__ */ jsx34(
8121
+ isEditing && /* @__PURE__ */ jsxs18("div", { className: "mly:relative", children: [
8122
+ /* @__PURE__ */ jsx37("div", { className: "mly:absolute mly:inset-y-0 mly:left-1.5 mly:z-10 mly:flex mly:items-center", children: /* @__PURE__ */ jsx37(LinkIcon2, { className: "mly:h-3 mly:w-3 mly:stroke-[2.5] mly:text-midnight-gray" }) }),
8123
+ /* @__PURE__ */ jsx37(
7752
8124
  InputAutocomplete,
7753
8125
  {
7754
8126
  editor,
@@ -7770,399 +8142,22 @@ function LinkInputPopover(props) {
7770
8142
  onValueChange == null ? void 0 : onValueChange(value, isVariable2);
7771
8143
  setIsOpen(false);
7772
8144
  }
7773
- }
7774
- )
7775
- ] })
7776
- ] })
7777
- }
7778
- )
7779
- }
7780
- )
7781
- ]
7782
- }
7783
- );
7784
- }
7785
-
7786
- // src/editor/components/image-menu/image-size.tsx
7787
- import { jsx as jsx35, jsxs as jsxs17 } from "react/jsx-runtime";
7788
- function ImageSize(props) {
7789
- const { value, onValueChange, dimension } = props;
7790
- return /* @__PURE__ */ jsxs17("label", { className: "mly:relative mly:flex mly:items-center", children: [
7791
- /* @__PURE__ */ jsx35("span", { className: "mly:absolute mly:inset-y-0 mly:left-2 mly:flex mly:items-center mly:text-xs mly:leading-none mly:text-gray-400", children: dimension === "width" ? "W" : "H" }),
7792
- /* @__PURE__ */ jsx35(
7793
- "input",
7794
- __spreadProps(__spreadValues({}, AUTOCOMPLETE_PASSWORD_MANAGERS_OFF), {
7795
- className: "hide-number-controls mly:h-auto mly:max-w-20 mly:appearance-none mly:border-0 mly:border-none mly:p-1 mly:px-[26px] mly:text-sm mly:uppercase mly:tabular-nums mly:outline-hidden mly:focus-visible:outline-hidden",
7796
- type: "number",
7797
- value,
7798
- onChange: (e) => onValueChange(e.target.value)
7799
- })
7800
- ),
7801
- /* @__PURE__ */ jsx35("span", { className: "mly:absolute mly:inset-y-0 mly:right-1 mly:flex mly:items-center mly:text-xs mly:leading-none mly:text-gray-400", children: "PX" })
7802
- ] });
7803
- }
7804
-
7805
- // src/editor/components/image-menu/use-image-state.tsx
7806
- import { useEditorState as useEditorState2 } from "@tiptap/react";
7807
- import deepEql2 from "fast-deep-equal";
7808
- var useImageState = (editor) => {
7809
- const states = useEditorState2({
7810
- editor,
7811
- selector: ({ editor: editor2 }) => {
7812
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
7813
- return {
7814
- width: String(editor2.getAttributes("image").width),
7815
- height: String(editor2.getAttributes("image").height),
7816
- isImageActive: editor2.isActive("image"),
7817
- isLogoActive: editor2.isActive("logo"),
7818
- alignment: ((_a = editor2.getAttributes("image")) == null ? void 0 : _a.alignment) || ((_b = editor2.getAttributes("logo")) == null ? void 0 : _b.alignment),
7819
- borderRadius: (_c = editor2.getAttributes("image")) == null ? void 0 : _c.borderRadius,
7820
- logoSize: ((_d = editor2.getAttributes("logo")) == null ? void 0 : _d.size) || DEFAULT_LOGO_SIZE,
7821
- imageSrc: ((_e = editor2.getAttributes("image")) == null ? void 0 : _e.src) || ((_f = editor2.getAttributes("logo")) == null ? void 0 : _f.src) || "",
7822
- isSrcVariable: (_j = (_i = (_g = editor2.getAttributes("image")) == null ? void 0 : _g.isSrcVariable) != null ? _i : (_h = editor2.getAttributes("logo")) == null ? void 0 : _h.isSrcVariable) != null ? _j : false,
7823
- imageExternalLink: ((_k = editor2.getAttributes("image")) == null ? void 0 : _k.externalLink) || "",
7824
- isExternalLinkVariable: (_l = editor2.getAttributes("image")) == null ? void 0 : _l.isExternalLinkVariable,
7825
- lockAspectRatio: (_m = editor2.getAttributes("image")) == null ? void 0 : _m.lockAspectRatio,
7826
- aspectRatio: (_n = editor2.getAttributes("image")) == null ? void 0 : _n.aspectRatio,
7827
- currentShowIfKey: ((_o = editor2.getAttributes("image")) == null ? void 0 : _o.showIfKey) || ((_p = editor2.getAttributes("logo")) == null ? void 0 : _p.showIfKey) || ""
7828
- };
7829
- },
7830
- equalityFn: deepEql2
7831
- });
7832
- return states;
7833
- };
7834
-
7835
- // src/editor/components/image-menu/image-bubble-menu.tsx
7836
- import { Fragment as Fragment5, jsx as jsx36, jsxs as jsxs18 } from "react/jsx-runtime";
7837
- function ImageBubbleMenu(props) {
7838
- var _a, _b, _c, _d;
7839
- const { editor, appendTo } = props;
7840
- if (!editor) {
7841
- return null;
7842
- }
7843
- const state = useImageState(editor);
7844
- const bubbleMenuProps = __spreadProps(__spreadValues(__spreadValues({}, props), appendTo ? { appendTo: appendTo.current } : {}), {
7845
- shouldShow: ({ editor: editor2 }) => {
7846
- if (!editor2.isEditable) {
7847
- return false;
7848
- }
7849
- return editor2.isActive("logo") || editor2.isActive("image");
7850
- },
7851
- tippyOptions: {
7852
- popperOptions: {
7853
- modifiers: [{ name: "flip", enabled: false }]
7854
- },
7855
- plugins: [sticky2],
7856
- sticky: "popper",
7857
- maxWidth: "100%"
7858
- }
7859
- });
7860
- const { lockAspectRatio } = state;
7861
- return /* @__PURE__ */ jsx36(
7862
- BubbleMenu2,
7863
- __spreadProps(__spreadValues({}, bubbleMenuProps), {
7864
- className: "mly:flex mly:rounded-lg mly:border mly:border-gray-200 mly:bg-white mly:p-0.5 mly:shadow-md",
7865
- children: /* @__PURE__ */ jsxs18(TooltipProvider, { children: [
7866
- state.isLogoActive && state.imageSrc && /* @__PURE__ */ jsxs18(Fragment5, { children: [
7867
- /* @__PURE__ */ jsx36(
7868
- Select,
7869
- {
7870
- label: "Size",
7871
- tooltip: "Size",
7872
- value: state.logoSize,
7873
- options: allowedLogoSize.map((size) => ({
7874
- value: size,
7875
- label: size
7876
- })),
7877
- onValueChange: (value) => {
7878
- editor == null ? void 0 : editor.chain().focus().setLogoAttributes({ size: value }).run();
7879
- }
7880
- }
7881
- ),
7882
- /* @__PURE__ */ jsx36(Divider, {})
7883
- ] }),
7884
- /* @__PURE__ */ jsxs18("div", { className: "mly:flex mly:gap-x-0.5", children: [
7885
- /* @__PURE__ */ jsx36(
7886
- AlignmentSwitch,
7887
- {
7888
- alignment: state.alignment,
7889
- onAlignmentChange: (alignment) => {
7890
- const isCurrentNodeImage = state.isImageActive;
7891
- if (!isCurrentNodeImage) {
7892
- editor == null ? void 0 : editor.chain().focus().setLogoAttributes({ alignment }).run();
7893
- } else {
7894
- editor == null ? void 0 : editor.chain().focus().updateAttributes("image", { alignment }).run();
7895
- }
7896
- }
7897
- }
7898
- ),
7899
- /* @__PURE__ */ jsx36(
7900
- LinkInputPopover,
7901
- {
7902
- defaultValue: (_a = state == null ? void 0 : state.imageSrc) != null ? _a : "",
7903
- onValueChange: (value, isVariable) => {
7904
- if (state.isLogoActive) {
7905
- editor == null ? void 0 : editor.chain().setLogoAttributes({
7906
- src: value,
7907
- isSrcVariable: isVariable != null ? isVariable : false
7908
- }).run();
7909
- } else {
7910
- editor == null ? void 0 : editor.chain().updateAttributes("image", {
7911
- src: value,
7912
- isSrcVariable: isVariable != null ? isVariable : false
7913
- }).run();
7914
- }
7915
- },
7916
- tooltip: "Source URL",
7917
- icon: ImageDown,
7918
- editor,
7919
- isVariable: state.isSrcVariable
7920
- }
7921
- ),
7922
- state.isImageActive && /* @__PURE__ */ jsx36(
7923
- LinkInputPopover,
7924
- {
7925
- defaultValue: (_b = state == null ? void 0 : state.imageExternalLink) != null ? _b : "",
7926
- onValueChange: (value, isVariable) => {
7927
- editor == null ? void 0 : editor.chain().updateAttributes("image", {
7928
- externalLink: value,
7929
- isExternalLinkVariable: isVariable != null ? isVariable : false
7930
- }).run();
7931
- },
7932
- tooltip: "External URL",
7933
- editor,
7934
- isVariable: state.isExternalLinkVariable
7935
- }
7936
- )
7937
- ] }),
7938
- state.isImageActive && state.imageSrc && /* @__PURE__ */ jsxs18(Fragment5, { children: [
7939
- /* @__PURE__ */ jsx36(Divider, {}),
7940
- /* @__PURE__ */ jsx36(
7941
- Select,
7942
- {
7943
- label: "Border Radius",
7944
- value: state == null ? void 0 : state.borderRadius,
7945
- options: borderRadius.map((value) => ({
7946
- value: String(value.value),
7947
- label: value.name
7948
- })),
7949
- onValueChange: (value) => {
7950
- editor == null ? void 0 : editor.chain().updateAttributes("image", {
7951
- borderRadius: Number(value)
7952
- }).run();
7953
- },
7954
- tooltip: "Border Radius",
7955
- className: "mly:capitalize"
7956
- }
7957
- ),
7958
- /* @__PURE__ */ jsxs18("div", { className: "mly:flex mly:gap-x-0.5", children: [
7959
- /* @__PURE__ */ jsx36(
7960
- ImageSize,
7961
- {
7962
- dimension: "width",
7963
- value: (_c = state == null ? void 0 : state.width) != null ? _c : "",
7964
- onValueChange: (value) => {
7965
- const width = Math.min(Number(value) || 0, IMAGE_MAX_WIDTH);
7966
- const currentHeight = Number(state.height) || 0;
7967
- const currentWidth = Number(state.width) || 0;
7968
- const currentAspectRatio = state.aspectRatio || currentWidth / currentHeight || 1;
7969
- editor == null ? void 0 : editor.chain().updateAttributes("image", __spreadValues({
7970
- width: String(width)
7971
- }, lockAspectRatio && value ? {
7972
- height: String(
7973
- getNewHeight(width, currentAspectRatio)
7974
- )
7975
- } : {})).run();
7976
- }
7977
- }
7978
- ),
7979
- /* @__PURE__ */ jsx36(
7980
- ImageSize,
7981
- {
7982
- dimension: "height",
7983
- value: (_d = state == null ? void 0 : state.height) != null ? _d : "",
7984
- onValueChange: (value) => {
7985
- const height = Number(value) || 0;
7986
- const currentHeight = Number(state.height) || 0;
7987
- const currentWidth = Number(state.width) || 0;
7988
- const currentAspectRatio = state.aspectRatio || currentWidth / currentHeight || 1;
7989
- editor == null ? void 0 : editor.chain().updateAttributes("image", __spreadValues({
7990
- height: String(height)
7991
- }, lockAspectRatio && value ? {
7992
- width: String(
7993
- getNewWidth(height, currentAspectRatio)
7994
- )
7995
- } : {})).run();
7996
- }
7997
- }
7998
- ),
7999
- /* @__PURE__ */ jsx36(
8000
- BubbleMenuButton,
8001
- {
8002
- isActive: () => lockAspectRatio,
8003
- command: () => {
8004
- const width = Number(state.width) || 0;
8005
- const height = Number(state.height) || 0;
8006
- const aspectRatio = width / height;
8007
- editor == null ? void 0 : editor.chain().updateAttributes("image", {
8008
- lockAspectRatio: !lockAspectRatio,
8009
- aspectRatio
8010
- }).run();
8011
- },
8012
- icon: lockAspectRatio ? LockIcon : LockOpenIcon,
8013
- tooltip: "Lock Aspect Ratio"
8145
+ }
8146
+ )
8147
+ ] })
8148
+ ] })
8014
8149
  }
8015
8150
  )
8016
- ] })
8017
- ] })
8018
- ] })
8019
- })
8151
+ }
8152
+ )
8153
+ ]
8154
+ }
8020
8155
  );
8021
8156
  }
8022
8157
 
8023
- // src/editor/components/inline-image-menu/inline-image-bubble-menu.tsx
8024
- import { BubbleMenu as BubbleMenu3 } from "@tiptap/react";
8025
- import { sticky as sticky3 } from "tippy.js";
8026
-
8027
- // src/editor/nodes/inline-image/inline-image.tsx
8028
- import { mergeAttributes as mergeAttributes4, Node as Node5 } from "@tiptap/core";
8029
- import { PluginKey as PluginKey4, Plugin as Plugin3 } from "@tiptap/pm/state";
8030
- var DEFAULT_INLINE_IMAGE_HEIGHT = 20;
8031
- var DEFAULT_INLINE_IMAGE_WIDTH = 20;
8032
- var InlineImageExtension = Node5.create({
8033
- name: "inlineImage",
8034
- inline: true,
8035
- group: "inline",
8036
- selectable: false,
8037
- addOptions() {
8038
- return {
8039
- HTMLAttributes: {}
8040
- };
8041
- },
8042
- addAttributes() {
8043
- return {
8044
- height: {
8045
- default: DEFAULT_INLINE_IMAGE_HEIGHT
8046
- },
8047
- width: {
8048
- default: DEFAULT_INLINE_IMAGE_WIDTH
8049
- },
8050
- src: {
8051
- default: null
8052
- },
8053
- isSrcVariable: {
8054
- default: false,
8055
- renderHTML(attributes) {
8056
- if (!attributes.isSrcVariable) {
8057
- return {};
8058
- }
8059
- return {
8060
- "data-is-src-variable": "true"
8061
- };
8062
- }
8063
- },
8064
- alt: {
8065
- default: null
8066
- },
8067
- title: {
8068
- default: null
8069
- },
8070
- externalLink: {
8071
- default: null,
8072
- renderHTML(attributes) {
8073
- if (!attributes.externalLink) {
8074
- return {};
8075
- }
8076
- return {
8077
- "data-external-link": attributes.externalLink
8078
- };
8079
- }
8080
- },
8081
- isExternalLinkVariable: {
8082
- default: false,
8083
- renderHTML(attributes) {
8084
- if (!attributes.isExternalLinkVariable) {
8085
- return {};
8086
- }
8087
- return {
8088
- "data-is-external-link-variable": "true"
8089
- };
8090
- }
8091
- }
8092
- };
8093
- },
8094
- parseHTML() {
8095
- return [
8096
- {
8097
- tag: `img[data-type="${this.name}"]`
8098
- }
8099
- ];
8100
- },
8101
- renderHTML({ HTMLAttributes: HTMLAttributes2 }) {
8102
- const attrs = mergeAttributes4(this.options.HTMLAttributes, HTMLAttributes2, {
8103
- "data-type": this.name,
8104
- class: "mly:relative",
8105
- style: `display: inline; --mly-inline-image-height: ${HTMLAttributes2.height}px; --mly-inline-image-width: ${HTMLAttributes2.width}px; margin:0; vertical-align: middle;`,
8106
- draggable: "false",
8107
- loading: "lazy"
8108
- });
8109
- return ["img", attrs];
8110
- },
8111
- addCommands() {
8112
- return {
8113
- setInlineImage: (options) => ({ commands }) => {
8114
- return commands.insertContent({
8115
- type: this.name,
8116
- attrs: options
8117
- });
8118
- }
8119
- };
8120
- },
8121
- addProseMirrorPlugins() {
8122
- return [
8123
- new Plugin3({
8124
- key: new PluginKey4("inlineImage"),
8125
- props: {
8126
- handleClickOn: (_, pos, node) => {
8127
- if (node.type !== this.type) {
8128
- return false;
8129
- }
8130
- const from = pos;
8131
- const to = pos + node.nodeSize;
8132
- this.editor.commands.setTextSelection({ from, to });
8133
- return true;
8134
- }
8135
- }
8136
- })
8137
- ];
8138
- }
8139
- });
8140
-
8141
- // src/editor/components/inline-image-menu/use-inline-image-state.tsx
8142
- import { useEditorState as useEditorState3 } from "@tiptap/react";
8143
- import deepEql3 from "fast-deep-equal";
8144
- var useInlineImageState = (editor) => {
8145
- const states = useEditorState3({
8146
- editor,
8147
- selector: ({ editor: editor2 }) => {
8148
- var _a, _b, _c, _d, _e, _f, _g, _h;
8149
- return {
8150
- height: ((_a = editor2.getAttributes("inlineImage")) == null ? void 0 : _a.height) || DEFAULT_INLINE_IMAGE_HEIGHT,
8151
- width: ((_b = editor2.getAttributes("inlineImage")) == null ? void 0 : _b.width) || DEFAULT_INLINE_IMAGE_WIDTH,
8152
- src: ((_c = editor2.getAttributes("inlineImage")) == null ? void 0 : _c.src) || "",
8153
- isSrcVariable: (_e = (_d = editor2.getAttributes("inlineImage")) == null ? void 0 : _d.isSrcVariable) != null ? _e : false,
8154
- imageExternalLink: ((_f = editor2.getAttributes("inlineImage")) == null ? void 0 : _f.externalLink) || "",
8155
- isExternalLinkVariable: (_h = (_g = editor2.getAttributes("inlineImage")) == null ? void 0 : _g.isExternalLinkVariable) != null ? _h : false
8156
- };
8157
- },
8158
- equalityFn: deepEql3
8159
- });
8160
- return states;
8161
- };
8162
-
8163
8158
  // src/editor/components/inline-image-menu/inline-image-bubble-menu.tsx
8164
8159
  import { ImageDownIcon } from "lucide-react";
8165
- import { jsx as jsx37, jsxs as jsxs19 } from "react/jsx-runtime";
8160
+ import { jsx as jsx38, jsxs as jsxs19 } from "react/jsx-runtime";
8166
8161
  function InlineImageBubbleMenu(props) {
8167
8162
  var _a, _b;
8168
8163
  const { editor, appendTo } = props;
@@ -8186,12 +8181,12 @@ function InlineImageBubbleMenu(props) {
8186
8181
  maxWidth: "100%"
8187
8182
  }
8188
8183
  });
8189
- return /* @__PURE__ */ jsx37(
8190
- BubbleMenu3,
8184
+ return /* @__PURE__ */ jsx38(
8185
+ BubbleMenu4,
8191
8186
  __spreadProps(__spreadValues({}, bubbleMenuProps), {
8192
8187
  className: "mly:flex mly:rounded-lg mly:border mly:border-gray-200 mly:bg-white mly:p-0.5 mly:shadow-md",
8193
- children: /* @__PURE__ */ jsx37(TooltipProvider, { children: /* @__PURE__ */ jsxs19("div", { className: "mly:flex mly:gap-x-0.5", children: [
8194
- /* @__PURE__ */ jsx37(
8188
+ children: /* @__PURE__ */ jsx38(TooltipProvider, { children: /* @__PURE__ */ jsxs19("div", { className: "mly:flex mly:gap-x-0.5", children: [
8189
+ /* @__PURE__ */ jsx38(
8195
8190
  LinkInputPopover,
8196
8191
  {
8197
8192
  defaultValue: (_a = state == null ? void 0 : state.src) != null ? _a : "",
@@ -8207,7 +8202,7 @@ function InlineImageBubbleMenu(props) {
8207
8202
  isVariable: state.isSrcVariable
8208
8203
  }
8209
8204
  ),
8210
- /* @__PURE__ */ jsx37(
8205
+ /* @__PURE__ */ jsx38(
8211
8206
  LinkInputPopover,
8212
8207
  {
8213
8208
  defaultValue: (_b = state == null ? void 0 : state.imageExternalLink) != null ? _b : "",
@@ -8222,7 +8217,7 @@ function InlineImageBubbleMenu(props) {
8222
8217
  isVariable: state.isExternalLinkVariable
8223
8218
  }
8224
8219
  ),
8225
- /* @__PURE__ */ jsx37(
8220
+ /* @__PURE__ */ jsx38(
8226
8221
  ImageSize,
8227
8222
  {
8228
8223
  dimension: "height",
@@ -8241,9 +8236,9 @@ function InlineImageBubbleMenu(props) {
8241
8236
  }
8242
8237
 
8243
8238
  // src/editor/components/repeat-menu/repeat-bubble-menu.tsx
8244
- import { BubbleMenu as BubbleMenu4, findChildren } from "@tiptap/react";
8239
+ import { BubbleMenu as BubbleMenu5, findChildren } from "@tiptap/react";
8245
8240
  import { InfoIcon as InfoIcon2 } from "lucide-react";
8246
- import { useCallback as useCallback7, useMemo as useMemo7, useRef as useRef8, useState as useState8 } from "react";
8241
+ import { useCallback as useCallback7, useMemo as useMemo8, useRef as useRef8, useState as useState8 } from "react";
8247
8242
  import { sticky as sticky4 } from "tippy.js";
8248
8243
 
8249
8244
  // src/editor/components/repeat-menu/use-repeat-state.ts
@@ -8266,7 +8261,7 @@ var useRepeatState = (editor) => {
8266
8261
  };
8267
8262
 
8268
8263
  // src/editor/components/repeat-menu/repeat-bubble-menu.tsx
8269
- import { jsx as jsx38, jsxs as jsxs20 } from "react/jsx-runtime";
8264
+ import { jsx as jsx39, jsxs as jsxs20 } from "react/jsx-runtime";
8270
8265
  function RepeatBubbleMenu(props) {
8271
8266
  const { appendTo, editor } = props;
8272
8267
  if (!editor) {
@@ -8310,7 +8305,7 @@ function RepeatBubbleMenu(props) {
8310
8305
  const inputRef = useRef8(null);
8311
8306
  const [isUpdatingKey, setIsUpdatingKey] = useState8(false);
8312
8307
  const eachKey = (state == null ? void 0 : state.each) || "";
8313
- const autoCompleteOptions = useMemo7(() => {
8308
+ const autoCompleteOptions = useMemo8(() => {
8314
8309
  return processVariables(variables, {
8315
8310
  query: eachKey || "",
8316
8311
  editor,
@@ -8318,21 +8313,21 @@ function RepeatBubbleMenu(props) {
8318
8313
  }).map((variable) => variable.name);
8319
8314
  }, [variables, eachKey, editor]);
8320
8315
  const isValidEachKey = eachKey;
8321
- return /* @__PURE__ */ jsx38(
8322
- BubbleMenu4,
8316
+ return /* @__PURE__ */ jsx39(
8317
+ BubbleMenu5,
8323
8318
  __spreadProps(__spreadValues({}, bubbleMenuProps), {
8324
8319
  className: "mly:flex mly:items-stretch mly:rounded-lg mly:border mly:border-gray-200 mly:bg-white mly:p-0.5 mly:shadow-md",
8325
8320
  children: /* @__PURE__ */ jsxs20(TooltipProvider, { children: [
8326
8321
  /* @__PURE__ */ jsxs20("div", { className: "mly:flex mly:items-center mly:gap-1.5 mly:px-1.5 mly:text-sm mly:leading-none", children: [
8327
8322
  "Repeat",
8328
8323
  /* @__PURE__ */ jsxs20(Tooltip, { children: [
8329
- /* @__PURE__ */ jsx38(TooltipTrigger, { children: /* @__PURE__ */ jsx38(
8324
+ /* @__PURE__ */ jsx39(TooltipTrigger, { children: /* @__PURE__ */ jsx39(
8330
8325
  InfoIcon2,
8331
8326
  {
8332
8327
  className: cn("mly:size-3 mly:stroke-[2.5] mly:text-gray-500")
8333
8328
  }
8334
8329
  ) }),
8335
- /* @__PURE__ */ jsx38(
8330
+ /* @__PURE__ */ jsx39(
8336
8331
  TooltipContent,
8337
8332
  {
8338
8333
  sideOffset: 14,
@@ -8343,7 +8338,7 @@ function RepeatBubbleMenu(props) {
8343
8338
  )
8344
8339
  ] })
8345
8340
  ] }),
8346
- !isUpdatingKey && /* @__PURE__ */ jsx38(
8341
+ !isUpdatingKey && /* @__PURE__ */ jsx39(
8347
8342
  "button",
8348
8343
  {
8349
8344
  onClick: () => {
@@ -8364,7 +8359,7 @@ function RepeatBubbleMenu(props) {
8364
8359
  })
8365
8360
  }
8366
8361
  ),
8367
- isUpdatingKey && /* @__PURE__ */ jsx38(
8362
+ isUpdatingKey && /* @__PURE__ */ jsx39(
8368
8363
  "form",
8369
8364
  {
8370
8365
  onSubmit: (e) => {
@@ -8376,7 +8371,7 @@ function RepeatBubbleMenu(props) {
8376
8371
  setIsUpdatingKey(false);
8377
8372
  }
8378
8373
  },
8379
- children: /* @__PURE__ */ jsx38(
8374
+ children: /* @__PURE__ */ jsx39(
8380
8375
  InputAutocomplete,
8381
8376
  {
8382
8377
  editor,
@@ -8402,8 +8397,8 @@ function RepeatBubbleMenu(props) {
8402
8397
  )
8403
8398
  }
8404
8399
  ),
8405
- /* @__PURE__ */ jsx38(Divider, {}),
8406
- /* @__PURE__ */ jsx38(
8400
+ /* @__PURE__ */ jsx39(Divider, {}),
8401
+ /* @__PURE__ */ jsx39(
8407
8402
  ShowPopover,
8408
8403
  {
8409
8404
  showIfKey: state.currentShowIfKey,
@@ -8421,13 +8416,13 @@ function RepeatBubbleMenu(props) {
8421
8416
  }
8422
8417
 
8423
8418
  // src/editor/components/section-menu/section-bubble-menu.tsx
8424
- import { BubbleMenu as BubbleMenu5, findChildren as findChildren2 } from "@tiptap/react";
8419
+ import { BubbleMenu as BubbleMenu6, findChildren as findChildren2 } from "@tiptap/react";
8425
8420
  import { ChevronUp, Trash as Trash3 } from "lucide-react";
8426
8421
  import { useCallback as useCallback8 } from "react";
8427
8422
  import { sticky as sticky5 } from "tippy.js";
8428
8423
 
8429
8424
  // src/editor/components/icons/border-color.tsx
8430
- import { jsx as jsx39, jsxs as jsxs21 } from "react/jsx-runtime";
8425
+ import { jsx as jsx40, jsxs as jsxs21 } from "react/jsx-runtime";
8431
8426
  function BorderColor(props) {
8432
8427
  const _a = props, { topBarClassName } = _a, rest = __objRest(_a, ["topBarClassName"]);
8433
8428
  return /* @__PURE__ */ jsxs21(
@@ -8440,8 +8435,8 @@ function BorderColor(props) {
8440
8435
  xmlns: "http://www.w3.org/2000/svg"
8441
8436
  }, rest), {
8442
8437
  children: [
8443
- /* @__PURE__ */ jsx39("path", { d: "M0 11H10.6667", stroke: "currentColor", strokeWidth: "1.5" }),
8444
- /* @__PURE__ */ jsx39(
8438
+ /* @__PURE__ */ jsx40("path", { d: "M0 11H10.6667", stroke: "currentColor", strokeWidth: "1.5" }),
8439
+ /* @__PURE__ */ jsx40(
8445
8440
  "path",
8446
8441
  {
8447
8442
  d: "M0.666504 9V6.33333C0.666504 3.38781 3.05432 1 5.99984 1H10.6665",
@@ -8455,9 +8450,9 @@ function BorderColor(props) {
8455
8450
  }
8456
8451
 
8457
8452
  // src/editor/components/icons/margin-icon.tsx
8458
- import { jsx as jsx40 } from "react/jsx-runtime";
8453
+ import { jsx as jsx41 } from "react/jsx-runtime";
8459
8454
  function MarginIcon(props) {
8460
- return /* @__PURE__ */ jsx40(
8455
+ return /* @__PURE__ */ jsx41(
8461
8456
  "svg",
8462
8457
  __spreadProps(__spreadValues({
8463
8458
  width: 12,
@@ -8466,7 +8461,7 @@ function MarginIcon(props) {
8466
8461
  fill: "none",
8467
8462
  xmlns: "http://www.w3.org/2000/svg"
8468
8463
  }, props), {
8469
- children: /* @__PURE__ */ jsx40(
8464
+ children: /* @__PURE__ */ jsx41(
8470
8465
  "path",
8471
8466
  {
8472
8467
  d: "M10.5 10.499V1.49902M1.5 10.499V1.49902M4.5 5.99902C4.5 5.53308 4.5 5.30011 4.57612 5.11634C4.67761 4.87131 4.87229 4.67664 5.11732 4.57514C5.30109 4.49902 5.53406 4.49902 6 4.49902C6.46594 4.49902 6.69891 4.49902 6.88268 4.57514C7.12771 4.67664 7.32239 4.87131 7.42388 5.11634C7.5 5.30011 7.5 5.53308 7.5 5.99902C7.5 6.46496 7.5 6.69794 7.42388 6.88171C7.32239 7.12673 7.12771 7.32141 6.88268 7.4229C6.69891 7.49902 6.46594 7.49902 6 7.49902C5.53406 7.49902 5.30109 7.49902 5.11732 7.4229C4.87229 7.32141 4.67761 7.12673 4.57612 6.88171C4.5 6.69794 4.5 6.46496 4.5 5.99902Z",
@@ -8480,9 +8475,9 @@ function MarginIcon(props) {
8480
8475
  }
8481
8476
 
8482
8477
  // src/editor/components/icons/padding-icon.tsx
8483
- import { jsx as jsx41 } from "react/jsx-runtime";
8478
+ import { jsx as jsx42 } from "react/jsx-runtime";
8484
8479
  function PaddingIcon(props) {
8485
- return /* @__PURE__ */ jsx41(
8480
+ return /* @__PURE__ */ jsx42(
8486
8481
  "svg",
8487
8482
  __spreadProps(__spreadValues({
8488
8483
  width: 10,
@@ -8491,7 +8486,7 @@ function PaddingIcon(props) {
8491
8486
  fill: "none",
8492
8487
  xmlns: "http://www.w3.org/2000/svg"
8493
8488
  }, props), {
8494
- children: /* @__PURE__ */ jsx41(
8489
+ children: /* @__PURE__ */ jsx42(
8495
8490
  "path",
8496
8491
  {
8497
8492
  d: "M9.50244 0.501526L9.10244 0.501526C8.54239 0.501526 8.26236 0.501526 8.04845 0.610519C7.86029 0.706392 7.70731 0.859373 7.61144 1.04754C7.50244 1.26145 7.50244 1.54147 7.50244 2.10153V7.90153C7.50244 8.46158 7.50244 8.74161 7.61144 8.95552C7.70731 9.14368 7.86029 9.29666 8.04845 9.39253C8.26236 9.50153 8.54239 9.50153 9.10244 9.50153H9.50244M0.502441 0.501527L0.902441 0.501527C1.46249 0.501527 1.74252 0.501527 1.95643 0.61052C2.14459 0.706393 2.29757 0.859374 2.39345 1.04754C2.50244 1.26145 2.50244 1.54147 2.50244 2.10153L2.50244 7.90153C2.50244 8.46158 2.50244 8.74161 2.39345 8.95552C2.29757 9.14368 2.14459 9.29666 1.95643 9.39253C1.74252 9.50153 1.46249 9.50153 0.902442 9.50153H0.502442M4.99994 7.99903V1.99903",
@@ -8506,7 +8501,7 @@ function PaddingIcon(props) {
8506
8501
 
8507
8502
  // src/editor/components/ui/color-picker.tsx
8508
8503
  import { HexColorPicker, HexColorInput } from "react-colorful";
8509
- import { jsx as jsx42, jsxs as jsxs22 } from "react/jsx-runtime";
8504
+ import { jsx as jsx43, jsxs as jsxs22 } from "react/jsx-runtime";
8510
8505
  function ColorPicker(props) {
8511
8506
  const {
8512
8507
  color,
@@ -8524,14 +8519,14 @@ function ColorPicker(props) {
8524
8519
  onColorChange(color2);
8525
8520
  });
8526
8521
  };
8527
- const popoverButton = /* @__PURE__ */ jsx42(PopoverTrigger, { asChild: true, children: children || /* @__PURE__ */ jsx42(
8522
+ const popoverButton = /* @__PURE__ */ jsx43(PopoverTrigger, { asChild: true, children: children || /* @__PURE__ */ jsx43(
8528
8523
  BaseButton,
8529
8524
  {
8530
8525
  variant: "ghost",
8531
- className: "mly:h-7 mly:w-7 mly:shrink-0",
8526
+ className: "menu-option mly:h-7 mly:w-7 mly:shrink-0",
8532
8527
  size: "sm",
8533
8528
  type: "button",
8534
- children: /* @__PURE__ */ jsx42(
8529
+ children: /* @__PURE__ */ jsx43(
8535
8530
  "div",
8536
8531
  {
8537
8532
  className: cn(
@@ -8555,8 +8550,8 @@ function ColorPicker(props) {
8555
8550
  },
8556
8551
  children: [
8557
8552
  tooltip ? /* @__PURE__ */ jsxs22(Tooltip, { children: [
8558
- /* @__PURE__ */ jsx42(TooltipTrigger, { asChild: true, children: popoverButton }),
8559
- /* @__PURE__ */ jsx42(
8553
+ /* @__PURE__ */ jsx43(TooltipTrigger, { asChild: true, children: popoverButton }),
8554
+ /* @__PURE__ */ jsx43(
8560
8555
  TooltipContent,
8561
8556
  {
8562
8557
  sideOffset: 8,
@@ -8565,13 +8560,13 @@ function ColorPicker(props) {
8565
8560
  }
8566
8561
  )
8567
8562
  ] }) : popoverButton,
8568
- /* @__PURE__ */ jsx42(
8563
+ /* @__PURE__ */ jsx43(
8569
8564
  PopoverContent,
8570
8565
  {
8571
- className: "mly:w-full mly:rounded-none mly:border-0 mly:bg-transparent! mly:p-0! mly:shadow-none mly:drop-shadow-md",
8566
+ className: "menu-color-popover mly:w-full mly:rounded-none mly:border-0 mly:bg-transparent! mly:p-0! mly:shadow-none mly:drop-shadow-md",
8572
8567
  sideOffset: 8,
8573
- children: /* @__PURE__ */ jsxs22("div", { className: "mly:min-w-[260px] mly:rounded-xl mly:border mly:border-gray-200 mly:bg-white mly:p-4", children: [
8574
- /* @__PURE__ */ jsx42(
8568
+ children: /* @__PURE__ */ jsxs22("div", { className: "menu-color-panel mly:min-w-[260px] mly:rounded-xl mly:border mly:border-gray-200 mly:bg-white mly:p-4", children: [
8569
+ /* @__PURE__ */ jsx43(
8575
8570
  HexColorPicker,
8576
8571
  {
8577
8572
  color,
@@ -8579,20 +8574,20 @@ function ColorPicker(props) {
8579
8574
  className: "mly:flex mly:w-full! mly:flex-col mly:gap-4"
8580
8575
  }
8581
8576
  ),
8582
- /* @__PURE__ */ jsx42(
8577
+ /* @__PURE__ */ jsx43(
8583
8578
  HexColorInput,
8584
8579
  {
8585
8580
  alpha: true,
8586
8581
  color,
8587
8582
  onChange: handleColorChange,
8588
- className: "mly:mt-4 mly:w-full mly:min-w-0 mly:rounded-lg mly:border mly:border-gray-200 mly:bg-white mly:px-2 mly:py-1.5 mly:text-sm mly:uppercase mly:focus-visible:border-gray-400 mly:focus-visible:outline-hidden",
8583
+ className: "menu-color-hex-input mly:mt-4 mly:w-full mly:min-w-0 mly:rounded-lg mly:border mly:border-gray-200 mly:bg-white mly:px-2 mly:py-1.5 mly:text-sm mly:uppercase mly:focus-visible:border-gray-400 mly:focus-visible:outline-hidden",
8589
8584
  prefixed: true
8590
8585
  }
8591
8586
  ),
8592
8587
  suggestedColors.length > 0 && /* @__PURE__ */ jsxs22("div", { children: [
8593
- /* @__PURE__ */ jsx42("div", { className: "-mly:mx-4 mly:my-4 mly:h-px mly:bg-gray-200" }),
8594
- /* @__PURE__ */ jsx42("h2", { className: "mly:text-xs mly:text-gray-500", children: "Recently used" }),
8595
- /* @__PURE__ */ jsx42("div", { className: "mly:mt-2 mly:flex mly:flex-wrap mly:gap-0.5", children: suggestedColors.map((suggestedColor) => /* @__PURE__ */ jsx42(
8588
+ /* @__PURE__ */ jsx43("div", { className: "-mly:mx-4 mly:my-4 mly:h-px mly:bg-gray-200" }),
8589
+ /* @__PURE__ */ jsx43("h2", { className: "mly:text-xs mly:text-gray-500", children: "Recently used" }),
8590
+ /* @__PURE__ */ jsx43("div", { className: "mly:mt-2 mly:flex mly:flex-wrap mly:gap-0.5", children: suggestedColors.map((suggestedColor) => /* @__PURE__ */ jsx43(
8596
8591
  BaseButton,
8597
8592
  {
8598
8593
  variant: "ghost",
@@ -8600,7 +8595,7 @@ function ColorPicker(props) {
8600
8595
  className: "!mly:size-7 mly:shrink-0",
8601
8596
  type: "button",
8602
8597
  onClick: () => handleColorChange(suggestedColor),
8603
- children: /* @__PURE__ */ jsx42(
8598
+ children: /* @__PURE__ */ jsx43(
8604
8599
  "div",
8605
8600
  {
8606
8601
  className: "mly:h-4 mly:w-4 mly:shrink-0 mly:rounded",
@@ -8653,7 +8648,7 @@ var useSectionState = (editor) => {
8653
8648
  };
8654
8649
 
8655
8650
  // src/editor/components/section-menu/section-bubble-menu.tsx
8656
- import { Fragment as Fragment6, jsx as jsx43, jsxs as jsxs23 } from "react/jsx-runtime";
8651
+ import { Fragment as Fragment6, jsx as jsx44, jsxs as jsxs23 } from "react/jsx-runtime";
8657
8652
  function SectionBubbleMenu(props) {
8658
8653
  const { appendTo, editor } = props;
8659
8654
  if (!editor) {
@@ -8700,12 +8695,12 @@ function SectionBubbleMenu(props) {
8700
8695
  { value: "6", label: "Smooth" },
8701
8696
  { value: "9999", label: "Round" }
8702
8697
  ];
8703
- return /* @__PURE__ */ jsx43(
8704
- BubbleMenu5,
8698
+ return /* @__PURE__ */ jsx44(
8699
+ BubbleMenu6,
8705
8700
  __spreadProps(__spreadValues({}, bubbleMenuProps), {
8706
- className: "mly:flex mly:items-stretch mly:rounded-lg mly:border mly:border-gray-200 mly:bg-white mly:p-0.5 mly:shadow-md",
8701
+ className: "menu-surface menu-inline-gap mly:flex mly:items-stretch mly:rounded-lg mly:border mly:border-gray-200 mly:bg-white mly:p-0.5 mly:shadow-md",
8707
8702
  children: /* @__PURE__ */ jsxs23(TooltipProvider, { children: [
8708
- /* @__PURE__ */ jsx43(
8703
+ /* @__PURE__ */ jsx44(
8709
8704
  AlignmentSwitch,
8710
8705
  {
8711
8706
  alignment: state.currentAlignment,
@@ -8717,9 +8712,9 @@ function SectionBubbleMenu(props) {
8717
8712
  }
8718
8713
  }
8719
8714
  ),
8720
- /* @__PURE__ */ jsx43(Divider, {}),
8721
- /* @__PURE__ */ jsxs23("div", { className: "mly:flex mly:gap-x-0.5", children: [
8722
- /* @__PURE__ */ jsx43(
8715
+ /* @__PURE__ */ jsx44(Divider, {}),
8716
+ /* @__PURE__ */ jsxs23("div", { className: "menu-inline-gap mly:flex mly:gap-x-0.5", children: [
8717
+ /* @__PURE__ */ jsx44(
8723
8718
  Select,
8724
8719
  {
8725
8720
  label: "Border Radius",
@@ -8735,7 +8730,7 @@ function SectionBubbleMenu(props) {
8735
8730
  className: "mly:capitalize"
8736
8731
  }
8737
8732
  ),
8738
- /* @__PURE__ */ jsx43(
8733
+ /* @__PURE__ */ jsx44(
8739
8734
  Select,
8740
8735
  {
8741
8736
  label: "Border Width",
@@ -8757,8 +8752,8 @@ function SectionBubbleMenu(props) {
8757
8752
  }
8758
8753
  )
8759
8754
  ] }),
8760
- /* @__PURE__ */ jsx43(Divider, {}),
8761
- /* @__PURE__ */ jsx43(
8755
+ /* @__PURE__ */ jsx44(Divider, {}),
8756
+ /* @__PURE__ */ jsx44(
8762
8757
  Select,
8763
8758
  {
8764
8759
  icon: MarginIcon,
@@ -8786,8 +8781,8 @@ function SectionBubbleMenu(props) {
8786
8781
  className: "mly:capitalize"
8787
8782
  }
8788
8783
  ),
8789
- /* @__PURE__ */ jsx43(Divider, {}),
8790
- /* @__PURE__ */ jsx43(
8784
+ /* @__PURE__ */ jsx44(Divider, {}),
8785
+ /* @__PURE__ */ jsx44(
8791
8786
  Select,
8792
8787
  {
8793
8788
  icon: PaddingIcon,
@@ -8815,9 +8810,9 @@ function SectionBubbleMenu(props) {
8815
8810
  className: "mly:capitalize"
8816
8811
  }
8817
8812
  ),
8818
- /* @__PURE__ */ jsx43(Divider, {}),
8819
- /* @__PURE__ */ jsxs23("div", { className: "mly:flex mly:gap-x-0.5", children: [
8820
- /* @__PURE__ */ jsx43(
8813
+ /* @__PURE__ */ jsx44(Divider, {}),
8814
+ /* @__PURE__ */ jsxs23("div", { className: "menu-inline-gap mly:flex mly:gap-x-0.5", children: [
8815
+ /* @__PURE__ */ jsx44(
8821
8816
  ColorPicker,
8822
8817
  {
8823
8818
  color: state.currentBorderColor,
@@ -8828,14 +8823,14 @@ function SectionBubbleMenu(props) {
8828
8823
  });
8829
8824
  },
8830
8825
  tooltip: "Border Color",
8831
- children: /* @__PURE__ */ jsx43(
8826
+ children: /* @__PURE__ */ jsx44(
8832
8827
  BaseButton,
8833
8828
  {
8834
8829
  variant: "ghost",
8835
- className: "mly:h-7 mly:w-7 mly:shrink-0",
8830
+ className: "menu-option mly:h-7 mly:w-7 mly:shrink-0",
8836
8831
  size: "sm",
8837
8832
  type: "button",
8838
- children: /* @__PURE__ */ jsx43(
8833
+ children: /* @__PURE__ */ jsx44(
8839
8834
  BorderColor,
8840
8835
  {
8841
8836
  className: "mly:size-3 mly:shrink-0",
@@ -8849,7 +8844,7 @@ function SectionBubbleMenu(props) {
8849
8844
  )
8850
8845
  }
8851
8846
  ),
8852
- /* @__PURE__ */ jsx43(
8847
+ /* @__PURE__ */ jsx44(
8853
8848
  ColorPicker,
8854
8849
  {
8855
8850
  color: state.currentBackgroundColor,
@@ -8865,8 +8860,8 @@ function SectionBubbleMenu(props) {
8865
8860
  }
8866
8861
  )
8867
8862
  ] }),
8868
- /* @__PURE__ */ jsx43(Divider, {}),
8869
- /* @__PURE__ */ jsx43(
8863
+ /* @__PURE__ */ jsx44(Divider, {}),
8864
+ /* @__PURE__ */ jsx44(
8870
8865
  BubbleMenuButton,
8871
8866
  {
8872
8867
  icon: Trash3,
@@ -8877,16 +8872,16 @@ function SectionBubbleMenu(props) {
8877
8872
  }
8878
8873
  ),
8879
8874
  state.isColumnsActive && /* @__PURE__ */ jsxs23(Fragment6, { children: [
8880
- /* @__PURE__ */ jsx43(Divider, {}),
8875
+ /* @__PURE__ */ jsx44(Divider, {}),
8881
8876
  /* @__PURE__ */ jsxs23(Popover, { children: [
8882
- /* @__PURE__ */ jsxs23(PopoverTrigger, { className: "mly:flex mly:items-center mly:gap-1 mly:rounded-md mly:px-1.5 mly:text-sm mly:data-[state=open]:bg-soft-gray mly:hover:bg-soft-gray", children: [
8877
+ /* @__PURE__ */ jsxs23(PopoverTrigger, { className: "menu-option mly:flex mly:items-center mly:gap-1 mly:rounded-md mly:px-1.5 mly:text-sm mly:data-[state=open]:bg-soft-gray mly:hover:bg-soft-gray", children: [
8883
8878
  "Column",
8884
- /* @__PURE__ */ jsx43(ChevronUp, { className: "mly:h-3 mly:w-3" })
8879
+ /* @__PURE__ */ jsx44(ChevronUp, { className: "mly:h-3 mly:w-3" })
8885
8880
  ] }),
8886
- /* @__PURE__ */ jsx43(
8881
+ /* @__PURE__ */ jsx44(
8887
8882
  PopoverContent,
8888
8883
  {
8889
- className: "mly:w-max mly:rounded-lg mly:p-0.5!",
8884
+ className: "menu-dropdown-surface mly:w-max mly:rounded-lg mly:p-0.5!",
8890
8885
  side: "top",
8891
8886
  sideOffset: 8,
8892
8887
  align: "end",
@@ -8896,7 +8891,7 @@ function SectionBubbleMenu(props) {
8896
8891
  onCloseAutoFocus: (e) => {
8897
8892
  e.preventDefault();
8898
8893
  },
8899
- children: /* @__PURE__ */ jsx43(ColumnsBubbleMenuContent, { editor })
8894
+ children: /* @__PURE__ */ jsx44(ColumnsBubbleMenuContent, { editor })
8900
8895
  }
8901
8896
  )
8902
8897
  ] })
@@ -8907,7 +8902,7 @@ function SectionBubbleMenu(props) {
8907
8902
  }
8908
8903
 
8909
8904
  // src/editor/components/spacer-menu/spacer-bubble-menu.tsx
8910
- import { BubbleMenu as BubbleMenu6 } from "@tiptap/react";
8905
+ import { BubbleMenu as BubbleMenu7 } from "@tiptap/react";
8911
8906
 
8912
8907
  // src/editor/components/spacer-menu/use-spacer-state.ts
8913
8908
  import { useEditorState as useEditorState6 } from "@tiptap/react";
@@ -8927,14 +8922,14 @@ var useSpacerState = (editor) => {
8927
8922
  };
8928
8923
 
8929
8924
  // src/editor/components/spacer-menu/spacer-bubble-menu.tsx
8930
- import { useMemo as useMemo8 } from "react";
8931
- import { jsx as jsx44 } from "react/jsx-runtime";
8925
+ import { useMemo as useMemo9 } from "react";
8926
+ import { jsx as jsx45 } from "react/jsx-runtime";
8932
8927
  function SpacerBubbleMenu(props) {
8933
8928
  const { editor, appendTo } = props;
8934
8929
  if (!editor) {
8935
8930
  return null;
8936
8931
  }
8937
- const items = useMemo8(
8932
+ const items = useMemo9(
8938
8933
  () => spacing.map((space) => {
8939
8934
  const { value: height, short: name } = space;
8940
8935
  return {
@@ -8960,11 +8955,11 @@ function SpacerBubbleMenu(props) {
8960
8955
  }
8961
8956
  });
8962
8957
  const state = useSpacerState(editor);
8963
- return /* @__PURE__ */ jsx44(
8964
- BubbleMenu6,
8958
+ return /* @__PURE__ */ jsx45(
8959
+ BubbleMenu7,
8965
8960
  __spreadProps(__spreadValues({}, bubbleMenuProps), {
8966
- className: "mly:flex mly:gap-0.5 mly:rounded-lg mly:border mly:border-gray-200 mly:bg-white mly:p-0.5 mly:shadow-md",
8967
- children: /* @__PURE__ */ jsx44(TooltipProvider, { children: items.map((item, index) => /* @__PURE__ */ jsx44(
8961
+ className: "menu-surface mly:flex mly:gap-0.5 mly:rounded-lg mly:border mly:border-gray-200 mly:bg-white mly:p-0.5 mly:shadow-md",
8962
+ children: /* @__PURE__ */ jsx45(TooltipProvider, { children: items.map((item, index) => /* @__PURE__ */ jsx45(
8968
8963
  BubbleMenuButton,
8969
8964
  __spreadValues({
8970
8965
  className: "!mly:h-7 mly:w-7 mly:shrink-0 mly:p-0",
@@ -9088,6 +9083,17 @@ var ColumnsExtension = Node6.create({
9088
9083
  import { InputRule } from "@tiptap/core";
9089
9084
  import { HorizontalRule as TipTapHorizontalRule } from "@tiptap/extension-horizontal-rule";
9090
9085
  var HorizontalRule = TipTapHorizontalRule.extend({
9086
+ addAttributes() {
9087
+ return {
9088
+ size: {
9089
+ default: 32,
9090
+ parseHTML: (element) => Number(element.getAttribute("data-size") || 32),
9091
+ renderHTML: (attributes) => ({
9092
+ "data-size": attributes.size
9093
+ })
9094
+ }
9095
+ };
9096
+ },
9091
9097
  addInputRules() {
9092
9098
  return [
9093
9099
  new InputRule({
@@ -9108,7 +9114,7 @@ var HorizontalRule = TipTapHorizontalRule.extend({
9108
9114
  addOptions() {
9109
9115
  return {
9110
9116
  HTMLAttributes: {
9111
- class: "mly:relative"
9117
+ class: "mly:relative mly-divider-node"
9112
9118
  }
9113
9119
  };
9114
9120
  }
@@ -9205,11 +9211,11 @@ import { NodeViewWrapper as NodeViewWrapper4 } from "@tiptap/react";
9205
9211
 
9206
9212
  // src/editor/components/input.tsx
9207
9213
  import * as React5 from "react";
9208
- import { jsx as jsx45 } from "react/jsx-runtime";
9214
+ import { jsx as jsx46 } from "react/jsx-runtime";
9209
9215
  var Input = React5.forwardRef(
9210
9216
  (_a, ref) => {
9211
9217
  var _b = _a, { className, type } = _b, props = __objRest(_b, ["className", "type"]);
9212
- return /* @__PURE__ */ jsx45(
9218
+ return /* @__PURE__ */ jsx46(
9213
9219
  "input",
9214
9220
  __spreadValues(__spreadProps(__spreadValues({}, AUTOCOMPLETE_PASSWORD_MANAGERS_OFF), {
9215
9221
  type,
@@ -9227,11 +9233,11 @@ Input.displayName = "Input";
9227
9233
 
9228
9234
  // src/editor/components/textarea.tsx
9229
9235
  import * as React6 from "react";
9230
- import { jsx as jsx46 } from "react/jsx-runtime";
9236
+ import { jsx as jsx47 } from "react/jsx-runtime";
9231
9237
  var Textarea = React6.forwardRef(
9232
9238
  (_a, ref) => {
9233
9239
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
9234
- return /* @__PURE__ */ jsx46(
9240
+ return /* @__PURE__ */ jsx47(
9235
9241
  "textarea",
9236
9242
  __spreadValues({
9237
9243
  className: cn(
@@ -9247,18 +9253,18 @@ var Textarea = React6.forwardRef(
9247
9253
  Textarea.displayName = "Textarea";
9248
9254
 
9249
9255
  // src/editor/nodes/link-card.tsx
9250
- import { jsx as jsx47, jsxs as jsxs24 } from "react/jsx-runtime";
9256
+ import { jsx as jsx48, jsxs as jsxs24 } from "react/jsx-runtime";
9251
9257
  function LinkCardComponent(props) {
9252
9258
  const { title, description, link, linkTitle, image: image2, badgeText, subTitle } = props.node.attrs;
9253
9259
  const { getPos, editor } = props;
9254
- return /* @__PURE__ */ jsx47(
9260
+ return /* @__PURE__ */ jsx48(
9255
9261
  NodeViewWrapper4,
9256
9262
  {
9257
9263
  className: `react-component ${props.selected && "ProseMirror-selectednode"}`,
9258
9264
  draggable: editor.isEditable,
9259
9265
  "data-drag-handle": editor.isEditable,
9260
9266
  children: /* @__PURE__ */ jsxs24(Popover, { open: props.selected, children: [
9261
- /* @__PURE__ */ jsx47(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx47(
9267
+ /* @__PURE__ */ jsx48(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx48(
9262
9268
  "div",
9263
9269
  {
9264
9270
  tabIndex: -1,
@@ -9268,7 +9274,7 @@ function LinkCardComponent(props) {
9268
9274
  editor.commands.setNodeSelection(pos);
9269
9275
  },
9270
9276
  children: /* @__PURE__ */ jsxs24("div", { className: "mly:no-prose mly:flex mly:flex-col mly:rounded-lg mly:border mly:border-gray-300", children: [
9271
- image2 && /* @__PURE__ */ jsx47("div", { className: "mly:relative mly:mb-1.5 mly:w-full mly:shrink-0", children: /* @__PURE__ */ jsx47(
9277
+ image2 && /* @__PURE__ */ jsx48("div", { className: "mly:relative mly:mb-1.5 mly:w-full mly:shrink-0", children: /* @__PURE__ */ jsx48(
9272
9278
  "img",
9273
9279
  {
9274
9280
  src: image2,
@@ -9277,17 +9283,17 @@ function LinkCardComponent(props) {
9277
9283
  draggable: editor.isEditable
9278
9284
  }
9279
9285
  ) }),
9280
- /* @__PURE__ */ jsx47("div", { className: "mly:flex mly:items-stretch mly:p-3", children: /* @__PURE__ */ jsxs24("div", { className: cn("mly:flex mly:flex-col"), children: [
9286
+ /* @__PURE__ */ jsx48("div", { className: "mly:flex mly:items-stretch mly:p-3", children: /* @__PURE__ */ jsxs24("div", { className: cn("mly:flex mly:flex-col"), children: [
9281
9287
  /* @__PURE__ */ jsxs24("div", { className: "!mly:mb-1.5 mly:flex mly:items-center mly:gap-1.5", children: [
9282
- /* @__PURE__ */ jsx47("h2", { className: "!mly:mb-0 mly:text-lg! mly:font-semibold", children: title }),
9283
- badgeText && /* @__PURE__ */ jsx47("span", { className: "!mly:font-base mly:rounded-md mly:bg-yellow-200 mly:px-2 mly:py-1 mly:font-semibold mly:leading-none text-xs", children: badgeText }),
9288
+ /* @__PURE__ */ jsx48("h2", { className: "!mly:mb-0 mly:text-lg! mly:font-semibold", children: title }),
9289
+ badgeText && /* @__PURE__ */ jsx48("span", { className: "!mly:font-base mly:rounded-md mly:bg-yellow-200 mly:px-2 mly:py-1 mly:font-semibold mly:leading-none text-xs", children: badgeText }),
9284
9290
  " ",
9285
- subTitle && !badgeText && /* @__PURE__ */ jsx47("span", { className: "!mly:font-base mly:font-regular mly:rounded-md mly:leading-none mly:text-gray-400 text-xs", children: subTitle })
9291
+ subTitle && !badgeText && /* @__PURE__ */ jsx48("span", { className: "!mly:font-base mly:font-regular mly:rounded-md mly:leading-none mly:text-gray-400 text-xs", children: subTitle })
9286
9292
  ] }),
9287
9293
  /* @__PURE__ */ jsxs24("p", { className: "!mly:my-0 mly:text-base! mly:text-gray-500", children: [
9288
9294
  description,
9289
9295
  " ",
9290
- linkTitle ? /* @__PURE__ */ jsx47("a", { href: link, className: "mly:font-semibold", children: linkTitle }) : null
9296
+ linkTitle ? /* @__PURE__ */ jsx48("a", { href: link, className: "mly:font-semibold", children: linkTitle }) : null
9291
9297
  ] })
9292
9298
  ] }) })
9293
9299
  ] })
@@ -9303,8 +9309,8 @@ function LinkCardComponent(props) {
9303
9309
  onCloseAutoFocus: (e) => e.preventDefault(),
9304
9310
  children: [
9305
9311
  /* @__PURE__ */ jsxs24("label", { className: "mly:w-full mly:space-y-1", children: [
9306
- /* @__PURE__ */ jsx47("span", { className: "mly:text-xs mly:font-normal mly:text-slate-400", children: "Image" }),
9307
- /* @__PURE__ */ jsx47(
9312
+ /* @__PURE__ */ jsx48("span", { className: "mly:text-xs mly:font-normal mly:text-slate-400", children: "Image" }),
9313
+ /* @__PURE__ */ jsx48(
9308
9314
  Input,
9309
9315
  {
9310
9316
  placeholder: "Add Image",
@@ -9319,8 +9325,8 @@ function LinkCardComponent(props) {
9319
9325
  )
9320
9326
  ] }),
9321
9327
  /* @__PURE__ */ jsxs24("label", { className: "mly:w-full mly:space-y-1", children: [
9322
- /* @__PURE__ */ jsx47("span", { className: "mly:text-xs mly:font-normal mly:text-slate-400", children: "Title" }),
9323
- /* @__PURE__ */ jsx47(
9328
+ /* @__PURE__ */ jsx48("span", { className: "mly:text-xs mly:font-normal mly:text-slate-400", children: "Title" }),
9329
+ /* @__PURE__ */ jsx48(
9324
9330
  Input,
9325
9331
  {
9326
9332
  placeholder: "Add title",
@@ -9334,8 +9340,8 @@ function LinkCardComponent(props) {
9334
9340
  )
9335
9341
  ] }),
9336
9342
  /* @__PURE__ */ jsxs24("label", { className: "mly:w-full mly:space-y-1", children: [
9337
- /* @__PURE__ */ jsx47("span", { className: "mly:text-xs mly:font-normal mly:text-slate-400", children: "Description" }),
9338
- /* @__PURE__ */ jsx47(
9343
+ /* @__PURE__ */ jsx48("span", { className: "mly:text-xs mly:font-normal mly:text-slate-400", children: "Description" }),
9344
+ /* @__PURE__ */ jsx48(
9339
9345
  Textarea,
9340
9346
  {
9341
9347
  placeholder: "Add description here",
@@ -9350,8 +9356,8 @@ function LinkCardComponent(props) {
9350
9356
  ] }),
9351
9357
  /* @__PURE__ */ jsxs24("div", { className: "mly:grid mly:grid-cols-2 mly:gap-2", children: [
9352
9358
  /* @__PURE__ */ jsxs24("label", { className: "mly:w-full mly:space-y-1", children: [
9353
- /* @__PURE__ */ jsx47("span", { className: "mly:text-xs mly:font-normal mly:text-slate-400", children: "Link Title" }),
9354
- /* @__PURE__ */ jsx47(
9359
+ /* @__PURE__ */ jsx48("span", { className: "mly:text-xs mly:font-normal mly:text-slate-400", children: "Link Title" }),
9360
+ /* @__PURE__ */ jsx48(
9355
9361
  Input,
9356
9362
  {
9357
9363
  placeholder: "Add link title here",
@@ -9365,8 +9371,8 @@ function LinkCardComponent(props) {
9365
9371
  )
9366
9372
  ] }),
9367
9373
  /* @__PURE__ */ jsxs24("label", { className: "mly:w-full mly:space-y-1", children: [
9368
- /* @__PURE__ */ jsx47("span", { className: "mly:text-xs mly:font-normal mly:text-slate-400", children: "Link" }),
9369
- /* @__PURE__ */ jsx47(
9374
+ /* @__PURE__ */ jsx48("span", { className: "mly:text-xs mly:font-normal mly:text-slate-400", children: "Link" }),
9375
+ /* @__PURE__ */ jsx48(
9370
9376
  Input,
9371
9377
  {
9372
9378
  placeholder: "Add link here",
@@ -9382,8 +9388,8 @@ function LinkCardComponent(props) {
9382
9388
  ] }),
9383
9389
  /* @__PURE__ */ jsxs24("div", { className: "mly:grid mly:grid-cols-2 mly:gap-2", children: [
9384
9390
  /* @__PURE__ */ jsxs24("label", { className: "mly:w-full mly:space-y-1", children: [
9385
- /* @__PURE__ */ jsx47("span", { className: "mly:text-xs mly:font-normal mly:text-slate-400", children: "Badge Text" }),
9386
- /* @__PURE__ */ jsx47(
9391
+ /* @__PURE__ */ jsx48("span", { className: "mly:text-xs mly:font-normal mly:text-slate-400", children: "Badge Text" }),
9392
+ /* @__PURE__ */ jsx48(
9387
9393
  Input,
9388
9394
  {
9389
9395
  placeholder: "Add badge text here",
@@ -9397,8 +9403,8 @@ function LinkCardComponent(props) {
9397
9403
  )
9398
9404
  ] }),
9399
9405
  /* @__PURE__ */ jsxs24("label", { className: "mly:w-full mly:space-y-1", children: [
9400
- /* @__PURE__ */ jsx47("span", { className: "mly:text-xs mly:font-normal mly:text-slate-400", children: "Sub Title" }),
9401
- /* @__PURE__ */ jsx47(
9406
+ /* @__PURE__ */ jsx48("span", { className: "mly:text-xs mly:font-normal mly:text-slate-400", children: "Sub Title" }),
9407
+ /* @__PURE__ */ jsx48(
9402
9408
  Input,
9403
9409
  {
9404
9410
  placeholder: "Add sub title here",
@@ -9497,11 +9503,12 @@ import { ReactNodeViewRenderer as ReactNodeViewRenderer4 } from "@tiptap/react";
9497
9503
 
9498
9504
  // src/editor/nodes/button/button-view.tsx
9499
9505
  import { NodeViewWrapper as NodeViewWrapper5 } from "@tiptap/react";
9500
- import { useMemo as useMemo10 } from "react";
9506
+ import { AlignCenter as AlignCenter3, AlignLeft as AlignLeft3, AlignRight as AlignRight3 } from "lucide-react";
9507
+ import { useMemo as useMemo11 } from "react";
9501
9508
 
9502
9509
  // src/editor/nodes/button/button-label-input.tsx
9503
- import { useMemo as useMemo9, useRef as useRef9, useState as useState9 } from "react";
9504
- import { jsx as jsx48, jsxs as jsxs25 } from "react/jsx-runtime";
9510
+ import { useMemo as useMemo10, useRef as useRef9, useState as useState9 } from "react";
9511
+ import { jsx as jsx49, jsxs as jsxs25 } from "react/jsx-runtime";
9505
9512
  function ButtonLabelInput(props) {
9506
9513
  var _a, _b;
9507
9514
  const { value, onValueChange, isVariable, editor } = props;
@@ -9512,7 +9519,7 @@ function ButtonLabelInput(props) {
9512
9519
  const variables = otps == null ? void 0 : otps.variables;
9513
9520
  const variableTriggerCharacter = (_b = (_a = otps == null ? void 0 : otps.suggestion) == null ? void 0 : _a.char) != null ? _b : DEFAULT_VARIABLE_TRIGGER_CHAR;
9514
9521
  const renderVariable = otps == null ? void 0 : otps.renderVariable;
9515
- const autoCompleteOptions = useMemo9(() => {
9522
+ const autoCompleteOptions = useMemo10(() => {
9516
9523
  const withoutTrigger = value.replace(
9517
9524
  new RegExp(variableTriggerCharacter, "g"),
9518
9525
  ""
@@ -9524,7 +9531,7 @@ function ButtonLabelInput(props) {
9524
9531
  }).map((variable) => variable.name);
9525
9532
  }, [variables, value, editor]);
9526
9533
  return /* @__PURE__ */ jsxs25("div", { className: "mly:isolate mly:flex mly:items-center mly:rounded-lg", children: [
9527
- !isEditing && /* @__PURE__ */ jsx48(
9534
+ !isEditing && /* @__PURE__ */ jsx49(
9528
9535
  "button",
9529
9536
  {
9530
9537
  onClick: () => {
@@ -9545,7 +9552,7 @@ function ButtonLabelInput(props) {
9545
9552
  })
9546
9553
  }
9547
9554
  ),
9548
- isEditing && /* @__PURE__ */ jsx48(
9555
+ isEditing && /* @__PURE__ */ jsx49(
9549
9556
  InputAutocomplete,
9550
9557
  {
9551
9558
  editor,
@@ -9556,7 +9563,7 @@ function ButtonLabelInput(props) {
9556
9563
  autoCompleteOptions,
9557
9564
  ref: linkInputRef,
9558
9565
  placeholder: placeholderUrl,
9559
- className: "mly:h-7 mly:w-40 mly:rounded-md mly:px-2 mly:pr-6 mly:text-sm mly:text-midnight-gray mly:hover:bg-soft-gray mly:focus:bg-soft-gray mly:focus:outline-hidden",
9566
+ className: "menu-option mly:h-7 mly:w-40 mly:rounded-md mly:px-2 mly:pr-6 mly:text-sm mly:text-midnight-gray mly:hover:bg-soft-gray mly:focus:bg-soft-gray mly:focus:outline-hidden",
9560
9567
  triggerChar: variableTriggerCharacter,
9561
9568
  onSelectOption: (value2) => {
9562
9569
  var _a2;
@@ -9572,7 +9579,7 @@ function ButtonLabelInput(props) {
9572
9579
  }
9573
9580
 
9574
9581
  // src/editor/nodes/button/button-view.tsx
9575
- import { jsx as jsx49, jsxs as jsxs26 } from "react/jsx-runtime";
9582
+ import { jsx as jsx50, jsxs as jsxs26 } from "react/jsx-runtime";
9576
9583
  function ButtonView(props) {
9577
9584
  const { node, editor, getPos, updateAttributes: updateAttributes2 } = props;
9578
9585
  const {
@@ -9581,6 +9588,7 @@ function ButtonView(props) {
9581
9588
  alignment,
9582
9589
  variant,
9583
9590
  borderRadius: _radius,
9591
+ size: rawSize,
9584
9592
  buttonColor,
9585
9593
  textColor,
9586
9594
  url: externalLink,
@@ -9592,7 +9600,7 @@ function ButtonView(props) {
9592
9600
  } = node.attrs;
9593
9601
  const opts = useVariableOptions(editor);
9594
9602
  const renderVariable = opts == null ? void 0 : opts.renderVariable;
9595
- const sizes = useMemo10(
9603
+ const sizes = useMemo11(
9596
9604
  () => ({
9597
9605
  small: {
9598
9606
  paddingX: 24,
@@ -9609,13 +9617,16 @@ function ButtonView(props) {
9609
9617
  }),
9610
9618
  []
9611
9619
  );
9612
- const size = useMemo10(() => {
9620
+ const size = useMemo11(() => {
9613
9621
  var _a;
9614
- return (_a = Object.entries(sizes).find(
9622
+ if (allowedButtonSize.includes(rawSize)) {
9623
+ return rawSize;
9624
+ }
9625
+ return ((_a = Object.entries(sizes).find(
9615
9626
  ([, { paddingX, paddingY }]) => paddingRight === paddingX && paddingTop === paddingY
9616
- )) == null ? void 0 : _a[0];
9617
- }, [paddingRight, paddingTop, sizes]);
9618
- return /* @__PURE__ */ jsx49(
9627
+ )) == null ? void 0 : _a[0]) || "medium";
9628
+ }, [rawSize, paddingRight, paddingTop, sizes]);
9629
+ return /* @__PURE__ */ jsx50(
9619
9630
  NodeViewWrapper5,
9620
9631
  {
9621
9632
  draggable: editor.isEditable,
@@ -9625,7 +9636,7 @@ function ButtonView(props) {
9625
9636
  textAlign: alignment
9626
9637
  },
9627
9638
  children: /* @__PURE__ */ jsxs26(Popover, { open: props.selected && editor.isEditable, children: [
9628
- /* @__PURE__ */ jsx49(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx49("div", { children: /* @__PURE__ */ jsx49(
9639
+ /* @__PURE__ */ jsx50(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx50("div", { children: /* @__PURE__ */ jsx50(
9629
9640
  "button",
9630
9641
  {
9631
9642
  className: cn(
@@ -9668,17 +9679,17 @@ function ButtonView(props) {
9668
9679
  }) : text2
9669
9680
  }
9670
9681
  ) }) }),
9671
- /* @__PURE__ */ jsx49(
9682
+ /* @__PURE__ */ jsx50(
9672
9683
  PopoverContent,
9673
9684
  {
9674
9685
  align: "end",
9675
9686
  side: "top",
9676
- className: "mly:w-max mly:rounded-lg mly:p-0.5!",
9687
+ className: "menu-dropdown-surface button-menu-surface mly:w-max mly:rounded-lg mly:p-0.5!",
9677
9688
  sideOffset: 8,
9678
9689
  onOpenAutoFocus: (e) => e.preventDefault(),
9679
9690
  onCloseAutoFocus: (e) => e.preventDefault(),
9680
- children: /* @__PURE__ */ jsx49(TooltipProvider, { children: /* @__PURE__ */ jsxs26("div", { className: "mly:flex mly:items-stretch mly:text-midnight-gray", children: [
9681
- /* @__PURE__ */ jsx49(
9691
+ children: /* @__PURE__ */ jsx50(TooltipProvider, { children: /* @__PURE__ */ jsxs26("div", { className: "menu-surface menu-inline-gap mly:flex mly:items-stretch mly:text-midnight-gray", children: [
9692
+ /* @__PURE__ */ jsx50(
9682
9693
  ButtonLabelInput,
9683
9694
  {
9684
9695
  value: text2,
@@ -9692,9 +9703,9 @@ function ButtonView(props) {
9692
9703
  editor
9693
9704
  }
9694
9705
  ),
9695
- /* @__PURE__ */ jsx49(Divider, {}),
9696
- /* @__PURE__ */ jsxs26("div", { className: "mly:flex mly:gap-x-0.5", children: [
9697
- /* @__PURE__ */ jsx49(
9706
+ /* @__PURE__ */ jsx50(Divider, {}),
9707
+ /* @__PURE__ */ jsxs26("div", { className: "menu-inline-gap mly:flex mly:gap-x-0.5", children: [
9708
+ /* @__PURE__ */ jsx50(
9698
9709
  Select,
9699
9710
  {
9700
9711
  label: "Border Radius",
@@ -9712,7 +9723,7 @@ function ButtonView(props) {
9712
9723
  className: "mly:capitalize"
9713
9724
  }
9714
9725
  ),
9715
- /* @__PURE__ */ jsx49(
9726
+ /* @__PURE__ */ jsx50(
9716
9727
  Select,
9717
9728
  {
9718
9729
  label: "Style",
@@ -9730,7 +9741,7 @@ function ButtonView(props) {
9730
9741
  className: "mly:capitalize"
9731
9742
  }
9732
9743
  ),
9733
- /* @__PURE__ */ jsx49(
9744
+ /* @__PURE__ */ jsx50(
9734
9745
  Select,
9735
9746
  {
9736
9747
  label: "Size",
@@ -9743,6 +9754,7 @@ function ButtonView(props) {
9743
9754
  onValueChange: (value) => {
9744
9755
  const { paddingX, paddingY } = sizes[value];
9745
9756
  updateAttributes2({
9757
+ size: value,
9746
9758
  paddingTop: paddingY,
9747
9759
  paddingRight: paddingX,
9748
9760
  paddingBottom: paddingY,
@@ -9754,20 +9766,48 @@ function ButtonView(props) {
9754
9766
  }
9755
9767
  )
9756
9768
  ] }),
9757
- /* @__PURE__ */ jsx49(Divider, {}),
9758
- /* @__PURE__ */ jsxs26("div", { className: "mly:flex mly:gap-x-0.5", children: [
9759
- /* @__PURE__ */ jsx49(
9760
- AlignmentSwitch,
9769
+ /* @__PURE__ */ jsx50(Divider, {}),
9770
+ /* @__PURE__ */ jsxs26("div", { className: "menu-inline-gap mly:flex mly:gap-x-0.5", children: [
9771
+ /* @__PURE__ */ jsx50(
9772
+ BubbleMenuButton,
9761
9773
  {
9762
- alignment,
9763
- onAlignmentChange: (alignment2) => {
9774
+ icon: AlignLeft3,
9775
+ tooltip: "Align Left",
9776
+ command: () => {
9764
9777
  updateAttributes2({
9765
- alignment: alignment2
9778
+ alignment: "left"
9766
9779
  });
9767
- }
9780
+ },
9781
+ isActive: () => alignment === "left"
9782
+ }
9783
+ ),
9784
+ /* @__PURE__ */ jsx50(
9785
+ BubbleMenuButton,
9786
+ {
9787
+ icon: AlignCenter3,
9788
+ tooltip: "Align Center",
9789
+ command: () => {
9790
+ updateAttributes2({
9791
+ alignment: "center"
9792
+ });
9793
+ },
9794
+ isActive: () => alignment === "center"
9768
9795
  }
9769
9796
  ),
9770
- /* @__PURE__ */ jsx49(
9797
+ /* @__PURE__ */ jsx50(
9798
+ BubbleMenuButton,
9799
+ {
9800
+ icon: AlignRight3,
9801
+ tooltip: "Align Right",
9802
+ command: () => {
9803
+ updateAttributes2({
9804
+ alignment: "right"
9805
+ });
9806
+ },
9807
+ isActive: () => alignment === "right"
9808
+ }
9809
+ ),
9810
+ /* @__PURE__ */ jsx50(
9771
9811
  LinkInputPopover,
9772
9812
  {
9773
9813
  defaultValue: externalLink || "",
@@ -9783,13 +9823,13 @@ function ButtonView(props) {
9783
9823
  }
9784
9824
  )
9785
9825
  ] }),
9786
- /* @__PURE__ */ jsx49(Divider, {}),
9787
- /* @__PURE__ */ jsxs26("div", { className: "mly:flex mly:gap-x-0.5", children: [
9788
- /* @__PURE__ */ jsx49(
9826
+ /* @__PURE__ */ jsx50(Divider, {}),
9827
+ /* @__PURE__ */ jsxs26("div", { className: "menu-inline-gap mly:flex mly:gap-x-0.5", children: [
9828
+ /* @__PURE__ */ jsx50(
9789
9829
  BackgroundColorPickerPopup,
9790
9830
  {
9791
9831
  variant,
9792
- color: buttonColor || "transparent",
9832
+ color: buttonColor || DEFAULT_BUTTON_BACKGROUND_COLOR,
9793
9833
  onChange: (color) => {
9794
9834
  updateAttributes2({
9795
9835
  buttonColor: color
@@ -9797,10 +9837,10 @@ function ButtonView(props) {
9797
9837
  }
9798
9838
  }
9799
9839
  ),
9800
- /* @__PURE__ */ jsx49(
9840
+ /* @__PURE__ */ jsx50(
9801
9841
  TextColorPickerPopup,
9802
9842
  {
9803
- color: textColor || "transparent",
9843
+ color: textColor || DEFAULT_BUTTON_TEXT_COLOR,
9804
9844
  onChange: (color) => {
9805
9845
  updateAttributes2({
9806
9846
  textColor: color
@@ -9818,20 +9858,20 @@ function ButtonView(props) {
9818
9858
  }
9819
9859
  function BackgroundColorPickerPopup(props) {
9820
9860
  const { color, onChange, variant } = props;
9821
- return /* @__PURE__ */ jsx49(
9861
+ return /* @__PURE__ */ jsx50(
9822
9862
  ColorPicker,
9823
9863
  {
9824
9864
  color,
9825
9865
  onColorChange: onChange,
9826
9866
  tooltip: "Background Color",
9827
- children: /* @__PURE__ */ jsx49(
9867
+ children: /* @__PURE__ */ jsx50(
9828
9868
  BaseButton,
9829
9869
  {
9830
9870
  variant: "ghost",
9831
9871
  size: "sm",
9832
9872
  type: "button",
9833
- className: "mly:size-7",
9834
- children: /* @__PURE__ */ jsx49(
9873
+ className: "menu-option mly:size-7",
9874
+ children: /* @__PURE__ */ jsx50(
9835
9875
  "div",
9836
9876
  {
9837
9877
  className: "mly:h-4 mly:w-4 mly:shrink-0 mly:rounded-full mly:shadow",
@@ -9850,16 +9890,16 @@ function BackgroundColorPickerPopup(props) {
9850
9890
  }
9851
9891
  function TextColorPickerPopup(props) {
9852
9892
  const { color, onChange } = props;
9853
- return /* @__PURE__ */ jsx49(ColorPicker, { color, onColorChange: onChange, tooltip: "Text Color", children: /* @__PURE__ */ jsx49(
9893
+ return /* @__PURE__ */ jsx50(ColorPicker, { color, onColorChange: onChange, tooltip: "Text Color", children: /* @__PURE__ */ jsx50(
9854
9894
  BaseButton,
9855
9895
  {
9856
9896
  variant: "ghost",
9857
9897
  size: "sm",
9858
9898
  type: "button",
9859
- className: "mly:size-7",
9899
+ className: "menu-option mly:size-7",
9860
9900
  children: /* @__PURE__ */ jsxs26("div", { className: "mly:flex mly:flex-col mly:items-center mly:justify-center mly:gap-px", children: [
9861
- /* @__PURE__ */ jsx49("span", { className: "mly:font-bolder mly:font-mono mly:text-xs mly:text-midnight-gray", children: "A" }),
9862
- /* @__PURE__ */ jsx49(
9901
+ /* @__PURE__ */ jsx50("span", { className: "mly:font-bolder mly:font-mono mly:text-xs mly:text-midnight-gray", children: "A" }),
9902
+ /* @__PURE__ */ jsx50(
9863
9903
  "div",
9864
9904
  {
9865
9905
  className: "mly:h-[2px] mly:w-3 mly:shrink-0 mly:rounded-md mly:shadow",
@@ -9875,14 +9915,15 @@ function TextColorPickerPopup(props) {
9875
9915
  var DEFAULT_BUTTON_ALIGNMENT = "left";
9876
9916
  var DEFAULT_BUTTON_VARIANT = "filled";
9877
9917
  var DEFAULT_BUTTON_BORDER_RADIUS = "smooth";
9878
- var DEFAULT_BUTTON_BACKGROUND_COLOR = null;
9879
- var DEFAULT_BUTTON_TEXT_COLOR = null;
9918
+ var DEFAULT_BUTTON_BACKGROUND_COLOR = "#000000";
9919
+ var DEFAULT_BUTTON_TEXT_COLOR = "#ffffff";
9880
9920
  var DEFAULT_BUTTON_PADDING_TOP = null;
9881
9921
  var DEFAULT_BUTTON_PADDING_RIGHT = null;
9882
9922
  var DEFAULT_BUTTON_PADDING_BOTTOM = null;
9883
9923
  var DEFAULT_BUTTON_PADDING_LEFT = null;
9884
9924
  var allowedButtonVariant = ["filled", "outline"];
9885
9925
  var allowedButtonBorderRadius = ["sharp", "smooth", "round"];
9926
+ var allowedButtonSize = ["small", "medium", "large"];
9886
9927
  var ButtonExtension = Node9.create({
9887
9928
  name: "button",
9888
9929
  group: "block",
@@ -9976,6 +10017,18 @@ var ButtonExtension = Node9.create({
9976
10017
  };
9977
10018
  }
9978
10019
  },
10020
+ size: {
10021
+ default: "medium",
10022
+ parseHTML: (element) => {
10023
+ const value = element.getAttribute("data-size");
10024
+ return allowedButtonSize.includes(value) ? value : "medium";
10025
+ },
10026
+ renderHTML: (attributes) => {
10027
+ return {
10028
+ "data-size": attributes.size
10029
+ };
10030
+ }
10031
+ },
9979
10032
  showIfKey: {
9980
10033
  default: DEFAULT_SECTION_SHOW_IF_KEY,
9981
10034
  parseHTML: (element) => {
@@ -10018,7 +10071,10 @@ var ButtonExtension = Node9.create({
10018
10071
  setButton: () => ({ commands }) => {
10019
10072
  return commands.insertContent({
10020
10073
  type: this.name,
10021
- attrs: {},
10074
+ attrs: {
10075
+ buttonColor: DEFAULT_BUTTON_BACKGROUND_COLOR,
10076
+ textColor: DEFAULT_BUTTON_TEXT_COLOR
10077
+ },
10022
10078
  content: []
10023
10079
  });
10024
10080
  },
@@ -10190,18 +10246,18 @@ import { createLowlight, common } from "lowlight";
10190
10246
 
10191
10247
  // src/editor/nodes/html/html-view.tsx
10192
10248
  import { NodeViewContent, NodeViewWrapper as NodeViewWrapper6 } from "@tiptap/react";
10193
- import { jsx as jsx50 } from "react/jsx-runtime";
10249
+ import { jsx as jsx51 } from "react/jsx-runtime";
10194
10250
  function HTMLCodeBlockView(props) {
10195
10251
  const { node } = props;
10196
10252
  const { language } = node.attrs;
10197
10253
  const languageClass = language ? `language-${language}` : "";
10198
- return /* @__PURE__ */ jsx50(
10254
+ return /* @__PURE__ */ jsx51(
10199
10255
  NodeViewWrapper6,
10200
10256
  {
10201
10257
  draggable: false,
10202
10258
  "data-drag-handle": false,
10203
10259
  "data-type": "htmlCodeBlock",
10204
- children: /* @__PURE__ */ jsx50("pre", { className: "mly-html-code-pre", children: /* @__PURE__ */ jsx50(
10260
+ children: /* @__PURE__ */ jsx51("pre", { className: "mly-html-code-pre", children: /* @__PURE__ */ jsx51(
10205
10261
  NodeViewContent,
10206
10262
  {
10207
10263
  as: "code",
@@ -10351,7 +10407,7 @@ import { ReactNodeViewRenderer as ReactNodeViewRenderer6 } from "@tiptap/react";
10351
10407
  // src/editor/nodes/repeat/repeat-view.tsx
10352
10408
  import { NodeViewWrapper as NodeViewWrapper7, NodeViewContent as NodeViewContent2 } from "@tiptap/react";
10353
10409
  import { Repeat2 as Repeat22 } from "lucide-react";
10354
- import { jsx as jsx51, jsxs as jsxs27 } from "react/jsx-runtime";
10410
+ import { jsx as jsx52, jsxs as jsxs27 } from "react/jsx-runtime";
10355
10411
  function RepeatView(props) {
10356
10412
  const { editor, getPos } = props;
10357
10413
  return /* @__PURE__ */ jsxs27(
@@ -10362,7 +10418,7 @@ function RepeatView(props) {
10362
10418
  "data-drag-handle": editor.isEditable,
10363
10419
  className: "mly:relative",
10364
10420
  children: [
10365
- /* @__PURE__ */ jsx51(NodeViewContent2, { className: "is-editable" }),
10421
+ /* @__PURE__ */ jsx52(NodeViewContent2, { className: "is-editable" }),
10366
10422
  /* @__PURE__ */ jsxs27(
10367
10423
  "div",
10368
10424
  {
@@ -10374,8 +10430,8 @@ function RepeatView(props) {
10374
10430
  editor.commands.setNodeSelection(getPos());
10375
10431
  },
10376
10432
  children: [
10377
- /* @__PURE__ */ jsx51(Repeat22, { className: "mly:size-3 mly:stroke-[2.5] mly:text-midnight-gray" }),
10378
- /* @__PURE__ */ jsx51("div", { className: "mly:w-[1.5px] mly:grow mly:rounded-full mly:bg-rose-300" })
10433
+ /* @__PURE__ */ jsx52(Repeat22, { className: "mly:size-3 mly:stroke-[2.5] mly:text-midnight-gray" }),
10434
+ /* @__PURE__ */ jsx52("div", { className: "mly:w-[1.5px] mly:grow mly:rounded-full mly:bg-rose-300" })
10379
10435
  ]
10380
10436
  }
10381
10437
  )
@@ -10632,7 +10688,7 @@ import tippy2 from "tippy.js";
10632
10688
  // src/editor/extensions/slash-command/slash-command-item.tsx
10633
10689
  import { ChevronRightIcon } from "lucide-react";
10634
10690
  import { useCallback as useCallback9, useState as useState10, useRef as useRef10, useEffect as useEffect7 } from "react";
10635
- import { Fragment as Fragment7, jsx as jsx52, jsxs as jsxs28 } from "react/jsx-runtime";
10691
+ import { Fragment as Fragment7, jsx as jsx53, jsxs as jsxs28 } from "react/jsx-runtime";
10636
10692
  function SlashCommandItem(props) {
10637
10693
  var _a;
10638
10694
  const {
@@ -10656,12 +10712,12 @@ function SlashCommandItem(props) {
10656
10712
  const hasRenderFunction = typeof item.render === "function";
10657
10713
  const renderFunctionValue = hasRenderFunction ? (_a = item.render) == null ? void 0 : _a.call(item, editor) : null;
10658
10714
  let value = /* @__PURE__ */ jsxs28(Fragment7, { children: [
10659
- /* @__PURE__ */ jsx52("div", { className: "mly:flex mly:h-6 mly:w-6 mly:shrink-0 mly:items-center mly:justify-center", children: item.icon }),
10715
+ /* @__PURE__ */ jsx53("div", { className: "mly:flex mly:h-6 mly:w-6 mly:shrink-0 mly:items-center mly:justify-center", children: item.icon }),
10660
10716
  /* @__PURE__ */ jsxs28("div", { className: "mly:grow", children: [
10661
- /* @__PURE__ */ jsx52("p", { className: "mly:font-medium", children: item.title }),
10662
- /* @__PURE__ */ jsx52("p", { className: "mly:text-xs mly:text-gray-400", children: item.description })
10717
+ /* @__PURE__ */ jsx53("p", { className: "mly:font-medium", children: item.title }),
10718
+ /* @__PURE__ */ jsx53("p", { className: "mly:text-xs mly:text-gray-400", children: item.description })
10663
10719
  ] }),
10664
- isSubCommand2 && /* @__PURE__ */ jsx52("span", { className: "mly:block mly:px-1 mly:text-gray-400", children: /* @__PURE__ */ jsx52(ChevronRightIcon, { className: "mly:size-3.5 mly:stroke-[2.5]" }) })
10720
+ isSubCommand2 && /* @__PURE__ */ jsx53("span", { className: "mly:block mly:px-1 mly:text-gray-400", children: /* @__PURE__ */ jsx53(ChevronRightIcon, { className: "mly:size-3.5 mly:stroke-[2.5]" }) })
10665
10721
  ] });
10666
10722
  if (renderFunctionValue !== null && renderFunctionValue !== true) {
10667
10723
  value = renderFunctionValue;
@@ -10693,7 +10749,7 @@ function SlashCommandItem(props) {
10693
10749
  };
10694
10750
  }, []);
10695
10751
  return /* @__PURE__ */ jsxs28(Tooltip, { open, children: [
10696
- /* @__PURE__ */ jsx52(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx52(
10752
+ /* @__PURE__ */ jsx53(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx53(
10697
10753
  "button",
10698
10754
  {
10699
10755
  className: cn(
@@ -10708,14 +10764,14 @@ function SlashCommandItem(props) {
10708
10764
  children: value
10709
10765
  }
10710
10766
  ) }),
10711
- /* @__PURE__ */ jsx52(
10767
+ /* @__PURE__ */ jsx53(
10712
10768
  TooltipContent,
10713
10769
  {
10714
10770
  side: "right",
10715
10771
  sideOffset: 10,
10716
10772
  className: "mly:w-52 mly:rounded-lg mly:border-none mly:p-1 mly:shadow",
10717
10773
  children: typeof item.preview === "function" ? item == null ? void 0 : item.preview(editor) : /* @__PURE__ */ jsxs28(Fragment7, { children: [
10718
- /* @__PURE__ */ jsx52("figure", { className: "mly:relative mly:aspect-[2.5] mly:w-full mly:overflow-hidden mly:rounded-md mly:border mly:border-gray-200", children: /* @__PURE__ */ jsx52(
10774
+ /* @__PURE__ */ jsx53("figure", { className: "mly:relative mly:aspect-[2.5] mly:w-full mly:overflow-hidden mly:rounded-md mly:border mly:border-gray-200", children: /* @__PURE__ */ jsx53(
10719
10775
  "img",
10720
10776
  {
10721
10777
  src: item == null ? void 0 : item.preview,
@@ -10723,7 +10779,7 @@ function SlashCommandItem(props) {
10723
10779
  className: "mly:absolute mly:inset-0 mly:h-full mly:w-full mly:object-cover"
10724
10780
  }
10725
10781
  ) }),
10726
- /* @__PURE__ */ jsx52("p", { className: "mly:mt-2 mly:px-0.5 mly:text-gray-500", children: item.description })
10782
+ /* @__PURE__ */ jsx53("p", { className: "mly:mt-2 mly:px-0.5 mly:text-gray-500", children: item.description })
10727
10783
  ] })
10728
10784
  }
10729
10785
  )
@@ -10812,7 +10868,7 @@ function processCommand(options) {
10812
10868
  }
10813
10869
 
10814
10870
  // src/editor/extensions/slash-command/slash-command-view.tsx
10815
- import { jsx as jsx53, jsxs as jsxs29 } from "react/jsx-runtime";
10871
+ import { jsx as jsx54, jsxs as jsxs29 } from "react/jsx-runtime";
10816
10872
  var CommandList = forwardRef8((props, ref) => {
10817
10873
  const { items: groups, command, editor, range, query } = props;
10818
10874
  const [selectedGroupIndex, setSelectedGroupIndex] = useState11(0);
@@ -10950,15 +11006,15 @@ var CommandList = forwardRef8((props, ref) => {
10950
11006
  if (!groups || groups.length === 0) {
10951
11007
  return null;
10952
11008
  }
10953
- return /* @__PURE__ */ jsx53(TooltipProvider, { children: /* @__PURE__ */ jsxs29("div", { className: "mly:z-50 mly:w-72 mly:overflow-hidden mly:rounded-md mly:border mly:border-gray-200 mly:bg-white mly:shadow-md mly:transition-all", children: [
10954
- /* @__PURE__ */ jsx53(
11009
+ return /* @__PURE__ */ jsx54(TooltipProvider, { children: /* @__PURE__ */ jsxs29("div", { className: "mly:z-50 mly:w-72 mly:overflow-hidden mly:rounded-md mly:border mly:border-gray-200 mly:bg-white mly:shadow-md mly:transition-all", children: [
11010
+ /* @__PURE__ */ jsx54(
10955
11011
  "div",
10956
11012
  {
10957
11013
  id: "slash-command",
10958
11014
  ref: commandListContainer,
10959
11015
  className: "mly:no-scrollbar mly:h-auto mly:max-h-[330px] mly:overflow-y-auto",
10960
11016
  children: groups.map((group, groupIndex) => /* @__PURE__ */ jsxs29(Fragment8, { children: [
10961
- /* @__PURE__ */ jsx53(
11017
+ /* @__PURE__ */ jsx54(
10962
11018
  "span",
10963
11019
  {
10964
11020
  className: cn(
@@ -10968,9 +11024,9 @@ var CommandList = forwardRef8((props, ref) => {
10968
11024
  children: group.title
10969
11025
  }
10970
11026
  ),
10971
- /* @__PURE__ */ jsx53("div", { className: "mly:space-y-0.5 mly:p-1", children: group.commands.map((item, commandIndex) => {
11027
+ /* @__PURE__ */ jsx54("div", { className: "mly:space-y-0.5 mly:p-1", children: group.commands.map((item, commandIndex) => {
10972
11028
  const itemKey = `${groupIndex}-${commandIndex}`;
10973
- return /* @__PURE__ */ jsx53(
11029
+ return /* @__PURE__ */ jsx54(
10974
11030
  SlashCommandItem,
10975
11031
  {
10976
11032
  item,
@@ -10990,16 +11046,16 @@ var CommandList = forwardRef8((props, ref) => {
10990
11046
  ] }, groupIndex))
10991
11047
  }
10992
11048
  ),
10993
- /* @__PURE__ */ jsx53("div", { className: "mly:border-t mly:border-gray-200 mly:px-1 mly:py-3 mly:pl-4", children: /* @__PURE__ */ jsxs29("div", { className: "mly:flex mly:items-center", children: [
11049
+ /* @__PURE__ */ jsx54("div", { className: "mly:border-t mly:border-gray-200 mly:px-1 mly:py-3 mly:pl-4", children: /* @__PURE__ */ jsxs29("div", { className: "mly:flex mly:items-center", children: [
10994
11050
  /* @__PURE__ */ jsxs29("p", { className: "mly:text-center mly:text-xs mly:text-gray-400", children: [
10995
- /* @__PURE__ */ jsx53("kbd", { className: "mly:rounded mly:border mly:border-gray-200 mly:p-1 mly:px-2 mly:font-medium", children: "\u2191" }),
10996
- /* @__PURE__ */ jsx53("kbd", { className: "mly:ml-1 mly:rounded mly:border mly:border-gray-200 mly:p-1 mly:px-2 mly:font-medium", children: "\u2193" }),
11051
+ /* @__PURE__ */ jsx54("kbd", { className: "mly:rounded mly:border mly:border-gray-200 mly:p-1 mly:px-2 mly:font-medium", children: "\u2191" }),
11052
+ /* @__PURE__ */ jsx54("kbd", { className: "mly:ml-1 mly:rounded mly:border mly:border-gray-200 mly:p-1 mly:px-2 mly:font-medium", children: "\u2193" }),
10997
11053
  " ",
10998
11054
  "to navigate"
10999
11055
  ] }),
11000
- /* @__PURE__ */ jsx53("span", { "aria-hidden": "true", className: "mly:select-none mly:px-1", children: "\xB7" }),
11056
+ /* @__PURE__ */ jsx54("span", { "aria-hidden": "true", className: "mly:select-none mly:px-1", children: "\xB7" }),
11001
11057
  /* @__PURE__ */ jsxs29("p", { className: "mly:text-center mly:text-xs mly:text-gray-400", children: [
11002
- /* @__PURE__ */ jsx53("kbd", { className: "mly:rounded mly:border mly:border-gray-200 mly:p-1 mly:px-1.5 mly:font-medium", children: "Enter" }),
11058
+ /* @__PURE__ */ jsx54("kbd", { className: "mly:rounded mly:border mly:border-gray-200 mly:p-1 mly:px-1.5 mly:font-medium", children: "Enter" }),
11003
11059
  " ",
11004
11060
  "to select"
11005
11061
  ] })
@@ -11079,7 +11135,7 @@ function getSlashCommandSuggestions(groups = DEFAULT_SLASH_COMMANDS) {
11079
11135
  import { ReactRenderer as ReactRenderer2 } from "@tiptap/react";
11080
11136
  import { forwardRef as forwardRef9, useImperativeHandle as useImperativeHandle3, useRef as useRef12 } from "react";
11081
11137
  import tippy3 from "tippy.js";
11082
- import { jsx as jsx54 } from "react/jsx-runtime";
11138
+ import { jsx as jsx55 } from "react/jsx-runtime";
11083
11139
  var VariableList = forwardRef9((props, ref) => {
11084
11140
  var _a;
11085
11141
  const { items = [], editor } = props;
@@ -11108,7 +11164,7 @@ var VariableList = forwardRef9((props, ref) => {
11108
11164
  return false;
11109
11165
  }
11110
11166
  }));
11111
- return /* @__PURE__ */ jsx54(
11167
+ return /* @__PURE__ */ jsx55(
11112
11168
  VariableSuggestionPopoverComponent,
11113
11169
  {
11114
11170
  items,
@@ -11292,7 +11348,7 @@ var isCustomNodeSelected = (editor, node) => {
11292
11348
  };
11293
11349
 
11294
11350
  // src/editor/components/text-menu/text-bubble-menu.tsx
11295
- import { BubbleMenu as BubbleMenu7 } from "@tiptap/react";
11351
+ import { BubbleMenu as BubbleMenu8 } from "@tiptap/react";
11296
11352
 
11297
11353
  // src/editor/components/text-menu/text-bubble-content.tsx
11298
11354
  import {
@@ -11332,7 +11388,7 @@ var useTextMenuState = (editor) => {
11332
11388
  };
11333
11389
 
11334
11390
  // src/editor/components/text-menu/text-bubble-content.tsx
11335
- import { Fragment as Fragment9, jsx as jsx55, jsxs as jsxs30 } from "react/jsx-runtime";
11391
+ import { Fragment as Fragment9, jsx as jsx56, jsxs as jsxs30 } from "react/jsx-runtime";
11336
11392
  function TextBubbleContent(props) {
11337
11393
  var _a, _b, _c, _d;
11338
11394
  const { editor, showListMenu = true } = props;
@@ -11377,8 +11433,8 @@ function TextBubbleContent(props) {
11377
11433
  }
11378
11434
  ];
11379
11435
  return /* @__PURE__ */ jsxs30(Fragment9, { children: [
11380
- items.map((item, index) => /* @__PURE__ */ jsx55(BubbleMenuButton, __spreadValues({}, item), index)),
11381
- /* @__PURE__ */ jsx55(
11436
+ items.map((item, index) => /* @__PURE__ */ jsx56(BubbleMenuButton, __spreadValues({}, item), index)),
11437
+ /* @__PURE__ */ jsx56(
11382
11438
  AlignmentSwitch,
11383
11439
  {
11384
11440
  alignment: state.textAlign,
@@ -11388,7 +11444,7 @@ function TextBubbleContent(props) {
11388
11444
  }
11389
11445
  ),
11390
11446
  !state.isListActive && showListMenu && /* @__PURE__ */ jsxs30(Fragment9, { children: [
11391
- /* @__PURE__ */ jsx55(
11447
+ /* @__PURE__ */ jsx56(
11392
11448
  BubbleMenuButton,
11393
11449
  {
11394
11450
  icon: List2,
@@ -11398,7 +11454,7 @@ function TextBubbleContent(props) {
11398
11454
  tooltip: "Bullet List"
11399
11455
  }
11400
11456
  ),
11401
- /* @__PURE__ */ jsx55(
11457
+ /* @__PURE__ */ jsx56(
11402
11458
  BubbleMenuButton,
11403
11459
  {
11404
11460
  icon: ListOrdered2,
@@ -11409,7 +11465,7 @@ function TextBubbleContent(props) {
11409
11465
  }
11410
11466
  )
11411
11467
  ] }),
11412
- /* @__PURE__ */ jsx55(
11468
+ /* @__PURE__ */ jsx56(
11413
11469
  LinkInputPopover,
11414
11470
  {
11415
11471
  defaultValue: (_d = state == null ? void 0 : state.linkUrl) != null ? _d : "",
@@ -11425,8 +11481,8 @@ function TextBubbleContent(props) {
11425
11481
  isVariable: state.isUrlVariable
11426
11482
  }
11427
11483
  ),
11428
- /* @__PURE__ */ jsx55(Divider, {}),
11429
- /* @__PURE__ */ jsx55(
11484
+ /* @__PURE__ */ jsx56(Divider, {}),
11485
+ /* @__PURE__ */ jsx56(
11430
11486
  ColorPicker,
11431
11487
  {
11432
11488
  color: state.currentTextColor,
@@ -11435,16 +11491,16 @@ function TextBubbleContent(props) {
11435
11491
  },
11436
11492
  tooltip: "Text Color",
11437
11493
  suggestedColors,
11438
- children: /* @__PURE__ */ jsx55(
11494
+ children: /* @__PURE__ */ jsx56(
11439
11495
  BaseButton,
11440
11496
  {
11441
11497
  variant: "ghost",
11442
11498
  size: "sm",
11443
11499
  type: "button",
11444
- className: "mly:h-7 mly:w-7 mly:shrink-0 mly:p-0",
11500
+ className: "menu-option mly:h-7 mly:w-7 mly:shrink-0 mly:p-0",
11445
11501
  children: /* @__PURE__ */ jsxs30("div", { className: "mly:flex mly:flex-col mly:items-center mly:justify-center mly:gap-px", children: [
11446
- /* @__PURE__ */ jsx55("span", { className: "mly:font-bolder mly:font-mono mly:text-xs mly:text-slate-700", children: "A" }),
11447
- /* @__PURE__ */ jsx55(
11502
+ /* @__PURE__ */ jsx56("span", { className: "mly:font-bolder mly:font-mono mly:text-xs mly:text-slate-700", children: "A" }),
11503
+ /* @__PURE__ */ jsx56(
11448
11504
  "div",
11449
11505
  {
11450
11506
  className: "mly:h-[2px] mly:w-3",
@@ -11461,32 +11517,32 @@ function TextBubbleContent(props) {
11461
11517
 
11462
11518
  // src/editor/components/text-menu/turn-into-block.tsx
11463
11519
  import { ChevronDownIcon as ChevronDownIcon2, PilcrowIcon } from "lucide-react";
11464
- import { useMemo as useMemo11 } from "react";
11465
- import { jsx as jsx56, jsxs as jsxs31 } from "react/jsx-runtime";
11520
+ import { useMemo as useMemo12 } from "react";
11521
+ import { jsx as jsx57, jsxs as jsxs31 } from "react/jsx-runtime";
11466
11522
  var isOption = (option) => option.type === "option";
11467
11523
  var isCategory = (option) => option.type === "category";
11468
11524
  function TurnIntoBlock(props) {
11469
11525
  const { options } = props;
11470
- const activeItem = useMemo11(
11526
+ const activeItem = useMemo12(
11471
11527
  () => options.find((option) => option.type === "option" && option.isActive()),
11472
11528
  [options]
11473
11529
  );
11474
11530
  const { icon: ActiveIcon = PilcrowIcon } = activeItem || {};
11475
11531
  return /* @__PURE__ */ jsxs31(Popover, { children: [
11476
11532
  /* @__PURE__ */ jsxs31(Tooltip, { children: [
11477
- /* @__PURE__ */ jsx56(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxs31(
11533
+ /* @__PURE__ */ jsx57(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxs31(
11478
11534
  PopoverTrigger,
11479
11535
  {
11480
11536
  className: cn(
11481
- "mly:flex mly:aspect-square mly:h-7 mly:items-center mly:justify-center mly:gap-1 mly:rounded-md mly:px-1.5 mly:text-sm mly:data-[state=open]:bg-soft-gray mly:hover:bg-soft-gray mly:focus-visible:relative mly:focus-visible:z-10 mly:focus-visible:outline-hidden mly:focus-visible:ring-2 mly:focus-visible:ring-gray-400 mly:focus-visible:ring-offset-2"
11537
+ "menu-option mly:flex mly:aspect-square mly:h-7 mly:items-center mly:justify-center mly:gap-1 mly:rounded-md mly:px-1.5 mly:text-sm mly:data-[state=open]:bg-soft-gray mly:hover:bg-soft-gray mly:focus-visible:relative mly:focus-visible:z-10 mly:focus-visible:outline-hidden mly:focus-visible:ring-2 mly:focus-visible:ring-gray-400 mly:focus-visible:ring-offset-2"
11482
11538
  ),
11483
11539
  children: [
11484
- /* @__PURE__ */ jsx56(ActiveIcon, { className: "mly:h-3 mly:w-3 mly:shrink-0 mly:stroke-[2.5]" }),
11485
- /* @__PURE__ */ jsx56(ChevronDownIcon2, { className: "mly:h-3 mly:w-3 mly:shrink-0 mly:stroke-[2.5]" })
11540
+ /* @__PURE__ */ jsx57(ActiveIcon, { className: "mly:h-3 mly:w-3 mly:shrink-0 mly:stroke-[2.5]" }),
11541
+ /* @__PURE__ */ jsx57(ChevronDownIcon2, { className: "mly:h-3 mly:w-3 mly:shrink-0 mly:stroke-[2.5]" })
11486
11542
  ]
11487
11543
  }
11488
11544
  ) }),
11489
- /* @__PURE__ */ jsx56(
11545
+ /* @__PURE__ */ jsx57(
11490
11546
  TooltipContent,
11491
11547
  {
11492
11548
  sideOffset: 8,
@@ -11495,13 +11551,13 @@ function TurnIntoBlock(props) {
11495
11551
  }
11496
11552
  )
11497
11553
  ] }),
11498
- /* @__PURE__ */ jsx56(
11554
+ /* @__PURE__ */ jsx57(
11499
11555
  PopoverContent,
11500
11556
  {
11501
11557
  align: "start",
11502
11558
  side: "bottom",
11503
11559
  sideOffset: 8,
11504
- className: "mly:flex mly:w-[160px] mly:flex-col mly:rounded-md mly:p-1",
11560
+ className: "menu-dropdown-surface mly:flex mly:w-[160px] mly:flex-col mly:rounded-md mly:p-1",
11505
11561
  children: options.map((option, index) => {
11506
11562
  if (isOption(option)) {
11507
11563
  return /* @__PURE__ */ jsxs31(
@@ -11509,20 +11565,23 @@ function TurnIntoBlock(props) {
11509
11565
  {
11510
11566
  onClick: option.onClick,
11511
11567
  variant: "ghost",
11512
- className: "mly:mb-0.5 mly:h-auto mly:justify-start mly:gap-2 mly:rounded! mly:!px-2.5 mly:py-1 mly:!pl-3.5 mly:text-sm mly:font-normal mly:text-midnight-gray",
11568
+ className: cn(
11569
+ "menu-option menu-dropdown-option mly:mb-0.5 mly:h-auto mly:justify-start mly:gap-2 mly:rounded! mly:!px-2.5 mly:py-1 mly:!pl-3.5 mly:text-sm mly:font-normal mly:text-midnight-gray",
11570
+ option.isActive() && "menu-active-option"
11571
+ ),
11513
11572
  children: [
11514
- /* @__PURE__ */ jsx56(option.icon, { className: "mly:size-[15px] mly:shrink-0" }),
11573
+ /* @__PURE__ */ jsx57(option.icon, { className: "mly:size-[15px] mly:shrink-0" }),
11515
11574
  option.label
11516
11575
  ]
11517
11576
  },
11518
11577
  option.id
11519
11578
  );
11520
11579
  } else if (isCategory(option)) {
11521
- return /* @__PURE__ */ jsx56(
11580
+ return /* @__PURE__ */ jsx57(
11522
11581
  "label",
11523
11582
  {
11524
11583
  className: cn(
11525
- "mly:!px-2.5 mly:!pl-3.5 mly:text-xs mly:font-medium mly:text-midnight-gray/60",
11584
+ "menu-dropdown-category mly:!px-2.5 mly:!pl-3.5 mly:text-xs mly:font-medium mly:text-midnight-gray/60",
11526
11585
  index === 0 ? "mly:mb-2 mly:mt-1" : "mly:my-2"
11527
11586
  ),
11528
11587
  children: option.label
@@ -11619,7 +11678,7 @@ function useTurnIntoBlockOptions(editor) {
11619
11678
  }
11620
11679
 
11621
11680
  // src/editor/components/text-menu/text-bubble-menu.tsx
11622
- import { jsx as jsx57, jsxs as jsxs32 } from "react/jsx-runtime";
11681
+ import { jsx as jsx58, jsxs as jsxs32 } from "react/jsx-runtime";
11623
11682
  function TextBubbleMenu(props) {
11624
11683
  const { editor, appendTo } = props;
11625
11684
  if (!editor) {
@@ -11670,23 +11729,23 @@ function TextBubbleMenu(props) {
11670
11729
  }
11671
11730
  });
11672
11731
  const turnIntoBlockOptions = useTurnIntoBlockOptions(editor);
11673
- return /* @__PURE__ */ jsx57(
11674
- BubbleMenu7,
11732
+ return /* @__PURE__ */ jsx58(
11733
+ BubbleMenu8,
11675
11734
  __spreadProps(__spreadValues({}, bubbleMenuProps), {
11676
- className: "mly:flex mly:gap-0.5 mly:rounded-lg mly:border mly:border-gray-200 mly:bg-white mly:p-0.5 mly:shadow-md",
11735
+ className: "menu-surface mly:flex mly:gap-0.5 mly:rounded-lg mly:border mly:border-gray-200 mly:bg-white mly:p-0.5 mly:shadow-md",
11677
11736
  children: /* @__PURE__ */ jsxs32(TooltipProvider, { children: [
11678
- /* @__PURE__ */ jsx57(TurnIntoBlock, { options: turnIntoBlockOptions }),
11679
- /* @__PURE__ */ jsx57(Divider, { className: "mly:mx-0" }),
11680
- /* @__PURE__ */ jsx57(TextBubbleContent, { editor })
11737
+ /* @__PURE__ */ jsx58(TurnIntoBlock, { options: turnIntoBlockOptions }),
11738
+ /* @__PURE__ */ jsx58(Divider, { className: "mly:mx-0" }),
11739
+ /* @__PURE__ */ jsx58(TextBubbleContent, { editor })
11681
11740
  ] })
11682
11741
  })
11683
11742
  );
11684
11743
  }
11685
11744
 
11686
11745
  // src/editor/components/variable-menu/variable-bubble-menu.tsx
11687
- import { BubbleMenu as BubbleMenu8 } from "@tiptap/react";
11746
+ import { BubbleMenu as BubbleMenu9 } from "@tiptap/react";
11688
11747
  import { sticky as sticky6 } from "tippy.js";
11689
- import { jsx as jsx58 } from "react/jsx-runtime";
11748
+ import { jsx as jsx59 } from "react/jsx-runtime";
11690
11749
  function VariableBubbleMenu(props) {
11691
11750
  const { editor, appendTo } = props;
11692
11751
  if (!editor) {
@@ -11709,11 +11768,11 @@ function VariableBubbleMenu(props) {
11709
11768
  placement: "top-start"
11710
11769
  }
11711
11770
  });
11712
- return /* @__PURE__ */ jsx58(
11713
- BubbleMenu8,
11771
+ return /* @__PURE__ */ jsx59(
11772
+ BubbleMenu9,
11714
11773
  __spreadProps(__spreadValues({}, bubbleMenuProps), {
11715
11774
  className: "mly:flex mly:gap-0.5 mly:rounded-lg mly:border mly:border-slate-200 mly:bg-white mly:p-0.5 mly:shadow-md",
11716
- children: /* @__PURE__ */ jsx58(TooltipProvider, { children: /* @__PURE__ */ jsx58(TextBubbleContent, { showListMenu: false, editor }) })
11775
+ children: /* @__PURE__ */ jsx59(TooltipProvider, { children: /* @__PURE__ */ jsx59(TextBubbleContent, { showListMenu: false, editor }) })
11717
11776
  })
11718
11777
  );
11719
11778
  }
@@ -11799,7 +11858,7 @@ function replaceDeprecatedNode(json) {
11799
11858
  }
11800
11859
 
11801
11860
  // src/editor/index.tsx
11802
- import { jsx as jsx59, jsxs as jsxs33 } from "react/jsx-runtime";
11861
+ import { jsx as jsx60, jsxs as jsxs33 } from "react/jsx-runtime";
11803
11862
  function Editor12(props) {
11804
11863
  const {
11805
11864
  config: {
@@ -11823,7 +11882,7 @@ function Editor12(props) {
11823
11882
  scrollThreshold = 40,
11824
11883
  scrollMargin = 40
11825
11884
  } = props;
11826
- const formattedContent = useMemo12(() => {
11885
+ const formattedContent = useMemo13(() => {
11827
11886
  if (contentJson) {
11828
11887
  const json = (contentJson == null ? void 0 : contentJson.type) === "doc" ? contentJson : {
11829
11888
  type: "doc",
@@ -11872,7 +11931,7 @@ function Editor12(props) {
11872
11931
  if (!editor) {
11873
11932
  return null;
11874
11933
  }
11875
- return /* @__PURE__ */ jsx59(MailyProvider, { placeholderUrl, children: /* @__PURE__ */ jsxs33(
11934
+ return /* @__PURE__ */ jsx60(MailyProvider, { placeholderUrl, children: /* @__PURE__ */ jsxs33(
11876
11935
  "div",
11877
11936
  {
11878
11937
  id: "mly-editor",
@@ -11883,7 +11942,7 @@ function Editor12(props) {
11883
11942
  ),
11884
11943
  ref: menuContainerRef,
11885
11944
  children: [
11886
- hasMenuBar && /* @__PURE__ */ jsx59(EditorMenuBar, { config: props.config, editor }),
11945
+ hasMenuBar && /* @__PURE__ */ jsx60(EditorMenuBar, { config: props.config, editor }),
11887
11946
  /* @__PURE__ */ jsxs33(
11888
11947
  "div",
11889
11948
  {
@@ -11892,16 +11951,17 @@ function Editor12(props) {
11892
11951
  bodyClassName
11893
11952
  ),
11894
11953
  children: [
11895
- /* @__PURE__ */ jsx59(TextBubbleMenu, { editor, appendTo: menuContainerRef }),
11896
- /* @__PURE__ */ jsx59(ImageBubbleMenu, { editor, appendTo: menuContainerRef }),
11897
- /* @__PURE__ */ jsx59(SpacerBubbleMenu, { editor, appendTo: menuContainerRef }),
11898
- /* @__PURE__ */ jsx59(EditorContent, { editor }),
11899
- /* @__PURE__ */ jsx59(SectionBubbleMenu, { editor, appendTo: menuContainerRef }),
11900
- /* @__PURE__ */ jsx59(ColumnsBubbleMenu, { editor, appendTo: menuContainerRef }),
11901
- !hideContextMenu && /* @__PURE__ */ jsx59(ContentMenu, { editor }),
11902
- /* @__PURE__ */ jsx59(VariableBubbleMenu, { editor, appendTo: menuContainerRef }),
11903
- /* @__PURE__ */ jsx59(RepeatBubbleMenu, { editor, appendTo: menuContainerRef }),
11904
- /* @__PURE__ */ jsx59(InlineImageBubbleMenu, { editor, appendTo: menuContainerRef })
11954
+ /* @__PURE__ */ jsx60(TextBubbleMenu, { editor, appendTo: menuContainerRef }),
11955
+ /* @__PURE__ */ jsx60(ImageBubbleMenu, { editor, appendTo: menuContainerRef }),
11956
+ /* @__PURE__ */ jsx60(SpacerBubbleMenu, { editor, appendTo: menuContainerRef }),
11957
+ /* @__PURE__ */ jsx60(DividerBubbleMenu, { editor, appendTo: menuContainerRef }),
11958
+ /* @__PURE__ */ jsx60(EditorContent, { editor }),
11959
+ /* @__PURE__ */ jsx60(SectionBubbleMenu, { editor, appendTo: menuContainerRef }),
11960
+ /* @__PURE__ */ jsx60(ColumnsBubbleMenu, { editor, appendTo: menuContainerRef }),
11961
+ !hideContextMenu && /* @__PURE__ */ jsx60(ContentMenu, { editor }),
11962
+ /* @__PURE__ */ jsx60(VariableBubbleMenu, { editor, appendTo: menuContainerRef }),
11963
+ /* @__PURE__ */ jsx60(RepeatBubbleMenu, { editor, appendTo: menuContainerRef }),
11964
+ /* @__PURE__ */ jsx60(InlineImageBubbleMenu, { editor, appendTo: menuContainerRef })
11905
11965
  ]
11906
11966
  }
11907
11967
  )