@daisychainapp/maily-to-core 0.3.6 → 0.4.1

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.cjs CHANGED
@@ -80,13 +80,13 @@ var __async = (__this, __arguments, generator) => {
80
80
  // src/index.ts
81
81
  var src_exports = {};
82
82
  __export(src_exports, {
83
- Editor: () => Editor13
83
+ Editor: () => Editor12
84
84
  });
85
85
  module.exports = __toCommonJS(src_exports);
86
86
 
87
87
  // src/editor/index.tsx
88
- var import_react66 = require("@tiptap/react");
89
- var import_react67 = require("react");
88
+ var import_react62 = require("@tiptap/react");
89
+ var import_react63 = require("react");
90
90
 
91
91
  // src/editor/components/column-menu/columns-bubble-menu.tsx
92
92
  var import_react8 = require("@tiptap/react");
@@ -4079,16 +4079,16 @@ function Select(props) {
4079
4079
  placeholder
4080
4080
  } = props;
4081
4081
  const selectId = `mly${(0, import_react7.useId)()}`;
4082
- const content = /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "mly:relative", children: [
4082
+ const content = /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "mly:relative mly:inline-flex mly:h-7 mly:items-center mly:overflow-hidden", children: [
4083
4083
  /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("label", { htmlFor: selectId, className: "mly:sr-only", children: label }),
4084
- Icon && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "mly:pointer-events-none mly:absolute mly:inset-y-0 mly:left-2 mly:z-20 mly:flex mly:items-center", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Icon, { className: cn("mly:size-3", iconClassName) }) }),
4084
+ Icon && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("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__ */ (0, import_jsx_runtime10.jsx)(Icon, { className: cn("mly:size-3.5", iconClassName) }) }),
4085
4085
  /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
4086
4086
  "select",
4087
4087
  {
4088
4088
  id: selectId,
4089
4089
  className: cn(
4090
- "mly-select-padding mly:flex mly:min-h-7 mly:max-w-max mly:appearance-none mly:items-center mly:rounded-md mly:bg-white mly:text-sm 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",
4091
- !!Icon && "mly:pl-7",
4090
+ "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",
4091
+ !!Icon && "mly:pl-[25px]",
4092
4092
  className
4093
4093
  ),
4094
4094
  value: value || "",
@@ -4810,7 +4810,14 @@ function ContentMenu(props) {
4810
4810
  children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react7.Plus, { className: "mly:size-3.5 mly:shrink-0" })
4811
4811
  }
4812
4812
  ) }),
4813
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(TooltipContent, { sideOffset: 8, children: "Add new node" })
4813
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
4814
+ TooltipContent,
4815
+ {
4816
+ sideOffset: 8,
4817
+ className: "mly:border-gray-300 mly:bg-transparent mly:p-0 mly:text-gray-700 mly:shadow-sm",
4818
+ children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "mly:block mly:rounded-md mly:bg-soft-gray mly:!px-2 mly:!py-1.5", children: "Add new node" })
4819
+ }
4820
+ )
4814
4821
  ] }),
4815
4822
  /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(Popover, { open: menuOpen, onOpenChange: setMenuOpen, children: [
4816
4823
  /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "mly:relative mly:flex mly:flex-col", children: [
@@ -4830,7 +4837,14 @@ function ContentMenu(props) {
4830
4837
  children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react7.GripVertical, { className: "mly:size-3.5 mly:shrink-0" })
4831
4838
  }
4832
4839
  ) }),
4833
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(TooltipContent, { sideOffset: 8, children: "Node actions" })
4840
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
4841
+ TooltipContent,
4842
+ {
4843
+ sideOffset: 8,
4844
+ className: "mly:border-gray-300 mly:bg-transparent mly:p-0 mly:text-gray-700 mly:shadow-sm",
4845
+ children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "mly:block mly:rounded-md mly:bg-soft-gray mly:!px-2 mly:!py-1.5", children: "Node actions" })
4846
+ }
4847
+ )
4834
4848
  ] }),
4835
4849
  /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(PopoverTrigger, { className: "mly:absolute mly:left-0 mly:top-0 mly:z-0 mly:h-5 mly:w-5" })
4836
4850
  ] }),
@@ -4840,14 +4854,14 @@ function ContentMenu(props) {
4840
4854
  align: "start",
4841
4855
  side: "bottom",
4842
4856
  sideOffset: 8,
4843
- className: "mly:flex mly:w-max mly:flex-col mly:rounded-md mly:p-1",
4857
+ 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",
4844
4858
  children: [
4845
4859
  /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
4846
4860
  BaseButton,
4847
4861
  {
4848
4862
  variant: "ghost",
4849
4863
  onClick: duplicateNode,
4850
- className: "mly:h-auto mly:justify-start mly:gap-2 mly:rounded! mly:px-2 mly:py-1 mly:text-sm mly:font-normal",
4864
+ 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",
4851
4865
  children: [
4852
4866
  /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react7.Copy, { className: "mly:size-[15px] mly:shrink-0" }),
4853
4867
  "Duplicate"
@@ -4859,7 +4873,7 @@ function ContentMenu(props) {
4859
4873
  BaseButton,
4860
4874
  {
4861
4875
  onClick: deleteCurrentNode,
4862
- className: "mly:h-auto mly:justify-start mly:gap-2 mly:rounded! mly:bg-red-100 mly:px-2 mly:py-1 mly:text-sm mly:font-normal mly:text-red-600 mly:hover:bg-red-200 mly:focus:bg-red-200",
4876
+ 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",
4863
4877
  children: [
4864
4878
  /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react7.Trash2, { className: "mly:size-[15px] mly:shrink-0" }),
4865
4879
  "Delete"
@@ -4993,129 +5007,9 @@ var EditorMenuBar = (props) => {
4993
5007
  );
4994
5008
  };
4995
5009
 
4996
- // src/editor/components/html-menu/html-menu.tsx
4997
- var import_react14 = require("@tiptap/react");
4998
- var import_lucide_react9 = require("lucide-react");
4999
- var import_react15 = require("react");
5000
- var import_tippy3 = require("tippy.js");
5001
-
5002
- // src/editor/components/html-menu/use-html-state.ts
5003
- var import_react13 = require("@tiptap/react");
5004
- var import_fast_deep_equal2 = __toESM(require("fast-deep-equal"), 1);
5005
- var useHtmlState = (editor) => {
5006
- const states = (0, import_react13.useEditorState)({
5007
- editor,
5008
- selector: (ctx) => {
5009
- var _a, _b;
5010
- return {
5011
- activeTab: ((_a = ctx.editor.getAttributes("htmlCodeBlock")) == null ? void 0 : _a.activeTab) || "code",
5012
- currentShowIfKey: ((_b = ctx.editor.getAttributes("htmlCodeBlock")) == null ? void 0 : _b.showIfKey) || ""
5013
- };
5014
- },
5015
- equalityFn: import_fast_deep_equal2.default
5016
- });
5017
- return states;
5018
- };
5019
-
5020
- // src/editor/components/html-menu/html-menu.tsx
5021
- var import_jsx_runtime16 = require("react/jsx-runtime");
5022
- function HTMLBubbleMenu(props) {
5023
- const { appendTo, editor } = props;
5024
- if (!editor) {
5025
- return null;
5026
- }
5027
- const state = useHtmlState(editor);
5028
- const getReferenceClientRect = (0, import_react15.useCallback)(() => {
5029
- const renderContainer = getRenderContainer(editor, "htmlCodeBlock");
5030
- const rect = (renderContainer == null ? void 0 : renderContainer.getBoundingClientRect()) || new DOMRect(-1e3, -1e3, 0, 0);
5031
- return rect;
5032
- }, [editor]);
5033
- const bubbleMenuProps = __spreadProps(__spreadValues(__spreadValues({}, props), appendTo ? { appendTo: appendTo.current } : {}), {
5034
- shouldShow: ({ editor: editor2 }) => {
5035
- return editor2.isActive("htmlCodeBlock");
5036
- },
5037
- tippyOptions: {
5038
- offset: [0, 8],
5039
- popperOptions: {
5040
- modifiers: [{ name: "flip", enabled: false }]
5041
- },
5042
- getReferenceClientRect,
5043
- appendTo: () => appendTo == null ? void 0 : appendTo.current,
5044
- plugins: [import_tippy3.sticky],
5045
- sticky: "popper",
5046
- maxWidth: "auto"
5047
- },
5048
- pluginKey: "htmlCodeBlockBubbleMenu"
5049
- });
5050
- const { activeTab = "code" } = state;
5051
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
5052
- import_react14.BubbleMenu,
5053
- __spreadProps(__spreadValues({}, bubbleMenuProps), {
5054
- 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",
5055
- children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(TooltipProvider, { children: [
5056
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "mly:flex mly:items-center mly:h-7 mly:rounded-md mly:bg-soft-gray mly:px-0.5", children: [
5057
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(Tooltip, { children: [
5058
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
5059
- "button",
5060
- {
5061
- className: cn(
5062
- "mly:flex mly:size-6 mly:shrink-0 mly:items-center mly:justify-center mly:rounded 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",
5063
- activeTab === "code" && "mly:bg-white"
5064
- ),
5065
- disabled: activeTab === "code",
5066
- onClick: () => {
5067
- var _a;
5068
- (_a = editor == null ? void 0 : editor.commands) == null ? void 0 : _a.updateHtmlCodeBlock({
5069
- activeTab: "code"
5070
- });
5071
- },
5072
- children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react9.CodeXmlIcon, { className: "mly:size-3 mly:shrink-0 mly:stroke-[2.5]" })
5073
- }
5074
- ) }),
5075
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(TooltipContent, { sideOffset: 8, children: "HTML Code" })
5076
- ] }),
5077
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(Tooltip, { children: [
5078
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
5079
- "button",
5080
- {
5081
- className: cn(
5082
- "mly:flex mly:size-6 mly:shrink-0 mly:items-center mly:justify-center mly:rounded 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",
5083
- activeTab === "preview" && "mly:bg-white"
5084
- ),
5085
- disabled: activeTab === "preview",
5086
- onClick: () => {
5087
- var _a;
5088
- (_a = editor == null ? void 0 : editor.commands) == null ? void 0 : _a.updateHtmlCodeBlock({
5089
- activeTab: "preview"
5090
- });
5091
- },
5092
- children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react9.ViewIcon, { className: "mly:size-3 mly:shrink-0 mly:stroke-[2.5]" })
5093
- }
5094
- ) }),
5095
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(TooltipContent, { sideOffset: 8, children: "Preview" })
5096
- ] })
5097
- ] }),
5098
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Divider, {}),
5099
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
5100
- ShowPopover,
5101
- {
5102
- showIfKey: state.currentShowIfKey,
5103
- onShowIfKeyValueChange: (value) => {
5104
- editor.commands.updateHtmlCodeBlock({
5105
- showIfKey: value
5106
- });
5107
- },
5108
- editor
5109
- }
5110
- )
5111
- ] })
5112
- })
5113
- );
5114
- }
5115
-
5116
5010
  // src/editor/nodes/logo/logo.ts
5117
5011
  var import_extension_image = __toESM(require("@tiptap/extension-image"), 1);
5118
- var import_react23 = require("@tiptap/react");
5012
+ var import_react20 = require("@tiptap/react");
5119
5013
 
5120
5014
  // src/editor/nodes/section/section.ts
5121
5015
  var import_core5 = require("@tiptap/core");
@@ -5416,14 +5310,14 @@ var SectionExtension = import_core5.Node.create({
5416
5310
  });
5417
5311
 
5418
5312
  // src/editor/nodes/logo/logo-view.tsx
5419
- var import_react20 = require("@tiptap/react");
5420
- var import_react21 = require("react");
5421
- var import_react22 = require("react");
5313
+ var import_react17 = require("@tiptap/react");
5314
+ var import_react18 = require("react");
5315
+ var import_react19 = require("react");
5422
5316
 
5423
5317
  // src/editor/nodes/image/image-view.tsx
5424
- var import_react18 = require("react");
5425
- var import_react19 = require("@tiptap/react");
5426
- var import_lucide_react10 = require("lucide-react");
5318
+ var import_react15 = require("react");
5319
+ var import_react16 = require("@tiptap/react");
5320
+ var import_lucide_react9 = require("lucide-react");
5427
5321
 
5428
5322
  // src/editor/plugins/image-upload/image-upload-plugin.ts
5429
5323
  var import_state3 = require("@tiptap/pm/state");
@@ -5517,7 +5411,7 @@ function ImageUploadPlugin(options) {
5517
5411
 
5518
5412
  // src/editor/extensions/image-upload/image-upload.ts
5519
5413
  var import_core6 = require("@tiptap/core");
5520
- var import_react16 = require("react");
5414
+ var import_react13 = require("react");
5521
5415
  var ImageUploadExtension = import_core6.Extension.create({
5522
5416
  name: "imageUpload",
5523
5417
  addOptions() {
@@ -5552,7 +5446,7 @@ var ImageUploadExtension = import_core6.Extension.create({
5552
5446
  }
5553
5447
  });
5554
5448
  function useImageUploadOptions(editor) {
5555
- return (0, import_react16.useMemo)(() => {
5449
+ return (0, import_react13.useMemo)(() => {
5556
5450
  const node = editor.extensionManager.extensions.find(
5557
5451
  (extension) => extension.name === "imageUpload"
5558
5452
  );
@@ -5561,13 +5455,13 @@ function useImageUploadOptions(editor) {
5561
5455
  }
5562
5456
 
5563
5457
  // src/editor/utils/use-event.ts
5564
- var import_react17 = require("react");
5458
+ var import_react14 = require("react");
5565
5459
  var useEvent = (handler) => {
5566
- const handlerRef = (0, import_react17.useRef)(null);
5567
- (0, import_react17.useLayoutEffect)(() => {
5460
+ const handlerRef = (0, import_react14.useRef)(null);
5461
+ (0, import_react14.useLayoutEffect)(() => {
5568
5462
  handlerRef.current = handler;
5569
5463
  }, [handler]);
5570
- return (0, import_react17.useCallback)((...args) => {
5464
+ return (0, import_react14.useCallback)((...args) => {
5571
5465
  if (handlerRef.current === null) {
5572
5466
  throw new Error("Handler is not assigned");
5573
5467
  }
@@ -5590,19 +5484,19 @@ function getNewWidth(height, aspectRatio) {
5590
5484
  }
5591
5485
 
5592
5486
  // src/editor/nodes/image/image-view.tsx
5593
- var import_jsx_runtime17 = require("react/jsx-runtime");
5487
+ var import_jsx_runtime16 = require("react/jsx-runtime");
5594
5488
  var MIN_WIDTH = 20;
5595
5489
  var IMAGE_MAX_WIDTH = 600;
5596
5490
  var IMAGE_MAX_HEIGHT = 400;
5597
5491
  function ImageView(props) {
5598
5492
  const { node, updateAttributes: updateAttributes2, selected, editor } = props;
5599
- const [status, setStatus] = (0, import_react18.useState)("idle");
5600
- const [isPlaceholderImage, setIsPlaceholderImage] = (0, import_react18.useState)(false);
5493
+ const [status, setStatus] = (0, import_react15.useState)("idle");
5494
+ const [isPlaceholderImage, setIsPlaceholderImage] = (0, import_react15.useState)(false);
5601
5495
  const { onImageUpload, allowedMimeTypes = [] } = useImageUploadOptions(editor);
5602
- const wrapperRef = (0, import_react18.useRef)(null);
5603
- const imgRef = (0, import_react18.useRef)(null);
5604
- const [resizingStyle, setResizingStyle] = (0, import_react18.useState)();
5605
- const [isDraggingOver, setIsDraggingOver] = (0, import_react18.useState)(false);
5496
+ const wrapperRef = (0, import_react15.useRef)(null);
5497
+ const imgRef = (0, import_react15.useRef)(null);
5498
+ const [resizingStyle, setResizingStyle] = (0, import_react15.useState)();
5499
+ const [isDraggingOver, setIsDraggingOver] = (0, import_react15.useState)(false);
5606
5500
  const handleMouseDown = useEvent(
5607
5501
  (event) => {
5608
5502
  const imageParent = document.querySelector(
@@ -5659,12 +5553,12 @@ function ImageView(props) {
5659
5553
  window.addEventListener("mouseup", removeListeners);
5660
5554
  }
5661
5555
  );
5662
- const dragCornerButton = (0, import_react18.useCallback)(
5556
+ const dragCornerButton = (0, import_react15.useCallback)(
5663
5557
  (direction) => {
5664
5558
  if (isPlaceholderImage) {
5665
5559
  return null;
5666
5560
  }
5667
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
5561
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
5668
5562
  "div",
5669
5563
  {
5670
5564
  role: "button",
@@ -5717,7 +5611,7 @@ function ImageView(props) {
5717
5611
  const file = e.target.files[0];
5718
5612
  yield handleImageUpload(file);
5719
5613
  });
5720
- const handleImageUpload = (0, import_react18.useCallback)(
5614
+ const handleImageUpload = (0, import_react15.useCallback)(
5721
5615
  (file) => __async(this, null, function* () {
5722
5616
  if (!isDroppable) {
5723
5617
  return;
@@ -5735,7 +5629,7 @@ function ImageView(props) {
5735
5629
  }),
5736
5630
  [onImageUpload, updateAttributes2]
5737
5631
  );
5738
- (0, import_react18.useEffect)(() => {
5632
+ (0, import_react15.useEffect)(() => {
5739
5633
  var _a2, _b, _c, _d;
5740
5634
  if (!src || isSrcVariable) {
5741
5635
  return;
@@ -5773,7 +5667,7 @@ function ImageView(props) {
5773
5667
  img.onerror = null;
5774
5668
  };
5775
5669
  }, [src]);
5776
- const handleDragOver = (0, import_react18.useCallback)(
5670
+ const handleDragOver = (0, import_react15.useCallback)(
5777
5671
  (e) => {
5778
5672
  if (!isDroppable) {
5779
5673
  return;
@@ -5784,7 +5678,7 @@ function ImageView(props) {
5784
5678
  },
5785
5679
  [onImageUpload]
5786
5680
  );
5787
- const handleDragLeave = (0, import_react18.useCallback)(
5681
+ const handleDragLeave = (0, import_react15.useCallback)(
5788
5682
  (e) => {
5789
5683
  if (!isDroppable) {
5790
5684
  return;
@@ -5795,7 +5689,7 @@ function ImageView(props) {
5795
5689
  },
5796
5690
  [onImageUpload]
5797
5691
  );
5798
- const handleDrop = (0, import_react18.useCallback)(
5692
+ const handleDrop = (0, import_react15.useCallback)(
5799
5693
  (e) => __async(this, null, function* () {
5800
5694
  var _a2;
5801
5695
  if (!isDroppable) {
@@ -5816,21 +5710,25 @@ function ImageView(props) {
5816
5710
  }),
5817
5711
  [handleImageUpload]
5818
5712
  );
5819
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
5820
- import_react19.NodeViewWrapper,
5713
+ const widthValue = width && width !== "auto" ? `${width}px` : void 0;
5714
+ const heightValue = height && height !== "auto" ? `${height}px` : void 0;
5715
+ const hasExplicitWidth = Boolean(widthValue || (resizingStyle == null ? void 0 : resizingStyle.width));
5716
+ const hasExplicitHeight = Boolean(heightValue || (resizingStyle == null ? void 0 : resizingStyle.height));
5717
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
5718
+ import_react16.NodeViewWrapper,
5821
5719
  __spreadProps(__spreadValues({
5822
5720
  as: "div",
5823
5721
  draggable: editor.isEditable,
5824
5722
  "data-drag-handle": editor.isEditable,
5825
5723
  className: cn("mly-image-drop-zone", isDraggingOver && "mly-drag-over"),
5826
5724
  style: __spreadValues(__spreadProps(__spreadValues({}, hasImageSrc && status === "loaded" ? __spreadValues({
5827
- width: width ? `${width}px` : void 0,
5828
- height: height ? `${height}px` : void 0
5725
+ width: widthValue,
5726
+ height: heightValue
5829
5727
  }, resizingStyle) : {}), {
5830
5728
  overflow: "hidden",
5831
5729
  position: "relative",
5832
5730
  // Weird! Basically tiptap/prose wraps this in a span and the line height causes an annoying buffer.
5833
- lineHeight: "0px",
5731
+ lineHeight: "normal",
5834
5732
  display: "block",
5835
5733
  maxWidth: "100%"
5836
5734
  }), {
@@ -5845,7 +5743,7 @@ function ImageView(props) {
5845
5743
  onDrop: handleDrop
5846
5744
  } : {}), {
5847
5745
  children: [
5848
- !hasImageSrc && status === "idle" && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
5746
+ !hasImageSrc && status === "idle" && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
5849
5747
  ImageStatusLabel,
5850
5748
  {
5851
5749
  status: "idle",
@@ -5853,32 +5751,34 @@ function ImageView(props) {
5853
5751
  isDropZone: isDroppable
5854
5752
  }
5855
5753
  ),
5856
- !hasImageSrc && status === "loading" && !isSrcVariable && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ImageStatusLabel, { status: "loading", minHeight: height }),
5857
- hasImageSrc && isSrcVariable && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ImageStatusLabel, { status: "variable", minHeight: height }),
5858
- hasImageSrc && status === "loading" && !isSrcVariable && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ImageStatusLabel, { status: "loading", minHeight: height }),
5859
- hasImageSrc && status === "error" && !isSrcVariable && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ImageStatusLabel, { status: "error", minHeight: height }),
5860
- isDroppable && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
5754
+ !hasImageSrc && status === "loading" && !isSrcVariable && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ImageStatusLabel, { status: "loading", minHeight: height }),
5755
+ hasImageSrc && isSrcVariable && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ImageStatusLabel, { status: "variable", minHeight: height }),
5756
+ hasImageSrc && status === "loading" && !isSrcVariable && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ImageStatusLabel, { status: "loading", minHeight: height }),
5757
+ hasImageSrc && status === "error" && !isSrcVariable && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ImageStatusLabel, { status: "error", minHeight: height }),
5758
+ isDroppable && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
5861
5759
  "input",
5862
5760
  {
5863
5761
  type: "file",
5864
5762
  accept: "image/*",
5865
5763
  onChange: handleFileChange,
5866
- className: "mly:absolute mly:inset-0 mly:opacity-0",
5764
+ className: "mly:absolute mly:inset-0 mly:z-10 mly:h-full mly:w-full mly:cursor-pointer mly:appearance-none mly:bg-transparent mly:opacity-0 mly:text-transparent",
5867
5765
  multiple: false
5868
5766
  }
5869
5767
  ),
5870
- hasImageSrc && status === "loaded" && !isSrcVariable && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
5871
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
5768
+ hasImageSrc && status === "loaded" && !isSrcVariable && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
5769
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
5872
5770
  "img",
5873
5771
  __spreadProps(__spreadValues({}, attrs), {
5874
5772
  ref: imgRef,
5875
5773
  style: __spreadProps(__spreadValues({}, resizingStyle), {
5876
5774
  cursor: "default",
5877
- objectFit: "fill",
5775
+ objectFit: "contain",
5878
5776
  marginBottom: 0,
5879
5777
  borderRadius: borderRadius2,
5880
- width: (resizingStyle == null ? void 0 : resizingStyle.width) ? `${resizingStyle.width}px` : width ? `${width}px` : "auto",
5881
- height: (resizingStyle == null ? void 0 : resizingStyle.height) ? `${resizingStyle.height}px` : height ? `${height}px` : "auto"
5778
+ width: (resizingStyle == null ? void 0 : resizingStyle.width) ? `${resizingStyle.width}px` : widthValue != null ? widthValue : "100%",
5779
+ height: (resizingStyle == null ? void 0 : resizingStyle.height) ? `${resizingStyle.height}px` : heightValue != null ? heightValue : "auto",
5780
+ maxWidth: hasExplicitWidth ? void 0 : "100%",
5781
+ maxHeight: hasExplicitHeight ? void 0 : "none"
5882
5782
  }),
5883
5783
  draggable: editor.isEditable,
5884
5784
  className: cn(
@@ -5886,13 +5786,13 @@ function ImageView(props) {
5886
5786
  )
5887
5787
  })
5888
5788
  ),
5889
- selected && editor.isEditable && !isPlaceholderImage && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
5789
+ selected && editor.isEditable && !isPlaceholderImage && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
5890
5790
  [
5891
5791
  { left: 0, top: 0, height: "100%", width: "1px" },
5892
5792
  { right: 0, top: 0, height: "100%", width: "1px" },
5893
5793
  { top: 0, left: 0, width: "100%", height: "1px" },
5894
5794
  { bottom: 0, left: 0, width: "100%", height: "1px" }
5895
- ].map((style, i) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
5795
+ ].map((style, i) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
5896
5796
  "div",
5897
5797
  {
5898
5798
  className: "mly:bg-rose-500",
@@ -5914,7 +5814,9 @@ function ImageView(props) {
5914
5814
  }
5915
5815
  function ImageStatusLabel(props) {
5916
5816
  const _a = props, { status, minHeight, className, style, isDropZone } = _a, rest = __objRest(_a, ["status", "minHeight", "className", "style", "isDropZone"]);
5917
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
5817
+ const resolvedMinHeight = minHeight != null ? minHeight : isDropZone ? 36 : void 0;
5818
+ const resolvedPaddingY = isDropZone ? 8 : void 0;
5819
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
5918
5820
  "div",
5919
5821
  __spreadProps(__spreadValues({}, rest), {
5920
5822
  className: cn(
@@ -5925,29 +5827,32 @@ function ImageStatusLabel(props) {
5925
5827
  },
5926
5828
  className
5927
5829
  ),
5928
- style: __spreadValues(__spreadValues({}, minHeight ? {
5929
- minHeight
5830
+ style: __spreadValues(__spreadValues(__spreadValues({}, resolvedMinHeight ? {
5831
+ minHeight: resolvedMinHeight
5832
+ } : {}), resolvedPaddingY ? {
5833
+ paddingTop: resolvedPaddingY,
5834
+ paddingBottom: resolvedPaddingY
5930
5835
  } : {}), style),
5931
5836
  children: [
5932
- status === "idle" && !isDropZone && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
5933
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react10.ImageOffIcon, { className: "mly:size-4 mly:stroke-[2.5]" }),
5934
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: "No image selected" })
5837
+ status === "idle" && !isDropZone && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
5838
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react9.ImageOffIcon, { className: "mly:size-4 mly:stroke-[2.5]" }),
5839
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { children: "No image selected" })
5935
5840
  ] }),
5936
- status === "idle" && isDropZone && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
5937
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react10.GrabIcon, { className: "mly:size-4 mly:stroke-[2.5]" }),
5938
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: "Click or Drop image here" })
5841
+ status === "idle" && isDropZone && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
5842
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react9.GrabIcon, { className: "mly:size-4 mly:stroke-[2.5]" }),
5843
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { children: "Click or Drop image here" })
5939
5844
  ] }),
5940
- status === "loading" && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
5941
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react10.Loader2, { className: "mly:size-4 mly:animate-spin mly:stroke-[2.5]" }),
5942
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: "Loading image..." })
5845
+ status === "loading" && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
5846
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react9.Loader2, { className: "mly:size-4 mly:animate-spin mly:stroke-[2.5]" }),
5847
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { children: "Loading image..." })
5943
5848
  ] }),
5944
- status === "error" && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
5945
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react10.Ban, { className: "mly:size-4 mly:stroke-[2.5]" }),
5946
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: "Error loading image" })
5849
+ status === "error" && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
5850
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react9.Ban, { className: "mly:size-4 mly:stroke-[2.5]" }),
5851
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { children: "Error loading image" })
5947
5852
  ] }),
5948
- status === "variable" && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
5949
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react10.BracesIcon, { className: "mly:size-4 mly:stroke-[2.5]" }),
5950
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: "Variable Image URL" })
5853
+ status === "variable" && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
5854
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react9.BracesIcon, { className: "mly:size-4 mly:stroke-[2.5]" }),
5855
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { children: "Variable Image URL" })
5951
5856
  ] })
5952
5857
  ]
5953
5858
  })
@@ -5955,12 +5860,12 @@ function ImageStatusLabel(props) {
5955
5860
  }
5956
5861
 
5957
5862
  // src/editor/nodes/logo/logo-view.tsx
5958
- var import_jsx_runtime18 = require("react/jsx-runtime");
5863
+ var import_jsx_runtime17 = require("react/jsx-runtime");
5959
5864
  function LogoView(props) {
5960
5865
  const { node, editor, updateAttributes: updateAttributes2 } = props;
5961
- const [status, setStatus] = (0, import_react22.useState)("idle");
5962
- const [isPlaceholderImage, setIsPlaceholderImage] = (0, import_react22.useState)(false);
5963
- const [isDraggingOver, setIsDraggingOver] = (0, import_react22.useState)(false);
5866
+ const [status, setStatus] = (0, import_react19.useState)("idle");
5867
+ const [isPlaceholderImage, setIsPlaceholderImage] = (0, import_react19.useState)(false);
5868
+ const [isDraggingOver, setIsDraggingOver] = (0, import_react19.useState)(false);
5964
5869
  const { onImageUpload, allowedMimeTypes = [] } = useImageUploadOptions(editor);
5965
5870
  let {
5966
5871
  alignment = "center",
@@ -5977,7 +5882,7 @@ function LogoView(props) {
5977
5882
  const file = e.target.files[0];
5978
5883
  yield handleImageUpload(file);
5979
5884
  });
5980
- const handleImageUpload = (0, import_react21.useCallback)(
5885
+ const handleImageUpload = (0, import_react18.useCallback)(
5981
5886
  (file) => __async(this, null, function* () {
5982
5887
  if (!isDroppable) {
5983
5888
  return;
@@ -5995,7 +5900,7 @@ function LogoView(props) {
5995
5900
  }),
5996
5901
  [onImageUpload, updateAttributes2]
5997
5902
  );
5998
- const handleDragOver = (0, import_react21.useCallback)(
5903
+ const handleDragOver = (0, import_react18.useCallback)(
5999
5904
  (e) => {
6000
5905
  if (!isDroppable) {
6001
5906
  return;
@@ -6006,7 +5911,7 @@ function LogoView(props) {
6006
5911
  },
6007
5912
  [onImageUpload]
6008
5913
  );
6009
- const handleDragLeave = (0, import_react21.useCallback)(
5914
+ const handleDragLeave = (0, import_react18.useCallback)(
6010
5915
  (e) => {
6011
5916
  if (!isDroppable) {
6012
5917
  return;
@@ -6017,7 +5922,7 @@ function LogoView(props) {
6017
5922
  },
6018
5923
  [onImageUpload]
6019
5924
  );
6020
- const handleDrop = (0, import_react21.useCallback)(
5925
+ const handleDrop = (0, import_react18.useCallback)(
6021
5926
  (e) => __async(this, null, function* () {
6022
5927
  var _a;
6023
5928
  if (!isDroppable) {
@@ -6038,7 +5943,7 @@ function LogoView(props) {
6038
5943
  }),
6039
5944
  [handleImageUpload]
6040
5945
  );
6041
- (0, import_react21.useEffect)(() => {
5946
+ (0, import_react18.useEffect)(() => {
6042
5947
  var _a, _b, _c, _d;
6043
5948
  if (!logoSrc) {
6044
5949
  return;
@@ -6061,8 +5966,8 @@ function LogoView(props) {
6061
5966
  };
6062
5967
  }, [logoSrc]);
6063
5968
  const logoSize = logoSizes[size];
6064
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
6065
- import_react20.NodeViewWrapper,
5969
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
5970
+ import_react17.NodeViewWrapper,
6066
5971
  __spreadProps(__spreadValues({
6067
5972
  as: "div",
6068
5973
  draggable: editor.isEditable,
@@ -6081,7 +5986,7 @@ function LogoView(props) {
6081
5986
  onDrop: handleDrop
6082
5987
  } : {}), {
6083
5988
  children: [
6084
- !hasImageSrc && status === "idle" && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
5989
+ !hasImageSrc && status === "idle" && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
6085
5990
  ImageStatusLabel,
6086
5991
  {
6087
5992
  status: "idle",
@@ -6089,11 +5994,11 @@ function LogoView(props) {
6089
5994
  isDropZone: isDroppable
6090
5995
  }
6091
5996
  ),
6092
- !hasImageSrc && status === "loading" && !isSrcVariable && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ImageStatusLabel, { status: "loading", minHeight: logoSize }),
6093
- hasImageSrc && isSrcVariable && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ImageStatusLabel, { status: "variable", minHeight: logoSize }),
6094
- hasImageSrc && status === "loading" && !isSrcVariable && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ImageStatusLabel, { status: "loading", minHeight: logoSize }),
6095
- hasImageSrc && status === "error" && !isSrcVariable && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ImageStatusLabel, { status: "error", minHeight: logoSize }),
6096
- isDroppable && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
5997
+ !hasImageSrc && status === "loading" && !isSrcVariable && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ImageStatusLabel, { status: "loading", minHeight: logoSize }),
5998
+ hasImageSrc && isSrcVariable && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ImageStatusLabel, { status: "variable", minHeight: logoSize }),
5999
+ hasImageSrc && status === "loading" && !isSrcVariable && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ImageStatusLabel, { status: "loading", minHeight: logoSize }),
6000
+ hasImageSrc && status === "error" && !isSrcVariable && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ImageStatusLabel, { status: "error", minHeight: logoSize }),
6001
+ isDroppable && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
6097
6002
  "input",
6098
6003
  {
6099
6004
  type: "file",
@@ -6103,7 +6008,7 @@ function LogoView(props) {
6103
6008
  multiple: false
6104
6009
  }
6105
6010
  ),
6106
- hasImageSrc && status === "loaded" && !isSrcVariable && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
6011
+ hasImageSrc && status === "loaded" && !isSrcVariable && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
6107
6012
  "img",
6108
6013
  {
6109
6014
  src: logoSrc,
@@ -6223,7 +6128,7 @@ var LogoExtension = import_extension_image.default.extend({
6223
6128
  ];
6224
6129
  },
6225
6130
  addNodeView() {
6226
- return (0, import_react23.ReactNodeViewRenderer)(LogoView, {
6131
+ return (0, import_react20.ReactNodeViewRenderer)(LogoView, {
6227
6132
  className: "mly:relative"
6228
6133
  });
6229
6134
  }
@@ -6254,13 +6159,13 @@ var borderRadius = [
6254
6159
  ];
6255
6160
 
6256
6161
  // src/editor/components/image-menu/image-bubble-menu.tsx
6257
- var import_react32 = require("@tiptap/react");
6258
- var import_lucide_react23 = require("lucide-react");
6259
- var import_tippy4 = require("tippy.js");
6162
+ var import_react29 = require("@tiptap/react");
6163
+ var import_lucide_react22 = require("lucide-react");
6164
+ var import_tippy3 = require("tippy.js");
6260
6165
 
6261
6166
  // src/editor/components/alignment-switch.tsx
6262
- var import_lucide_react11 = require("lucide-react");
6263
- var import_jsx_runtime19 = require("react/jsx-runtime");
6167
+ var import_lucide_react10 = require("lucide-react");
6168
+ var import_jsx_runtime18 = require("react/jsx-runtime");
6264
6169
  function AlignmentSwitch(props) {
6265
6170
  const { alignment: rawAlignment, onAlignmentChange } = props;
6266
6171
  const alignment = allowedLogoAlignment.includes(
@@ -6268,21 +6173,21 @@ function AlignmentSwitch(props) {
6268
6173
  ) ? rawAlignment : "left";
6269
6174
  const alignments = {
6270
6175
  left: {
6271
- icon: import_lucide_react11.AlignLeft,
6176
+ icon: import_lucide_react10.AlignLeft,
6272
6177
  tooltip: "Align Left",
6273
6178
  onClick: () => {
6274
6179
  onAlignmentChange("left");
6275
6180
  }
6276
6181
  },
6277
6182
  center: {
6278
- icon: import_lucide_react11.AlignCenter,
6183
+ icon: import_lucide_react10.AlignCenter,
6279
6184
  tooltip: "Align Center",
6280
6185
  onClick: () => {
6281
6186
  onAlignmentChange("center");
6282
6187
  }
6283
6188
  },
6284
6189
  right: {
6285
- icon: import_lucide_react11.AlignRight,
6190
+ icon: import_lucide_react10.AlignRight,
6286
6191
  tooltip: "Align Right",
6287
6192
  onClick: () => {
6288
6193
  onAlignmentChange("right");
@@ -6290,20 +6195,20 @@ function AlignmentSwitch(props) {
6290
6195
  }
6291
6196
  };
6292
6197
  const activeAlignment = alignments[alignment];
6293
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Popover, { children: [
6294
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Tooltip, { children: [
6295
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
6198
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Popover, { children: [
6199
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Tooltip, { children: [
6200
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
6296
6201
  PopoverTrigger,
6297
6202
  {
6298
6203
  className: cn(
6299
6204
  "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"
6300
6205
  ),
6301
- children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(activeAlignment.icon, { className: "mly:h-3 mly:w-3 mly:stroke-[2.5]" })
6206
+ children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(activeAlignment.icon, { className: "mly:h-3 mly:w-3 mly:stroke-[2.5]" })
6302
6207
  }
6303
6208
  ) }),
6304
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(TooltipContent, { sideOffset: 8, children: "Alignment" })
6209
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(TooltipContent, { sideOffset: 8, children: "Alignment" })
6305
6210
  ] }),
6306
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
6211
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
6307
6212
  PopoverContent,
6308
6213
  {
6309
6214
  className: "mly:flex mly:w-max mly:gap-0.5 mly:rounded-lg mly:p-0.5!",
@@ -6317,7 +6222,7 @@ function AlignmentSwitch(props) {
6317
6222
  e.preventDefault();
6318
6223
  },
6319
6224
  children: Object.entries(alignments).map(([key, value]) => {
6320
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
6225
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
6321
6226
  BubbleMenuButton,
6322
6227
  {
6323
6228
  icon: value.icon,
@@ -6334,23 +6239,23 @@ function AlignmentSwitch(props) {
6334
6239
  }
6335
6240
 
6336
6241
  // src/editor/components/ui/link-input-popover.tsx
6337
- var import_lucide_react22 = require("lucide-react");
6338
- var import_react29 = require("react");
6242
+ var import_lucide_react21 = require("lucide-react");
6243
+ var import_react26 = require("react");
6339
6244
 
6340
6245
  // src/editor/provider.tsx
6341
- var import_react24 = require("react");
6246
+ var import_react21 = require("react");
6342
6247
 
6343
6248
  // src/editor/extensions/slash-command/default-slash-commands.tsx
6344
- var import_lucide_react19 = require("lucide-react");
6249
+ var import_lucide_react18 = require("lucide-react");
6345
6250
 
6346
6251
  // src/blocks/button.tsx
6347
- var import_lucide_react12 = require("lucide-react");
6348
- var import_jsx_runtime20 = require("react/jsx-runtime");
6252
+ var import_lucide_react11 = require("lucide-react");
6253
+ var import_jsx_runtime19 = require("react/jsx-runtime");
6349
6254
  var button = {
6350
6255
  title: "Button",
6351
6256
  description: "Add a call to action button to email.",
6352
6257
  searchTerms: ["link", "button", "cta"],
6353
- icon: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react12.MousePointer, { className: "mly:h-4 mly:w-4" }),
6258
+ icon: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react11.MousePointer, { className: "mly:h-4 mly:w-4" }),
6354
6259
  command: ({ editor, range }) => {
6355
6260
  editor.chain().focus().deleteRange(range).setButton().run();
6356
6261
  }
@@ -6359,7 +6264,7 @@ var linkCard = {
6359
6264
  title: "Link Card",
6360
6265
  description: "Add a link card to email.",
6361
6266
  searchTerms: ["link", "button", "image"],
6362
- icon: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react12.ArrowUpRightSquare, { className: "mly:h-4 mly:w-4" }),
6267
+ icon: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react11.ArrowUpRightSquare, { className: "mly:h-4 mly:w-4" }),
6363
6268
  command: ({ editor, range }) => {
6364
6269
  editor.chain().focus().deleteRange(range).setLinkCard().run();
6365
6270
  },
@@ -6371,13 +6276,13 @@ var linkCard = {
6371
6276
  };
6372
6277
 
6373
6278
  // src/blocks/code.tsx
6374
- var import_lucide_react13 = require("lucide-react");
6375
- var import_jsx_runtime21 = require("react/jsx-runtime");
6279
+ var import_lucide_react12 = require("lucide-react");
6280
+ var import_jsx_runtime20 = require("react/jsx-runtime");
6376
6281
  var htmlCodeBlock = {
6377
6282
  title: "Custom HTML",
6378
6283
  description: "Insert a custom HTML block",
6379
6284
  searchTerms: ["html", "code", "custom"],
6380
- icon: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react13.CodeXmlIcon, { className: "mly:h-4 mly:w-4" }),
6285
+ icon: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react12.CodeXmlIcon, { className: "mly:h-4 mly:w-4" }),
6381
6286
  command: ({ editor, range }) => {
6382
6287
  editor.chain().focus().deleteRange(range).setHtmlCodeBlock({ language: "html" }).run();
6383
6288
  }
@@ -6385,13 +6290,13 @@ var htmlCodeBlock = {
6385
6290
 
6386
6291
  // src/blocks/image.tsx
6387
6292
  var import_state4 = require("@tiptap/pm/state");
6388
- var import_lucide_react14 = require("lucide-react");
6389
- var import_jsx_runtime22 = require("react/jsx-runtime");
6293
+ var import_lucide_react13 = require("lucide-react");
6294
+ var import_jsx_runtime21 = require("react/jsx-runtime");
6390
6295
  var image = {
6391
6296
  title: "Image",
6392
6297
  description: "Full width image",
6393
6298
  searchTerms: ["image"],
6394
- icon: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_lucide_react14.ImageIcon, { className: "mly:h-4 mly:w-4" }),
6299
+ icon: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react13.ImageIcon, { className: "mly:h-4 mly:w-4" }),
6395
6300
  command: ({ editor, range }) => {
6396
6301
  editor.chain().focus().deleteRange(range).setImage({ src: "" }).run();
6397
6302
  }
@@ -6400,7 +6305,7 @@ var logo = {
6400
6305
  title: "Logo",
6401
6306
  description: "Add your brand logo",
6402
6307
  searchTerms: ["image", "logo"],
6403
- icon: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_lucide_react14.ImageIcon, { className: "mly:h-4 mly:w-4" }),
6308
+ icon: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react13.ImageIcon, { className: "mly:h-4 mly:w-4" }),
6404
6309
  command: ({ editor, range }) => {
6405
6310
  editor.chain().focus().deleteRange(range).setLogoImage({ src: "" }).run();
6406
6311
  }
@@ -6409,7 +6314,7 @@ var inlineImage = {
6409
6314
  title: "Inline Image",
6410
6315
  description: "Inline image",
6411
6316
  searchTerms: ["image", "inline"],
6412
- icon: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_lucide_react14.ImageIcon, { className: "mly:h-4 mly:w-4" }),
6317
+ icon: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react13.ImageIcon, { className: "mly:h-4 mly:w-4" }),
6413
6318
  command: ({ editor, range }) => {
6414
6319
  editor.chain().focus().deleteRange(range).setInlineImage({
6415
6320
  src: "https://maily.to/brand/logo.png"
@@ -6432,13 +6337,13 @@ var inlineImage = {
6432
6337
  };
6433
6338
 
6434
6339
  // src/blocks/layout.tsx
6435
- var import_lucide_react15 = require("lucide-react");
6436
- var import_jsx_runtime23 = require("react/jsx-runtime");
6340
+ var import_lucide_react14 = require("lucide-react");
6341
+ var import_jsx_runtime22 = require("react/jsx-runtime");
6437
6342
  var columns = {
6438
6343
  title: "Columns",
6439
6344
  description: "Add columns to email.",
6440
6345
  searchTerms: ["layout", "columns"],
6441
- icon: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lucide_react15.ColumnsIcon, { className: "mly:h-4 mly:w-4" }),
6346
+ icon: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_lucide_react14.ColumnsIcon, { className: "mly:h-4 mly:w-4" }),
6442
6347
  command: ({ editor, range }) => {
6443
6348
  editor.chain().focus().deleteRange(range).setColumns().focus(editor.state.selection.head - 2).run();
6444
6349
  }
@@ -6447,7 +6352,7 @@ var section = {
6447
6352
  title: "Section",
6448
6353
  description: "Add a section to email.",
6449
6354
  searchTerms: ["layout", "section"],
6450
- icon: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lucide_react15.RectangleHorizontal, { className: "mly:h-4 mly:w-4" }),
6355
+ icon: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_lucide_react14.RectangleHorizontal, { className: "mly:h-4 mly:w-4" }),
6451
6356
  command: ({ editor, range }) => {
6452
6357
  editor.chain().focus().deleteRange(range).setSection().run();
6453
6358
  }
@@ -6456,7 +6361,7 @@ var repeat = {
6456
6361
  title: "Repeat",
6457
6362
  description: "Loop over an array of items.",
6458
6363
  searchTerms: ["repeat", "for", "loop"],
6459
- icon: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lucide_react15.Repeat2, { className: "mly:h-4 mly:w-4" }),
6364
+ icon: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_lucide_react14.Repeat2, { className: "mly:h-4 mly:w-4" }),
6460
6365
  command: ({ editor, range }) => {
6461
6366
  editor.chain().focus().deleteRange(range).setRepeat().run();
6462
6367
  }
@@ -6465,7 +6370,7 @@ var spacer = {
6465
6370
  title: "Spacer",
6466
6371
  description: "Add space between blocks.",
6467
6372
  searchTerms: ["space", "gap", "divider"],
6468
- icon: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lucide_react15.MoveVertical, { className: "mly:h-4 mly:w-4" }),
6373
+ icon: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_lucide_react14.MoveVertical, { className: "mly:h-4 mly:w-4" }),
6469
6374
  command: ({ editor, range }) => {
6470
6375
  editor.chain().focus().deleteRange(range).setSpacer({ height: "sm" }).run();
6471
6376
  }
@@ -6474,20 +6379,20 @@ var divider = {
6474
6379
  title: "Divider",
6475
6380
  description: "Add a horizontal divider.",
6476
6381
  searchTerms: ["divider", "line"],
6477
- icon: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lucide_react15.Minus, { className: "mly:h-4 mly:w-4" }),
6382
+ icon: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_lucide_react14.Minus, { className: "mly:h-4 mly:w-4" }),
6478
6383
  command: ({ editor, range }) => {
6479
6384
  editor.chain().focus().deleteRange(range).setHorizontalRule().run();
6480
6385
  }
6481
6386
  };
6482
6387
 
6483
6388
  // src/blocks/list.tsx
6484
- var import_lucide_react16 = require("lucide-react");
6485
- var import_jsx_runtime24 = require("react/jsx-runtime");
6389
+ var import_lucide_react15 = require("lucide-react");
6390
+ var import_jsx_runtime23 = require("react/jsx-runtime");
6486
6391
  var bulletList = {
6487
6392
  title: "Bullet List",
6488
6393
  description: "Create a simple bullet list.",
6489
6394
  searchTerms: ["unordered", "point"],
6490
- icon: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react16.List, { className: "mly:h-4 mly:w-4" }),
6395
+ icon: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lucide_react15.List, { className: "mly:h-4 mly:w-4" }),
6491
6396
  command: ({ editor, range }) => {
6492
6397
  editor.chain().focus().deleteRange(range).toggleBulletList().run();
6493
6398
  }
@@ -6496,20 +6401,20 @@ var orderedList = {
6496
6401
  title: "Numbered List",
6497
6402
  description: "Create a list with numbering.",
6498
6403
  searchTerms: ["ordered"],
6499
- icon: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react16.ListOrdered, { className: "mly:h-4 mly:w-4" }),
6404
+ icon: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lucide_react15.ListOrdered, { className: "mly:h-4 mly:w-4" }),
6500
6405
  command: ({ editor, range }) => {
6501
6406
  editor.chain().focus().deleteRange(range).toggleOrderedList().run();
6502
6407
  }
6503
6408
  };
6504
6409
 
6505
6410
  // src/blocks/typography.tsx
6506
- var import_lucide_react17 = require("lucide-react");
6507
- var import_jsx_runtime25 = require("react/jsx-runtime");
6411
+ var import_lucide_react16 = require("lucide-react");
6412
+ var import_jsx_runtime24 = require("react/jsx-runtime");
6508
6413
  var text = {
6509
6414
  title: "Text",
6510
6415
  description: "Just start typing with plain text.",
6511
6416
  searchTerms: ["p", "paragraph"],
6512
- icon: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react17.Text, { className: "mly:h-4 mly:w-4" }),
6417
+ icon: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react16.Text, { className: "mly:h-4 mly:w-4" }),
6513
6418
  command: ({ editor, range }) => {
6514
6419
  editor.chain().focus().deleteRange(range).toggleNode("paragraph", "paragraph").run();
6515
6420
  }
@@ -6518,7 +6423,7 @@ var heading1 = {
6518
6423
  title: "Heading 1",
6519
6424
  description: "Big heading.",
6520
6425
  searchTerms: ["h1", "title", "big", "large"],
6521
- icon: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react17.Heading1, { className: "mly:h-4 mly:w-4" }),
6426
+ icon: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react16.Heading1, { className: "mly:h-4 mly:w-4" }),
6522
6427
  command: ({ editor, range }) => {
6523
6428
  editor.chain().focus().deleteRange(range).setNode("heading", { level: 1 }).run();
6524
6429
  }
@@ -6527,7 +6432,7 @@ var heading2 = {
6527
6432
  title: "Heading 2",
6528
6433
  description: "Medium heading.",
6529
6434
  searchTerms: ["h2", "subtitle", "medium"],
6530
- icon: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react17.Heading2, { className: "mly:h-4 mly:w-4" }),
6435
+ icon: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react16.Heading2, { className: "mly:h-4 mly:w-4" }),
6531
6436
  command: ({ editor, range }) => {
6532
6437
  editor.chain().focus().deleteRange(range).setNode("heading", { level: 2 }).run();
6533
6438
  }
@@ -6536,7 +6441,7 @@ var heading3 = {
6536
6441
  title: "Heading 3",
6537
6442
  description: "Small heading.",
6538
6443
  searchTerms: ["h3", "subtitle", "small"],
6539
- icon: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react17.Heading3, { className: "mly:h-4 mly:w-4" }),
6444
+ icon: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react16.Heading3, { className: "mly:h-4 mly:w-4" }),
6540
6445
  command: ({ editor, range }) => {
6541
6446
  editor.chain().focus().deleteRange(range).setNode("heading", { level: 3 }).run();
6542
6447
  }
@@ -6545,7 +6450,7 @@ var hardBreak = {
6545
6450
  title: "Hard Break",
6546
6451
  description: "Add a break between lines.",
6547
6452
  searchTerms: ["break", "line"],
6548
- icon: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react17.DivideIcon, { className: "mly:h-4 mly:w-4" }),
6453
+ icon: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react16.DivideIcon, { className: "mly:h-4 mly:w-4" }),
6549
6454
  command: ({ editor, range }) => {
6550
6455
  editor.chain().focus().deleteRange(range).setHardBreak().run();
6551
6456
  }
@@ -6554,7 +6459,7 @@ var blockquote = {
6554
6459
  title: "Blockquote",
6555
6460
  description: "Add blockquote.",
6556
6461
  searchTerms: ["quote", "blockquote"],
6557
- icon: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react17.TextQuote, { className: "mly:h-4 mly:w-4" }),
6462
+ icon: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react16.TextQuote, { className: "mly:h-4 mly:w-4" }),
6558
6463
  command: ({ editor, range }) => {
6559
6464
  editor.chain().focus().deleteRange(range).toggleBlockquote().run();
6560
6465
  }
@@ -6563,7 +6468,7 @@ var footer = {
6563
6468
  title: "Footer",
6564
6469
  description: "Add a footer text to email.",
6565
6470
  searchTerms: ["footer", "text"],
6566
- icon: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react17.FootprintsIcon, { className: "mly:h-4 mly:w-4" }),
6471
+ icon: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react16.FootprintsIcon, { className: "mly:h-4 mly:w-4" }),
6567
6472
  command: ({ editor, range }) => {
6568
6473
  editor.chain().focus().deleteRange(range).setFooter().run();
6569
6474
  }
@@ -6572,16 +6477,16 @@ var clearLine = {
6572
6477
  title: "Clear Line",
6573
6478
  description: "Clear the current line.",
6574
6479
  searchTerms: ["clear", "line"],
6575
- icon: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react17.EraserIcon, { className: "mly:h-4 mly:w-4" }),
6480
+ icon: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react16.EraserIcon, { className: "mly:h-4 mly:w-4" }),
6576
6481
  command: ({ editor, range }) => {
6577
6482
  editor.chain().focus().selectParentNode().deleteSelection().run();
6578
6483
  }
6579
6484
  };
6580
6485
 
6581
6486
  // src/editor/components/icons/logo-with-cover-image.tsx
6582
- var import_jsx_runtime26 = require("react/jsx-runtime");
6487
+ var import_jsx_runtime25 = require("react/jsx-runtime");
6583
6488
  function LogoWithCoverImageIcon(props) {
6584
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
6489
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
6585
6490
  "svg",
6586
6491
  __spreadProps(__spreadValues({
6587
6492
  width: "14",
@@ -6591,7 +6496,7 @@ function LogoWithCoverImageIcon(props) {
6591
6496
  xmlns: "http://www.w3.org/2000/svg"
6592
6497
  }, props), {
6593
6498
  children: [
6594
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
6499
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
6595
6500
  "path",
6596
6501
  {
6597
6502
  fillRule: "evenodd",
@@ -6600,7 +6505,7 @@ function LogoWithCoverImageIcon(props) {
6600
6505
  fill: "currentColor"
6601
6506
  }
6602
6507
  ),
6603
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
6508
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
6604
6509
  "path",
6605
6510
  {
6606
6511
  fillRule: "evenodd",
@@ -6609,7 +6514,7 @@ function LogoWithCoverImageIcon(props) {
6609
6514
  fill: "currentColor"
6610
6515
  }
6611
6516
  ),
6612
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
6517
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
6613
6518
  "path",
6614
6519
  {
6615
6520
  fillRule: "evenodd",
@@ -6618,8 +6523,8 @@ function LogoWithCoverImageIcon(props) {
6618
6523
  fill: "currentColor"
6619
6524
  }
6620
6525
  ),
6621
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("mask", { id: "path-4-inside-1_1046_19527", fill: "white", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("rect", { x: "3", y: "4", width: "8", height: "3", rx: "0.5" }) }),
6622
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
6526
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("mask", { id: "path-4-inside-1_1046_19527", fill: "white", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("rect", { x: "3", y: "4", width: "8", height: "3", rx: "0.5" }) }),
6527
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
6623
6528
  "rect",
6624
6529
  {
6625
6530
  x: "3",
@@ -6632,7 +6537,7 @@ function LogoWithCoverImageIcon(props) {
6632
6537
  mask: "url(#path-4-inside-1_1046_19527)"
6633
6538
  }
6634
6539
  ),
6635
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
6540
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
6636
6541
  "rect",
6637
6542
  {
6638
6543
  x: "6.25",
@@ -6644,16 +6549,16 @@ function LogoWithCoverImageIcon(props) {
6644
6549
  strokeWidth: "0.5"
6645
6550
  }
6646
6551
  ),
6647
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("rect", { x: "3", y: "8", width: "2", height: "1", rx: "0.5", fill: "currentColor" })
6552
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("rect", { x: "3", y: "8", width: "2", height: "1", rx: "0.5", fill: "currentColor" })
6648
6553
  ]
6649
6554
  })
6650
6555
  );
6651
6556
  }
6652
6557
 
6653
6558
  // src/editor/components/icons/logo-with-text-horizon.tsx
6654
- var import_jsx_runtime27 = require("react/jsx-runtime");
6559
+ var import_jsx_runtime26 = require("react/jsx-runtime");
6655
6560
  function LogoWithTextHorizonIcon(props) {
6656
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
6561
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
6657
6562
  "svg",
6658
6563
  __spreadProps(__spreadValues({
6659
6564
  width: "14",
@@ -6663,7 +6568,7 @@ function LogoWithTextHorizonIcon(props) {
6663
6568
  xmlns: "http://www.w3.org/2000/svg"
6664
6569
  }, props), {
6665
6570
  children: [
6666
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
6571
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
6667
6572
  "path",
6668
6573
  {
6669
6574
  fillRule: "evenodd",
@@ -6672,7 +6577,7 @@ function LogoWithTextHorizonIcon(props) {
6672
6577
  fill: "currentColor"
6673
6578
  }
6674
6579
  ),
6675
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
6580
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
6676
6581
  "rect",
6677
6582
  {
6678
6583
  x: "6.25",
@@ -6684,8 +6589,8 @@ function LogoWithTextHorizonIcon(props) {
6684
6589
  strokeWidth: "0.5"
6685
6590
  }
6686
6591
  ),
6687
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("rect", { x: "3", y: "6.5", width: "2", height: "1", rx: "0.5", fill: "currentColor" }),
6688
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
6592
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("rect", { x: "3", y: "6.5", width: "2", height: "1", rx: "0.5", fill: "currentColor" }),
6593
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
6689
6594
  "path",
6690
6595
  {
6691
6596
  fillRule: "evenodd",
@@ -6694,7 +6599,7 @@ function LogoWithTextHorizonIcon(props) {
6694
6599
  fill: "currentColor"
6695
6600
  }
6696
6601
  ),
6697
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
6602
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
6698
6603
  "path",
6699
6604
  {
6700
6605
  fillRule: "evenodd",
@@ -6709,9 +6614,9 @@ function LogoWithTextHorizonIcon(props) {
6709
6614
  }
6710
6615
 
6711
6616
  // src/editor/components/icons/logo-with-text-vertical.tsx
6712
- var import_jsx_runtime28 = require("react/jsx-runtime");
6617
+ var import_jsx_runtime27 = require("react/jsx-runtime");
6713
6618
  function LogoWithTextVerticalIcon(props) {
6714
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
6619
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
6715
6620
  "svg",
6716
6621
  __spreadProps(__spreadValues({
6717
6622
  width: "14",
@@ -6721,7 +6626,7 @@ function LogoWithTextVerticalIcon(props) {
6721
6626
  xmlns: "http://www.w3.org/2000/svg"
6722
6627
  }, props), {
6723
6628
  children: [
6724
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
6629
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
6725
6630
  "path",
6726
6631
  {
6727
6632
  fillRule: "evenodd",
@@ -6730,7 +6635,7 @@ function LogoWithTextVerticalIcon(props) {
6730
6635
  fill: "currentColor"
6731
6636
  }
6732
6637
  ),
6733
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
6638
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
6734
6639
  "rect",
6735
6640
  {
6736
6641
  x: "4.25",
@@ -6742,8 +6647,8 @@ function LogoWithTextVerticalIcon(props) {
6742
6647
  strokeWidth: "0.5"
6743
6648
  }
6744
6649
  ),
6745
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("rect", { x: "6", y: "6", width: "2", height: "1", rx: "0.5", fill: "currentColor" }),
6746
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
6650
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("rect", { x: "6", y: "6", width: "2", height: "1", rx: "0.5", fill: "currentColor" }),
6651
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
6747
6652
  "path",
6748
6653
  {
6749
6654
  fillRule: "evenodd",
@@ -6752,7 +6657,7 @@ function LogoWithTextVerticalIcon(props) {
6752
6657
  fill: "currentColor"
6753
6658
  }
6754
6659
  ),
6755
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
6660
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
6756
6661
  "path",
6757
6662
  {
6758
6663
  fillRule: "evenodd",
@@ -6767,12 +6672,12 @@ function LogoWithTextVerticalIcon(props) {
6767
6672
  }
6768
6673
 
6769
6674
  // src/blocks/headers.tsx
6770
- var import_jsx_runtime29 = require("react/jsx-runtime");
6675
+ var import_jsx_runtime28 = require("react/jsx-runtime");
6771
6676
  var headerLogoWithTextHorizontal = {
6772
6677
  title: "Logo with Text (Horizontal)",
6773
6678
  description: "Logo and a text horizontally",
6774
6679
  searchTerms: ["logo", "text"],
6775
- icon: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(LogoWithTextHorizonIcon, { className: "mly:h-4 mly:w-4" }),
6680
+ icon: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(LogoWithTextHorizonIcon, { className: "mly:h-4 mly:w-4" }),
6776
6681
  command: ({ editor, range }) => {
6777
6682
  editor.chain().deleteRange(range).insertContent({
6778
6683
  type: "columns",
@@ -6836,7 +6741,7 @@ var headerLogoWithTextVertical = {
6836
6741
  title: "Logo with Text (Vertical)",
6837
6742
  description: "Logo and a text vertically",
6838
6743
  searchTerms: ["logo", "text"],
6839
- icon: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(LogoWithTextVerticalIcon, { className: "mly:h-4 mly:w-4" }),
6744
+ icon: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(LogoWithTextVerticalIcon, { className: "mly:h-4 mly:w-4" }),
6840
6745
  command: ({ editor, range }) => {
6841
6746
  editor.chain().deleteRange(range).insertContent([
6842
6747
  {
@@ -6867,7 +6772,7 @@ var headerLogoWithCoverImage = {
6867
6772
  title: "Logo with Cover Image",
6868
6773
  description: "Logo and a cover image",
6869
6774
  searchTerms: ["logo", "cover", "image"],
6870
- icon: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(LogoWithCoverImageIcon, { className: "mly:h-4 mly:w-4" }),
6775
+ icon: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(LogoWithCoverImageIcon, { className: "mly:h-4 mly:w-4" }),
6871
6776
  command: ({ editor, range }) => {
6872
6777
  const todayFormatted = (/* @__PURE__ */ new Date()).toLocaleDateString("en-US", {
6873
6778
  year: "numeric",
@@ -6955,13 +6860,13 @@ var headerLogoWithCoverImage = {
6955
6860
  };
6956
6861
 
6957
6862
  // src/blocks/footers.tsx
6958
- var import_lucide_react18 = require("lucide-react");
6959
- var import_jsx_runtime30 = require("react/jsx-runtime");
6863
+ var import_lucide_react17 = require("lucide-react");
6864
+ var import_jsx_runtime29 = require("react/jsx-runtime");
6960
6865
  var footerCopyrightText = {
6961
6866
  title: "Footer Copyright",
6962
6867
  description: "Copyright text for the footer.",
6963
6868
  searchTerms: ["footer", "copyright"],
6964
- icon: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react18.CopyrightIcon, { className: "mly:h-4 mly:w-4" }),
6869
+ icon: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react17.CopyrightIcon, { className: "mly:h-4 mly:w-4" }),
6965
6870
  command: ({ editor, range }) => {
6966
6871
  const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
6967
6872
  editor.chain().focus().deleteRange(range).insertContent({
@@ -6981,7 +6886,7 @@ var footerCommunityFeedbackCta = {
6981
6886
  title: "Footer Community Feedback CTA",
6982
6887
  description: "Community feedback CTA for the footer.",
6983
6888
  searchTerms: ["footer", "community", "feedback", "cta"],
6984
- icon: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react18.RectangleHorizontalIcon, { className: "mly:h-4 mly:w-4" }),
6889
+ icon: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react17.RectangleHorizontalIcon, { className: "mly:h-4 mly:w-4" }),
6985
6890
  command: ({ editor, range }) => {
6986
6891
  editor.chain().focus().deleteRange(range).insertContent([
6987
6892
  {
@@ -7024,7 +6929,7 @@ var footerCompanySignature = {
7024
6929
  title: "Footer Company Signature",
7025
6930
  description: "Company signature for the footer.",
7026
6931
  searchTerms: ["footer", "company", "signature"],
7027
- icon: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react18.LayoutTemplateIcon, { className: "mly:h-4 mly:w-4" }),
6932
+ icon: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react17.LayoutTemplateIcon, { className: "mly:h-4 mly:w-4" }),
7028
6933
  command: ({ editor, range }) => {
7029
6934
  editor.chain().focus().deleteRange(range).insertContent([
7030
6935
  { type: "horizontalRule" },
@@ -7178,7 +7083,7 @@ var footerCompanySignature = {
7178
7083
  };
7179
7084
 
7180
7085
  // src/editor/extensions/slash-command/default-slash-commands.tsx
7181
- var import_jsx_runtime31 = require("react/jsx-runtime");
7086
+ var import_jsx_runtime30 = require("react/jsx-runtime");
7182
7087
  var DEFAULT_SLASH_COMMANDS = [
7183
7088
  {
7184
7089
  title: "Blocks",
@@ -7213,7 +7118,7 @@ var DEFAULT_SLASH_COMMANDS = [
7213
7118
  title: "Headers",
7214
7119
  description: "Add pre-designed headers block",
7215
7120
  searchTerms: ["header", "headers"],
7216
- icon: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_lucide_react19.Heading1, { className: "mly:h-4 mly:w-4" }),
7121
+ icon: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react18.Heading1, { className: "mly:h-4 mly:w-4" }),
7217
7122
  preview: "https://cdn.usemaily.com/previews/header-preview-xyz.png",
7218
7123
  commands: [
7219
7124
  headerLogoWithTextVertical,
@@ -7226,7 +7131,7 @@ var DEFAULT_SLASH_COMMANDS = [
7226
7131
  title: "Footers",
7227
7132
  description: "Add pre-designed footers block",
7228
7133
  searchTerms: ["footers"],
7229
- icon: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_lucide_react19.FootprintsIcon, { className: "mly:h-4 mly:w-4" }),
7134
+ icon: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react18.FootprintsIcon, { className: "mly:h-4 mly:w-4" }),
7230
7135
  commands: [
7231
7136
  footerCopyrightText,
7232
7137
  footerCommunityFeedbackCta,
@@ -7239,18 +7144,18 @@ var DEFAULT_SLASH_COMMANDS = [
7239
7144
  ];
7240
7145
 
7241
7146
  // src/editor/provider.tsx
7242
- var import_jsx_runtime32 = require("react/jsx-runtime");
7147
+ var import_jsx_runtime31 = require("react/jsx-runtime");
7243
7148
  var DEFAULT_PLACEHOLDER_URL = "https://maily.to/";
7244
- var MailyContext = (0, import_react24.createContext)({
7149
+ var MailyContext = (0, import_react21.createContext)({
7245
7150
  placeholderUrl: DEFAULT_PLACEHOLDER_URL,
7246
7151
  blocks: DEFAULT_SLASH_COMMANDS
7247
7152
  });
7248
7153
  function MailyProvider(props) {
7249
7154
  const _a = props, { children } = _a, defaultValues = __objRest(_a, ["children"]);
7250
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(MailyContext.Provider, { value: defaultValues, children });
7155
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(MailyContext.Provider, { value: defaultValues, children });
7251
7156
  }
7252
7157
  function useMailyContext() {
7253
- const values = (0, import_react24.useContext)(MailyContext);
7158
+ const values = (0, import_react21.useContext)(MailyContext);
7254
7159
  if (!values) {
7255
7160
  throw new Error("Missing MailyContext.Provider in the component tree");
7256
7161
  }
@@ -7258,23 +7163,23 @@ function useMailyContext() {
7258
7163
  }
7259
7164
 
7260
7165
  // src/editor/components/ui/link-input-popover.tsx
7261
- var import_react30 = require("react");
7166
+ var import_react27 = require("react");
7262
7167
 
7263
7168
  // src/editor/nodes/variable/variable.ts
7264
7169
  var import_core7 = require("@tiptap/core");
7265
7170
  var import_state5 = require("@tiptap/pm/state");
7266
- var import_react28 = require("@tiptap/react");
7171
+ var import_react25 = require("@tiptap/react");
7267
7172
  var import_suggestion = __toESM(require("@tiptap/suggestion"), 1);
7268
7173
 
7269
7174
  // src/editor/nodes/variable/variable-suggestions-popover.tsx
7270
- var import_lucide_react20 = require("lucide-react");
7271
- var import_react25 = require("react");
7272
- var import_jsx_runtime33 = require("react/jsx-runtime");
7273
- var VariableSuggestionsPopover = (0, import_react25.forwardRef)((props, ref) => {
7175
+ var import_lucide_react19 = require("lucide-react");
7176
+ var import_react22 = require("react");
7177
+ var import_jsx_runtime32 = require("react/jsx-runtime");
7178
+ var VariableSuggestionsPopover = (0, import_react22.forwardRef)((props, ref) => {
7274
7179
  const { items, onSelectItem } = props;
7275
- const [selectedIndex, setSelectedIndex] = (0, import_react25.useState)(0);
7276
- const scrollContainerRef = (0, import_react25.useRef)(null);
7277
- const itemRefs = (0, import_react25.useRef)([]);
7180
+ const [selectedIndex, setSelectedIndex] = (0, import_react22.useState)(0);
7181
+ const scrollContainerRef = (0, import_react22.useRef)(null);
7182
+ const itemRefs = (0, import_react22.useRef)([]);
7278
7183
  const scrollSelectedIntoView = (index) => {
7279
7184
  const container = scrollContainerRef.current;
7280
7185
  const selectedItem = itemRefs.current[index];
@@ -7290,17 +7195,17 @@ var VariableSuggestionsPopover = (0, import_react25.forwardRef)((props, ref) =>
7290
7195
  container.scrollTop += itemRect.top - containerRect.top - padding;
7291
7196
  }
7292
7197
  };
7293
- (0, import_react25.useEffect)(() => {
7198
+ (0, import_react22.useEffect)(() => {
7294
7199
  setSelectedIndex(0);
7295
7200
  if (scrollContainerRef.current) {
7296
7201
  scrollContainerRef.current.scrollTop = 0;
7297
7202
  }
7298
7203
  itemRefs.current = items.map(() => null);
7299
7204
  }, [items]);
7300
- (0, import_react25.useEffect)(() => {
7205
+ (0, import_react22.useEffect)(() => {
7301
7206
  scrollSelectedIntoView(selectedIndex);
7302
7207
  }, [selectedIndex]);
7303
- (0, import_react25.useImperativeHandle)(ref, () => ({
7208
+ (0, import_react22.useImperativeHandle)(ref, () => ({
7304
7209
  moveUp: () => {
7305
7210
  setSelectedIndex((selectedIndex + items.length - 1) % items.length);
7306
7211
  },
@@ -7315,17 +7220,17 @@ var VariableSuggestionsPopover = (0, import_react25.forwardRef)((props, ref) =>
7315
7220
  onSelectItem(item);
7316
7221
  }
7317
7222
  }));
7318
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("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: [
7319
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("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: [
7320
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "mly:text-xs mly:uppercase", children: "Variables" }),
7321
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(VariableIcon, { children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react20.Braces, { className: "mly:size-3 mly:stroke-[2.5]" }) })
7223
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("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: [
7224
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("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: [
7225
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "mly:text-xs mly:uppercase", children: "Variables" }),
7226
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(VariableIcon, { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react19.Braces, { className: "mly:size-3 mly:stroke-[2.5]" }) })
7322
7227
  ] }),
7323
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
7228
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
7324
7229
  "div",
7325
7230
  {
7326
7231
  ref: scrollContainerRef,
7327
7232
  className: "mly:max-h-52 mly:overflow-y-auto mly:scrollbar-thin mly:scrollbar-track-transparent mly:scrollbar-thumb-gray-200",
7328
- children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("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__ */ (0, import_jsx_runtime33.jsxs)(
7233
+ children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("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__ */ (0, import_jsx_runtime32.jsxs)(
7329
7234
  "button",
7330
7235
  {
7331
7236
  ref: (el) => itemRefs.current[index] = el,
@@ -7335,27 +7240,27 @@ var VariableSuggestionsPopover = (0, import_react25.forwardRef)((props, ref) =>
7335
7240
  index === selectedIndex ? "mly:bg-soft-gray" : "mly:bg-white"
7336
7241
  ),
7337
7242
  children: [
7338
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react20.Braces, { className: "mly:size-3 mly:stroke-[2.5] mly:text-rose-600" }),
7243
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react19.Braces, { className: "mly:size-3 mly:stroke-[2.5] mly:text-rose-600" }),
7339
7244
  (item == null ? void 0 : item.label) || item.name
7340
7245
  ]
7341
7246
  },
7342
7247
  index
7343
- )) : /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("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" }) })
7248
+ )) : /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("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" }) })
7344
7249
  }
7345
7250
  ),
7346
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("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: [
7347
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "mly:flex mly:items-center mly:gap-1", children: [
7348
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(VariableIcon, { children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react20.ArrowDownIcon, { className: "mly:size-3 mly:stroke-[2.5]" }) }),
7349
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(VariableIcon, { children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react20.ArrowUpIcon, { className: "mly:size-3 mly:stroke-[2.5]" }) }),
7350
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "mly:text-xs mly:text-gray-500", children: "Navigate" })
7251
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("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: [
7252
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "mly:flex mly:items-center mly:gap-1", children: [
7253
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(VariableIcon, { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react19.ArrowDownIcon, { className: "mly:size-3 mly:stroke-[2.5]" }) }),
7254
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(VariableIcon, { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react19.ArrowUpIcon, { className: "mly:size-3 mly:stroke-[2.5]" }) }),
7255
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "mly:text-xs mly:text-gray-500", children: "Navigate" })
7351
7256
  ] }),
7352
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(VariableIcon, { children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react20.CornerDownLeftIcon, { className: "mly:size-3 mly:stroke-[2.5]" }) })
7257
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(VariableIcon, { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react19.CornerDownLeftIcon, { className: "mly:size-3 mly:stroke-[2.5]" }) })
7353
7258
  ] })
7354
7259
  ] });
7355
7260
  });
7356
7261
  function VariableIcon(props) {
7357
7262
  const { className, children } = props;
7358
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
7263
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
7359
7264
  "div",
7360
7265
  {
7361
7266
  className: cn(
@@ -7368,10 +7273,10 @@ function VariableIcon(props) {
7368
7273
  }
7369
7274
 
7370
7275
  // src/editor/nodes/variable/variable-view.tsx
7371
- var import_react26 = require("@tiptap/react");
7372
- var import_lucide_react21 = require("lucide-react");
7373
- var import_react27 = require("react");
7374
- var import_jsx_runtime34 = require("react/jsx-runtime");
7276
+ var import_react23 = require("@tiptap/react");
7277
+ var import_lucide_react20 = require("lucide-react");
7278
+ var import_react24 = require("react");
7279
+ var import_jsx_runtime33 = require("react/jsx-runtime");
7375
7280
  function VariableView(props) {
7376
7281
  const { node, updateAttributes: updateAttributes2, editor } = props;
7377
7282
  const {
@@ -7381,24 +7286,24 @@ function VariableView(props) {
7381
7286
  hideDefaultValue = false,
7382
7287
  label
7383
7288
  } = node.attrs;
7384
- const renderVariable = (0, import_react27.useMemo)(() => {
7289
+ const renderVariable = (0, import_react24.useMemo)(() => {
7385
7290
  var _a, _b;
7386
7291
  const variableRender = (_b = (_a = getNodeOptions(editor, "variable")) == null ? void 0 : _a.renderVariable) != null ? _b : DEFAULT_RENDER_VARIABLE_FUNCTION;
7387
7292
  return variableRender;
7388
7293
  }, [editor]);
7389
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
7390
- import_react26.NodeViewWrapper,
7294
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
7295
+ import_react23.NodeViewWrapper,
7391
7296
  {
7392
7297
  className: "react-component mly:inline-block mly:leading-none",
7393
7298
  draggable: "false",
7394
- children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
7299
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
7395
7300
  Popover,
7396
7301
  {
7397
7302
  onOpenChange: (open) => {
7398
7303
  editor.storage.variable.popover = open;
7399
7304
  },
7400
7305
  children: [
7401
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(PopoverTrigger, { children: renderVariable({
7306
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(PopoverTrigger, { children: renderVariable({
7402
7307
  variable: {
7403
7308
  name: id,
7404
7309
  required,
@@ -7409,7 +7314,7 @@ function VariableView(props) {
7409
7314
  editor,
7410
7315
  from: "content-variable"
7411
7316
  }) }),
7412
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
7317
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
7413
7318
  PopoverContent,
7414
7319
  {
7415
7320
  align: "start",
@@ -7418,10 +7323,10 @@ function VariableView(props) {
7418
7323
  sideOffset: 8,
7419
7324
  onOpenAutoFocus: (e) => e.preventDefault(),
7420
7325
  onCloseAutoFocus: (e) => e.preventDefault(),
7421
- children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "mly:flex mly:items-stretch mly:text-midnight-gray", children: [
7422
- /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("label", { className: "mly:relative", children: [
7423
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "mly:inline-block mly:px-2 mly:text-xs mly:text-midnight-gray", children: "Variable" }),
7424
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
7326
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "mly:flex mly:items-stretch mly:text-midnight-gray", children: [
7327
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("label", { className: "mly:relative", children: [
7328
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "mly:inline-block mly:px-2 mly:text-xs mly:text-midnight-gray", children: "Variable" }),
7329
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
7425
7330
  "input",
7426
7331
  __spreadProps(__spreadValues({}, AUTOCOMPLETE_PASSWORD_MANAGERS_OFF), {
7427
7332
  value: id != null ? id : "",
@@ -7435,11 +7340,11 @@ function VariableView(props) {
7435
7340
  })
7436
7341
  )
7437
7342
  ] }),
7438
- !hideDefaultValue && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
7439
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Divider, { className: "mly:mx-1.5" }),
7440
- /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("label", { className: "mly:relative", children: [
7441
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "mly:inline-block mly:px-2 mly:pl-1 mly:text-xs mly:text-midnight-gray", children: "Default" }),
7442
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
7343
+ !hideDefaultValue && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
7344
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Divider, { className: "mly:mx-1.5" }),
7345
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("label", { className: "mly:relative", children: [
7346
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "mly:inline-block mly:px-2 mly:pl-1 mly:text-xs mly:text-midnight-gray", children: "Default" }),
7347
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
7443
7348
  "input",
7444
7349
  __spreadProps(__spreadValues({}, AUTOCOMPLETE_PASSWORD_MANAGERS_OFF), {
7445
7350
  value: fallback != null ? fallback : "",
@@ -7452,7 +7357,7 @@ function VariableView(props) {
7452
7357
  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"
7453
7358
  })
7454
7359
  ),
7455
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "mly:absolute mly:inset-y-0 mly:right-1 mly:flex mly:items-center", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react21.Pencil, { className: "mly:h-3 mly:w-3 mly:stroke-[2.5] mly:text-midnight-gray" }) })
7360
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "mly:absolute mly:inset-y-0 mly:right-1 mly:flex mly:items-center", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react20.Pencil, { className: "mly:h-3 mly:w-3 mly:stroke-[2.5] mly:text-midnight-gray" }) })
7456
7361
  ] })
7457
7362
  ] })
7458
7363
  ] }) })
@@ -7469,13 +7374,13 @@ var DefaultRenderVariable = (props) => {
7469
7374
  const { name, required, valid, label } = variable;
7470
7375
  const variableLabel = label || name;
7471
7376
  if (from === "button-variable") {
7472
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("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: [
7473
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react21.Braces, { className: "mly:h-3 mly:w-3 mly:shrink-0 mly:stroke-[2.5]" }),
7474
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "mly:min-w-0 mly:truncate mly:text-left", children: variableLabel })
7377
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("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: [
7378
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react20.Braces, { className: "mly:h-3 mly:w-3 mly:shrink-0 mly:stroke-[2.5]" }),
7379
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "mly:min-w-0 mly:truncate mly:text-left", children: variableLabel })
7475
7380
  ] });
7476
7381
  }
7477
7382
  if (from === "bubble-variable") {
7478
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
7383
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
7479
7384
  "div",
7480
7385
  {
7481
7386
  className: cn(
@@ -7483,21 +7388,21 @@ var DefaultRenderVariable = (props) => {
7483
7388
  !valid && "mly:border-rose-400 mly:bg-rose-50 mly:text-rose-600 mly:hover:bg-rose-100"
7484
7389
  ),
7485
7390
  children: [
7486
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react21.Braces, { className: "mly:h-3 mly:w-3 mly:shrink-0 mly:stroke-[2.5] mly:text-rose-600" }),
7487
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "mly:min-w-0 mly:truncate mly:text-left", children: variableLabel })
7391
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react20.Braces, { className: "mly:h-3 mly:w-3 mly:shrink-0 mly:stroke-[2.5] mly:text-rose-600" }),
7392
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "mly:min-w-0 mly:truncate mly:text-left", children: variableLabel })
7488
7393
  ]
7489
7394
  }
7490
7395
  );
7491
7396
  }
7492
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
7397
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
7493
7398
  "span",
7494
7399
  {
7495
7400
  tabIndex: -1,
7496
7401
  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",
7497
7402
  children: [
7498
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react21.Braces, { className: "mly:size-[var(--variable-icon-size)] mly:shrink-0 mly:stroke-[2.5] mly:text-rose-600" }),
7403
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react20.Braces, { className: "mly:size-[var(--variable-icon-size)] mly:shrink-0 mly:stroke-[2.5] mly:text-rose-600" }),
7499
7404
  variableLabel,
7500
- required && !fallback && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react21.AlertTriangle, { className: "mly:size-[var(--variable-icon-size)] mly:shrink-0 mly:stroke-[2.5]" })
7405
+ required && !fallback && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react20.AlertTriangle, { className: "mly:size-[var(--variable-icon-size)] mly:shrink-0 mly:stroke-[2.5]" })
7501
7406
  ]
7502
7407
  }
7503
7408
  );
@@ -7670,7 +7575,7 @@ var VariableExtension = import_core7.Node.create({
7670
7575
  ];
7671
7576
  },
7672
7577
  addNodeView() {
7673
- return (0, import_react28.ReactNodeViewRenderer)(VariableView, {
7578
+ return (0, import_react25.ReactNodeViewRenderer)(VariableView, {
7674
7579
  className: "mly:relative mly:inline-block",
7675
7580
  as: "div"
7676
7581
  });
@@ -7678,26 +7583,26 @@ var VariableExtension = import_core7.Node.create({
7678
7583
  });
7679
7584
 
7680
7585
  // src/editor/components/ui/link-input-popover.tsx
7681
- var import_jsx_runtime35 = require("react/jsx-runtime");
7586
+ var import_jsx_runtime34 = require("react/jsx-runtime");
7682
7587
  function LinkInputPopover(props) {
7683
7588
  var _a, _b;
7684
7589
  const {
7685
7590
  defaultValue = "",
7686
7591
  onValueChange,
7687
7592
  tooltip,
7688
- icon: Icon = import_lucide_react22.Link,
7593
+ icon: Icon = import_lucide_react21.Link,
7689
7594
  editor,
7690
7595
  isVariable
7691
7596
  } = props;
7692
- const [isOpen, setIsOpen] = (0, import_react29.useState)(false);
7693
- const [isEditing, setIsEditing] = (0, import_react29.useState)(!isVariable);
7694
- const linkInputRef = (0, import_react29.useRef)(null);
7597
+ const [isOpen, setIsOpen] = (0, import_react26.useState)(false);
7598
+ const [isEditing, setIsEditing] = (0, import_react26.useState)(!isVariable);
7599
+ const linkInputRef = (0, import_react26.useRef)(null);
7695
7600
  const { placeholderUrl = DEFAULT_PLACEHOLDER_URL } = useMailyContext();
7696
7601
  const options = useVariableOptions(editor);
7697
7602
  const renderVariable = options == null ? void 0 : options.renderVariable;
7698
7603
  const variables = options == null ? void 0 : options.variables;
7699
7604
  const variableTriggerCharacter = (_b = (_a = options == null ? void 0 : options.suggestion) == null ? void 0 : _a.char) != null ? _b : DEFAULT_VARIABLE_TRIGGER_CHAR;
7700
- const autoCompleteOptions = (0, import_react30.useMemo)(() => {
7605
+ const autoCompleteOptions = (0, import_react27.useMemo)(() => {
7701
7606
  const withoutTrigger = defaultValue.replace(
7702
7607
  new RegExp(variableTriggerCharacter, "g"),
7703
7608
  ""
@@ -7708,7 +7613,7 @@ function LinkInputPopover(props) {
7708
7613
  editor
7709
7614
  }).map((variable) => variable.name);
7710
7615
  }, [variables, variableTriggerCharacter, defaultValue, editor]);
7711
- const popoverButton = /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
7616
+ const popoverButton = /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
7712
7617
  BaseButton,
7713
7618
  {
7714
7619
  variant: "ghost",
@@ -7716,10 +7621,10 @@ function LinkInputPopover(props) {
7716
7621
  type: "button",
7717
7622
  className: "mly:h-7! mly:w-7!",
7718
7623
  "data-state": !!defaultValue,
7719
- children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Icon, { className: "mly:h-3 mly:w-3 mly:shrink-0 mly:stroke-[2.5] mly:text-midnight-gray" })
7624
+ children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Icon, { className: "mly:h-3 mly:w-3 mly:shrink-0 mly:stroke-[2.5] mly:text-midnight-gray" })
7720
7625
  }
7721
7626
  ) });
7722
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
7627
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
7723
7628
  Popover,
7724
7629
  {
7725
7630
  open: isOpen,
@@ -7733,11 +7638,11 @@ function LinkInputPopover(props) {
7733
7638
  }
7734
7639
  },
7735
7640
  children: [
7736
- tooltip ? /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Tooltip, { children: [
7737
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TooltipTrigger, { asChild: true, children: popoverButton }),
7738
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TooltipContent, { sideOffset: 8, children: tooltip })
7641
+ tooltip ? /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(Tooltip, { children: [
7642
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(TooltipTrigger, { asChild: true, children: popoverButton }),
7643
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(TooltipContent, { sideOffset: 8, children: tooltip })
7739
7644
  ] }) : popoverButton,
7740
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
7645
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
7741
7646
  PopoverContent,
7742
7647
  {
7743
7648
  align: "end",
@@ -7745,7 +7650,7 @@ function LinkInputPopover(props) {
7745
7650
  className: "mly:w-max mly:rounded-none mly:border-none mly:bg-transparent mly:p-0! mly:shadow-none",
7746
7651
  sideOffset: 8,
7747
7652
  onCloseAutoFocus: (e) => e.preventDefault(),
7748
- children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
7653
+ children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
7749
7654
  "form",
7750
7655
  {
7751
7656
  onSubmit: (e) => {
@@ -7757,8 +7662,8 @@ function LinkInputPopover(props) {
7757
7662
  onValueChange == null ? void 0 : onValueChange(input.value);
7758
7663
  setIsOpen(false);
7759
7664
  },
7760
- children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "mly:isolate mly:flex mly:rounded-lg", children: [
7761
- !isEditing && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("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__ */ (0, import_jsx_runtime35.jsx)(
7665
+ children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "mly:isolate mly:flex mly:rounded-lg", children: [
7666
+ !isEditing && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("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__ */ (0, import_jsx_runtime34.jsx)(
7762
7667
  "button",
7763
7668
  {
7764
7669
  onClick: () => {
@@ -7779,9 +7684,9 @@ function LinkInputPopover(props) {
7779
7684
  })
7780
7685
  }
7781
7686
  ) }),
7782
- isEditing && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "mly:relative", children: [
7783
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "mly:absolute mly:inset-y-0 mly:left-1.5 mly:z-10 mly:flex mly:items-center", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react22.LinkIcon, { className: "mly:h-3 mly:w-3 mly:stroke-[2.5] mly:text-midnight-gray" }) }),
7784
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
7687
+ isEditing && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "mly:relative", children: [
7688
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "mly:absolute mly:inset-y-0 mly:left-1.5 mly:z-10 mly:flex mly:items-center", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react21.LinkIcon, { className: "mly:h-3 mly:w-3 mly:stroke-[2.5] mly:text-midnight-gray" }) }),
7689
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
7785
7690
  InputAutocomplete,
7786
7691
  {
7787
7692
  editor,
@@ -7817,12 +7722,12 @@ function LinkInputPopover(props) {
7817
7722
  }
7818
7723
 
7819
7724
  // src/editor/components/image-menu/image-size.tsx
7820
- var import_jsx_runtime36 = require("react/jsx-runtime");
7725
+ var import_jsx_runtime35 = require("react/jsx-runtime");
7821
7726
  function ImageSize(props) {
7822
7727
  const { value, onValueChange, dimension } = props;
7823
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("label", { className: "mly:relative mly:flex mly:items-center", children: [
7824
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("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" }),
7825
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
7728
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("label", { className: "mly:relative mly:flex mly:items-center", children: [
7729
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("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" }),
7730
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
7826
7731
  "input",
7827
7732
  __spreadProps(__spreadValues({}, AUTOCOMPLETE_PASSWORD_MANAGERS_OFF), {
7828
7733
  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",
@@ -7831,15 +7736,15 @@ function ImageSize(props) {
7831
7736
  onChange: (e) => onValueChange(e.target.value)
7832
7737
  })
7833
7738
  ),
7834
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("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" })
7739
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("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" })
7835
7740
  ] });
7836
7741
  }
7837
7742
 
7838
7743
  // src/editor/components/image-menu/use-image-state.tsx
7839
- var import_react31 = require("@tiptap/react");
7840
- var import_fast_deep_equal3 = __toESM(require("fast-deep-equal"), 1);
7744
+ var import_react28 = require("@tiptap/react");
7745
+ var import_fast_deep_equal2 = __toESM(require("fast-deep-equal"), 1);
7841
7746
  var useImageState = (editor) => {
7842
- const states = (0, import_react31.useEditorState)({
7747
+ const states = (0, import_react28.useEditorState)({
7843
7748
  editor,
7844
7749
  selector: ({ editor: editor2 }) => {
7845
7750
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
@@ -7860,13 +7765,13 @@ var useImageState = (editor) => {
7860
7765
  currentShowIfKey: ((_o = editor2.getAttributes("image")) == null ? void 0 : _o.showIfKey) || ((_p = editor2.getAttributes("logo")) == null ? void 0 : _p.showIfKey) || ""
7861
7766
  };
7862
7767
  },
7863
- equalityFn: import_fast_deep_equal3.default
7768
+ equalityFn: import_fast_deep_equal2.default
7864
7769
  });
7865
7770
  return states;
7866
7771
  };
7867
7772
 
7868
7773
  // src/editor/components/image-menu/image-bubble-menu.tsx
7869
- var import_jsx_runtime37 = require("react/jsx-runtime");
7774
+ var import_jsx_runtime36 = require("react/jsx-runtime");
7870
7775
  function ImageBubbleMenu(props) {
7871
7776
  var _a, _b, _c, _d;
7872
7777
  const { editor, appendTo } = props;
@@ -7885,19 +7790,19 @@ function ImageBubbleMenu(props) {
7885
7790
  popperOptions: {
7886
7791
  modifiers: [{ name: "flip", enabled: false }]
7887
7792
  },
7888
- plugins: [import_tippy4.sticky],
7793
+ plugins: [import_tippy3.sticky],
7889
7794
  sticky: "popper",
7890
7795
  maxWidth: "100%"
7891
7796
  }
7892
7797
  });
7893
7798
  const { lockAspectRatio } = state;
7894
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
7895
- import_react32.BubbleMenu,
7799
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
7800
+ import_react29.BubbleMenu,
7896
7801
  __spreadProps(__spreadValues({}, bubbleMenuProps), {
7897
7802
  className: "mly:flex mly:rounded-lg mly:border mly:border-gray-200 mly:bg-white mly:p-0.5 mly:shadow-md",
7898
- children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(TooltipProvider, { children: [
7899
- state.isLogoActive && state.imageSrc && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_jsx_runtime37.Fragment, { children: [
7900
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
7803
+ children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(TooltipProvider, { children: [
7804
+ state.isLogoActive && state.imageSrc && /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
7805
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
7901
7806
  Select,
7902
7807
  {
7903
7808
  label: "Size",
@@ -7912,10 +7817,10 @@ function ImageBubbleMenu(props) {
7912
7817
  }
7913
7818
  }
7914
7819
  ),
7915
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Divider, {})
7820
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Divider, {})
7916
7821
  ] }),
7917
- /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "mly:flex mly:gap-x-0.5", children: [
7918
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
7822
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "mly:flex mly:gap-x-0.5", children: [
7823
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
7919
7824
  AlignmentSwitch,
7920
7825
  {
7921
7826
  alignment: state.alignment,
@@ -7929,7 +7834,7 @@ function ImageBubbleMenu(props) {
7929
7834
  }
7930
7835
  }
7931
7836
  ),
7932
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
7837
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
7933
7838
  LinkInputPopover,
7934
7839
  {
7935
7840
  defaultValue: (_a = state == null ? void 0 : state.imageSrc) != null ? _a : "",
@@ -7947,12 +7852,12 @@ function ImageBubbleMenu(props) {
7947
7852
  }
7948
7853
  },
7949
7854
  tooltip: "Source URL",
7950
- icon: import_lucide_react23.ImageDown,
7855
+ icon: import_lucide_react22.ImageDown,
7951
7856
  editor,
7952
7857
  isVariable: state.isSrcVariable
7953
7858
  }
7954
7859
  ),
7955
- state.isImageActive && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
7860
+ state.isImageActive && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
7956
7861
  LinkInputPopover,
7957
7862
  {
7958
7863
  defaultValue: (_b = state == null ? void 0 : state.imageExternalLink) != null ? _b : "",
@@ -7968,9 +7873,9 @@ function ImageBubbleMenu(props) {
7968
7873
  }
7969
7874
  )
7970
7875
  ] }),
7971
- state.isImageActive && state.imageSrc && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_jsx_runtime37.Fragment, { children: [
7972
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Divider, {}),
7973
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
7876
+ state.isImageActive && state.imageSrc && /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
7877
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Divider, {}),
7878
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
7974
7879
  Select,
7975
7880
  {
7976
7881
  label: "Border Radius",
@@ -7988,8 +7893,8 @@ function ImageBubbleMenu(props) {
7988
7893
  className: "mly:capitalize"
7989
7894
  }
7990
7895
  ),
7991
- /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "mly:flex mly:gap-x-0.5", children: [
7992
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
7896
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "mly:flex mly:gap-x-0.5", children: [
7897
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
7993
7898
  ImageSize,
7994
7899
  {
7995
7900
  dimension: "width",
@@ -8009,7 +7914,7 @@ function ImageBubbleMenu(props) {
8009
7914
  }
8010
7915
  }
8011
7916
  ),
8012
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
7917
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
8013
7918
  ImageSize,
8014
7919
  {
8015
7920
  dimension: "height",
@@ -8029,7 +7934,7 @@ function ImageBubbleMenu(props) {
8029
7934
  }
8030
7935
  }
8031
7936
  ),
8032
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
7937
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
8033
7938
  BubbleMenuButton,
8034
7939
  {
8035
7940
  isActive: () => lockAspectRatio,
@@ -8042,7 +7947,7 @@ function ImageBubbleMenu(props) {
8042
7947
  aspectRatio
8043
7948
  }).run();
8044
7949
  },
8045
- icon: lockAspectRatio ? import_lucide_react23.LockIcon : import_lucide_react23.LockOpenIcon,
7950
+ icon: lockAspectRatio ? import_lucide_react22.LockIcon : import_lucide_react22.LockOpenIcon,
8046
7951
  tooltip: "Lock Aspect Ratio"
8047
7952
  }
8048
7953
  )
@@ -8054,8 +7959,8 @@ function ImageBubbleMenu(props) {
8054
7959
  }
8055
7960
 
8056
7961
  // src/editor/components/inline-image-menu/inline-image-bubble-menu.tsx
8057
- var import_react34 = require("@tiptap/react");
8058
- var import_tippy5 = require("tippy.js");
7962
+ var import_react31 = require("@tiptap/react");
7963
+ var import_tippy4 = require("tippy.js");
8059
7964
 
8060
7965
  // src/editor/nodes/inline-image/inline-image.tsx
8061
7966
  var import_core8 = require("@tiptap/core");
@@ -8172,10 +8077,10 @@ var InlineImageExtension = import_core8.Node.create({
8172
8077
  });
8173
8078
 
8174
8079
  // src/editor/components/inline-image-menu/use-inline-image-state.tsx
8175
- var import_react33 = require("@tiptap/react");
8176
- var import_fast_deep_equal4 = __toESM(require("fast-deep-equal"), 1);
8080
+ var import_react30 = require("@tiptap/react");
8081
+ var import_fast_deep_equal3 = __toESM(require("fast-deep-equal"), 1);
8177
8082
  var useInlineImageState = (editor) => {
8178
- const states = (0, import_react33.useEditorState)({
8083
+ const states = (0, import_react30.useEditorState)({
8179
8084
  editor,
8180
8085
  selector: ({ editor: editor2 }) => {
8181
8086
  var _a, _b, _c, _d, _e, _f, _g, _h;
@@ -8188,14 +8093,14 @@ var useInlineImageState = (editor) => {
8188
8093
  isExternalLinkVariable: (_h = (_g = editor2.getAttributes("inlineImage")) == null ? void 0 : _g.isExternalLinkVariable) != null ? _h : false
8189
8094
  };
8190
8095
  },
8191
- equalityFn: import_fast_deep_equal4.default
8096
+ equalityFn: import_fast_deep_equal3.default
8192
8097
  });
8193
8098
  return states;
8194
8099
  };
8195
8100
 
8196
8101
  // src/editor/components/inline-image-menu/inline-image-bubble-menu.tsx
8197
- var import_lucide_react24 = require("lucide-react");
8198
- var import_jsx_runtime38 = require("react/jsx-runtime");
8102
+ var import_lucide_react23 = require("lucide-react");
8103
+ var import_jsx_runtime37 = require("react/jsx-runtime");
8199
8104
  function InlineImageBubbleMenu(props) {
8200
8105
  var _a, _b;
8201
8106
  const { editor, appendTo } = props;
@@ -8214,17 +8119,17 @@ function InlineImageBubbleMenu(props) {
8214
8119
  popperOptions: {
8215
8120
  modifiers: [{ name: "flip", enabled: false }]
8216
8121
  },
8217
- plugins: [import_tippy5.sticky],
8122
+ plugins: [import_tippy4.sticky],
8218
8123
  sticky: "popper",
8219
8124
  maxWidth: "100%"
8220
8125
  }
8221
8126
  });
8222
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
8223
- import_react34.BubbleMenu,
8127
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
8128
+ import_react31.BubbleMenu,
8224
8129
  __spreadProps(__spreadValues({}, bubbleMenuProps), {
8225
8130
  className: "mly:flex mly:rounded-lg mly:border mly:border-gray-200 mly:bg-white mly:p-0.5 mly:shadow-md",
8226
- children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "mly:flex mly:gap-x-0.5", children: [
8227
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
8131
+ children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "mly:flex mly:gap-x-0.5", children: [
8132
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
8228
8133
  LinkInputPopover,
8229
8134
  {
8230
8135
  defaultValue: (_a = state == null ? void 0 : state.src) != null ? _a : "",
@@ -8235,12 +8140,12 @@ function InlineImageBubbleMenu(props) {
8235
8140
  }).run();
8236
8141
  },
8237
8142
  tooltip: "Source URL",
8238
- icon: import_lucide_react24.ImageDownIcon,
8143
+ icon: import_lucide_react23.ImageDownIcon,
8239
8144
  editor,
8240
8145
  isVariable: state.isSrcVariable
8241
8146
  }
8242
8147
  ),
8243
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
8148
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
8244
8149
  LinkInputPopover,
8245
8150
  {
8246
8151
  defaultValue: (_b = state == null ? void 0 : state.imageExternalLink) != null ? _b : "",
@@ -8255,7 +8160,7 @@ function InlineImageBubbleMenu(props) {
8255
8160
  isVariable: state.isExternalLinkVariable
8256
8161
  }
8257
8162
  ),
8258
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
8163
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
8259
8164
  ImageSize,
8260
8165
  {
8261
8166
  dimension: "height",
@@ -8274,16 +8179,16 @@ function InlineImageBubbleMenu(props) {
8274
8179
  }
8275
8180
 
8276
8181
  // src/editor/components/repeat-menu/repeat-bubble-menu.tsx
8277
- var import_react36 = require("@tiptap/react");
8278
- var import_lucide_react25 = require("lucide-react");
8279
- var import_react37 = require("react");
8280
- var import_tippy6 = require("tippy.js");
8182
+ var import_react33 = require("@tiptap/react");
8183
+ var import_lucide_react24 = require("lucide-react");
8184
+ var import_react34 = require("react");
8185
+ var import_tippy5 = require("tippy.js");
8281
8186
 
8282
8187
  // src/editor/components/repeat-menu/use-repeat-state.ts
8283
- var import_react35 = require("@tiptap/react");
8284
- var import_fast_deep_equal5 = __toESM(require("fast-deep-equal"), 1);
8188
+ var import_react32 = require("@tiptap/react");
8189
+ var import_fast_deep_equal4 = __toESM(require("fast-deep-equal"), 1);
8285
8190
  var useRepeatState = (editor) => {
8286
- const states = (0, import_react35.useEditorState)({
8191
+ const states = (0, import_react32.useEditorState)({
8287
8192
  editor,
8288
8193
  selector: (ctx) => {
8289
8194
  var _a, _b;
@@ -8293,20 +8198,20 @@ var useRepeatState = (editor) => {
8293
8198
  isSectionActive: ctx.editor.isActive("section")
8294
8199
  };
8295
8200
  },
8296
- equalityFn: import_fast_deep_equal5.default
8201
+ equalityFn: import_fast_deep_equal4.default
8297
8202
  });
8298
8203
  return states;
8299
8204
  };
8300
8205
 
8301
8206
  // src/editor/components/repeat-menu/repeat-bubble-menu.tsx
8302
- var import_jsx_runtime39 = require("react/jsx-runtime");
8207
+ var import_jsx_runtime38 = require("react/jsx-runtime");
8303
8208
  function RepeatBubbleMenu(props) {
8304
8209
  const { appendTo, editor } = props;
8305
8210
  if (!editor) {
8306
8211
  return null;
8307
8212
  }
8308
8213
  const state = useRepeatState(editor);
8309
- const getReferenceClientRect = (0, import_react37.useCallback)(() => {
8214
+ const getReferenceClientRect = (0, import_react34.useCallback)(() => {
8310
8215
  const renderContainer = getRenderContainer(editor, "repeat");
8311
8216
  const rect = (renderContainer == null ? void 0 : renderContainer.getBoundingClientRect()) || new DOMRect(-1e3, -1e3, 0, 0);
8312
8217
  return rect;
@@ -8315,7 +8220,7 @@ function RepeatBubbleMenu(props) {
8315
8220
  shouldShow: ({ editor: editor2 }) => {
8316
8221
  var _a;
8317
8222
  const activeForNode = getClosestNodeByName(editor2, "repeat");
8318
- const sectionNodeChildren = activeForNode ? (_a = (0, import_react36.findChildren)(activeForNode == null ? void 0 : activeForNode.node, (node) => {
8223
+ const sectionNodeChildren = activeForNode ? (_a = (0, import_react33.findChildren)(activeForNode == null ? void 0 : activeForNode.node, (node) => {
8319
8224
  return node.type.name === "section";
8320
8225
  })) == null ? void 0 : _a[0] : null;
8321
8226
  const hasActiveSectionNodeChildren = sectionNodeChildren && editor2.isActive("section");
@@ -8331,7 +8236,7 @@ function RepeatBubbleMenu(props) {
8331
8236
  },
8332
8237
  getReferenceClientRect,
8333
8238
  appendTo: () => appendTo == null ? void 0 : appendTo.current,
8334
- plugins: [import_tippy6.sticky],
8239
+ plugins: [import_tippy5.sticky],
8335
8240
  sticky: "popper",
8336
8241
  maxWidth: "auto"
8337
8242
  },
@@ -8340,10 +8245,10 @@ function RepeatBubbleMenu(props) {
8340
8245
  const opts = useVariableOptions(editor);
8341
8246
  const variables = opts == null ? void 0 : opts.variables;
8342
8247
  const renderVariable = opts == null ? void 0 : opts.renderVariable;
8343
- const inputRef = (0, import_react37.useRef)(null);
8344
- const [isUpdatingKey, setIsUpdatingKey] = (0, import_react37.useState)(false);
8248
+ const inputRef = (0, import_react34.useRef)(null);
8249
+ const [isUpdatingKey, setIsUpdatingKey] = (0, import_react34.useState)(false);
8345
8250
  const eachKey = (state == null ? void 0 : state.each) || "";
8346
- const autoCompleteOptions = (0, import_react37.useMemo)(() => {
8251
+ const autoCompleteOptions = (0, import_react34.useMemo)(() => {
8347
8252
  return processVariables(variables, {
8348
8253
  query: eachKey || "",
8349
8254
  editor,
@@ -8351,21 +8256,21 @@ function RepeatBubbleMenu(props) {
8351
8256
  }).map((variable) => variable.name);
8352
8257
  }, [variables, eachKey, editor]);
8353
8258
  const isValidEachKey = eachKey;
8354
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
8355
- import_react36.BubbleMenu,
8259
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
8260
+ import_react33.BubbleMenu,
8356
8261
  __spreadProps(__spreadValues({}, bubbleMenuProps), {
8357
8262
  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",
8358
- children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(TooltipProvider, { children: [
8359
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "mly:flex mly:items-center mly:gap-1.5 mly:px-1.5 mly:text-sm mly:leading-none", children: [
8263
+ children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(TooltipProvider, { children: [
8264
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "mly:flex mly:items-center mly:gap-1.5 mly:px-1.5 mly:text-sm mly:leading-none", children: [
8360
8265
  "Repeat",
8361
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(Tooltip, { children: [
8362
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(TooltipTrigger, { children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
8363
- import_lucide_react25.InfoIcon,
8266
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Tooltip, { children: [
8267
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(TooltipTrigger, { children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
8268
+ import_lucide_react24.InfoIcon,
8364
8269
  {
8365
8270
  className: cn("mly:size-3 mly:stroke-[2.5] mly:text-gray-500")
8366
8271
  }
8367
8272
  ) }),
8368
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
8273
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
8369
8274
  TooltipContent,
8370
8275
  {
8371
8276
  sideOffset: 14,
@@ -8376,7 +8281,7 @@ function RepeatBubbleMenu(props) {
8376
8281
  )
8377
8282
  ] })
8378
8283
  ] }),
8379
- !isUpdatingKey && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
8284
+ !isUpdatingKey && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
8380
8285
  "button",
8381
8286
  {
8382
8287
  onClick: () => {
@@ -8397,7 +8302,7 @@ function RepeatBubbleMenu(props) {
8397
8302
  })
8398
8303
  }
8399
8304
  ),
8400
- isUpdatingKey && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
8305
+ isUpdatingKey && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
8401
8306
  "form",
8402
8307
  {
8403
8308
  onSubmit: (e) => {
@@ -8409,7 +8314,7 @@ function RepeatBubbleMenu(props) {
8409
8314
  setIsUpdatingKey(false);
8410
8315
  }
8411
8316
  },
8412
- children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
8317
+ children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
8413
8318
  InputAutocomplete,
8414
8319
  {
8415
8320
  editor,
@@ -8435,8 +8340,8 @@ function RepeatBubbleMenu(props) {
8435
8340
  )
8436
8341
  }
8437
8342
  ),
8438
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Divider, {}),
8439
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
8343
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Divider, {}),
8344
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
8440
8345
  ShowPopover,
8441
8346
  {
8442
8347
  showIfKey: state.currentShowIfKey,
@@ -8454,16 +8359,16 @@ function RepeatBubbleMenu(props) {
8454
8359
  }
8455
8360
 
8456
8361
  // src/editor/components/section-menu/section-bubble-menu.tsx
8457
- var import_react39 = require("@tiptap/react");
8458
- var import_lucide_react26 = require("lucide-react");
8459
- var import_react40 = require("react");
8460
- var import_tippy7 = require("tippy.js");
8362
+ var import_react36 = require("@tiptap/react");
8363
+ var import_lucide_react25 = require("lucide-react");
8364
+ var import_react37 = require("react");
8365
+ var import_tippy6 = require("tippy.js");
8461
8366
 
8462
8367
  // src/editor/components/icons/border-color.tsx
8463
- var import_jsx_runtime40 = require("react/jsx-runtime");
8368
+ var import_jsx_runtime39 = require("react/jsx-runtime");
8464
8369
  function BorderColor(props) {
8465
8370
  const _a = props, { topBarClassName } = _a, rest = __objRest(_a, ["topBarClassName"]);
8466
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
8371
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
8467
8372
  "svg",
8468
8373
  __spreadProps(__spreadValues({
8469
8374
  width: 11,
@@ -8473,8 +8378,8 @@ function BorderColor(props) {
8473
8378
  xmlns: "http://www.w3.org/2000/svg"
8474
8379
  }, rest), {
8475
8380
  children: [
8476
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("path", { d: "M0 11H10.6667", stroke: "currentColor", strokeWidth: "1.5" }),
8477
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
8381
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("path", { d: "M0 11H10.6667", stroke: "currentColor", strokeWidth: "1.5" }),
8382
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
8478
8383
  "path",
8479
8384
  {
8480
8385
  d: "M0.666504 9V6.33333C0.666504 3.38781 3.05432 1 5.99984 1H10.6665",
@@ -8488,9 +8393,9 @@ function BorderColor(props) {
8488
8393
  }
8489
8394
 
8490
8395
  // src/editor/components/icons/margin-icon.tsx
8491
- var import_jsx_runtime41 = require("react/jsx-runtime");
8396
+ var import_jsx_runtime40 = require("react/jsx-runtime");
8492
8397
  function MarginIcon(props) {
8493
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
8398
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
8494
8399
  "svg",
8495
8400
  __spreadProps(__spreadValues({
8496
8401
  width: 12,
@@ -8499,7 +8404,7 @@ function MarginIcon(props) {
8499
8404
  fill: "none",
8500
8405
  xmlns: "http://www.w3.org/2000/svg"
8501
8406
  }, props), {
8502
- children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
8407
+ children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
8503
8408
  "path",
8504
8409
  {
8505
8410
  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",
@@ -8513,9 +8418,9 @@ function MarginIcon(props) {
8513
8418
  }
8514
8419
 
8515
8420
  // src/editor/components/icons/padding-icon.tsx
8516
- var import_jsx_runtime42 = require("react/jsx-runtime");
8421
+ var import_jsx_runtime41 = require("react/jsx-runtime");
8517
8422
  function PaddingIcon(props) {
8518
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
8423
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
8519
8424
  "svg",
8520
8425
  __spreadProps(__spreadValues({
8521
8426
  width: 10,
@@ -8524,7 +8429,7 @@ function PaddingIcon(props) {
8524
8429
  fill: "none",
8525
8430
  xmlns: "http://www.w3.org/2000/svg"
8526
8431
  }, props), {
8527
- children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
8432
+ children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
8528
8433
  "path",
8529
8434
  {
8530
8435
  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",
@@ -8539,7 +8444,7 @@ function PaddingIcon(props) {
8539
8444
 
8540
8445
  // src/editor/components/ui/color-picker.tsx
8541
8446
  var import_react_colorful = require("react-colorful");
8542
- var import_jsx_runtime43 = require("react/jsx-runtime");
8447
+ var import_jsx_runtime42 = require("react/jsx-runtime");
8543
8448
  function ColorPicker(props) {
8544
8449
  const {
8545
8450
  color,
@@ -8557,14 +8462,14 @@ function ColorPicker(props) {
8557
8462
  onColorChange(color2);
8558
8463
  });
8559
8464
  };
8560
- const popoverButton = /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(PopoverTrigger, { asChild: true, children: children || /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
8465
+ const popoverButton = /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(PopoverTrigger, { asChild: true, children: children || /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
8561
8466
  BaseButton,
8562
8467
  {
8563
8468
  variant: "ghost",
8564
8469
  className: "mly:h-7 mly:w-7 mly:shrink-0",
8565
8470
  size: "sm",
8566
8471
  type: "button",
8567
- children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
8472
+ children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
8568
8473
  "div",
8569
8474
  {
8570
8475
  className: cn(
@@ -8578,7 +8483,7 @@ function ColorPicker(props) {
8578
8483
  )
8579
8484
  }
8580
8485
  ) });
8581
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
8486
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
8582
8487
  Popover,
8583
8488
  {
8584
8489
  onOpenChange: (open) => {
@@ -8587,17 +8492,17 @@ function ColorPicker(props) {
8587
8492
  }
8588
8493
  },
8589
8494
  children: [
8590
- tooltip ? /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Tooltip, { children: [
8591
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(TooltipTrigger, { asChild: true, children: popoverButton }),
8592
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(TooltipContent, { sideOffset: 8, children: tooltip })
8495
+ tooltip ? /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Tooltip, { children: [
8496
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(TooltipTrigger, { asChild: true, children: popoverButton }),
8497
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(TooltipContent, { sideOffset: 8, children: tooltip })
8593
8498
  ] }) : popoverButton,
8594
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
8499
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
8595
8500
  PopoverContent,
8596
8501
  {
8597
8502
  className: "mly:w-full mly:rounded-none mly:border-0 mly:bg-transparent! mly:p-0! mly:shadow-none mly:drop-shadow-md",
8598
8503
  sideOffset: 8,
8599
- children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "mly:min-w-[260px] mly:rounded-xl mly:border mly:border-gray-200 mly:bg-white mly:p-4", children: [
8600
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
8504
+ children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "mly:min-w-[260px] mly:rounded-xl mly:border mly:border-gray-200 mly:bg-white mly:p-4", children: [
8505
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
8601
8506
  import_react_colorful.HexColorPicker,
8602
8507
  {
8603
8508
  color,
@@ -8605,7 +8510,7 @@ function ColorPicker(props) {
8605
8510
  className: "mly:flex mly:w-full! mly:flex-col mly:gap-4"
8606
8511
  }
8607
8512
  ),
8608
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
8513
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
8609
8514
  import_react_colorful.HexColorInput,
8610
8515
  {
8611
8516
  alpha: true,
@@ -8615,10 +8520,10 @@ function ColorPicker(props) {
8615
8520
  prefixed: true
8616
8521
  }
8617
8522
  ),
8618
- suggestedColors.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { children: [
8619
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "-mly:mx-4 mly:my-4 mly:h-px mly:bg-gray-200" }),
8620
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("h2", { className: "mly:text-xs mly:text-gray-500", children: "Recently used" }),
8621
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "mly:mt-2 mly:flex mly:flex-wrap mly:gap-0.5", children: suggestedColors.map((suggestedColor) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
8523
+ suggestedColors.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { children: [
8524
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "-mly:mx-4 mly:my-4 mly:h-px mly:bg-gray-200" }),
8525
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("h2", { className: "mly:text-xs mly:text-gray-500", children: "Recently used" }),
8526
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "mly:mt-2 mly:flex mly:flex-wrap mly:gap-0.5", children: suggestedColors.map((suggestedColor) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
8622
8527
  BaseButton,
8623
8528
  {
8624
8529
  variant: "ghost",
@@ -8626,7 +8531,7 @@ function ColorPicker(props) {
8626
8531
  className: "!mly:size-7 mly:shrink-0",
8627
8532
  type: "button",
8628
8533
  onClick: () => handleColorChange(suggestedColor),
8629
- children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
8534
+ children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
8630
8535
  "div",
8631
8536
  {
8632
8537
  className: "mly:h-4 mly:w-4 mly:shrink-0 mly:rounded",
@@ -8648,10 +8553,10 @@ function ColorPicker(props) {
8648
8553
  }
8649
8554
 
8650
8555
  // src/editor/components/section-menu/use-section-state.tsx
8651
- var import_react38 = require("@tiptap/react");
8652
- var import_fast_deep_equal6 = __toESM(require("fast-deep-equal"), 1);
8556
+ var import_react35 = require("@tiptap/react");
8557
+ var import_fast_deep_equal5 = __toESM(require("fast-deep-equal"), 1);
8653
8558
  var useSectionState = (editor) => {
8654
- const states = (0, import_react38.useEditorState)({
8559
+ const states = (0, import_react35.useEditorState)({
8655
8560
  editor,
8656
8561
  selector: (ctx) => {
8657
8562
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
@@ -8673,19 +8578,19 @@ var useSectionState = (editor) => {
8673
8578
  currentShowIfKey: ((_n = ctx.editor.getAttributes("section")) == null ? void 0 : _n.showIfKey) || ""
8674
8579
  };
8675
8580
  },
8676
- equalityFn: import_fast_deep_equal6.default
8581
+ equalityFn: import_fast_deep_equal5.default
8677
8582
  });
8678
8583
  return states;
8679
8584
  };
8680
8585
 
8681
8586
  // src/editor/components/section-menu/section-bubble-menu.tsx
8682
- var import_jsx_runtime44 = require("react/jsx-runtime");
8587
+ var import_jsx_runtime43 = require("react/jsx-runtime");
8683
8588
  function SectionBubbleMenu(props) {
8684
8589
  const { appendTo, editor } = props;
8685
8590
  if (!editor) {
8686
8591
  return null;
8687
8592
  }
8688
- const getReferenceClientRect = (0, import_react40.useCallback)(() => {
8593
+ const getReferenceClientRect = (0, import_react37.useCallback)(() => {
8689
8594
  const renderContainer = getRenderContainer(editor, "section");
8690
8595
  const rect = (renderContainer == null ? void 0 : renderContainer.getBoundingClientRect()) || new DOMRect(-1e3, -1e3, 0, 0);
8691
8596
  return rect;
@@ -8694,10 +8599,10 @@ function SectionBubbleMenu(props) {
8694
8599
  shouldShow: ({ editor: editor2 }) => {
8695
8600
  var _a, _b;
8696
8601
  const activeSectionNode = getClosestNodeByName(editor2, "section");
8697
- const repeatNodeChildren = activeSectionNode ? (_a = (0, import_react39.findChildren)(activeSectionNode == null ? void 0 : activeSectionNode.node, (node) => {
8602
+ const repeatNodeChildren = activeSectionNode ? (_a = (0, import_react36.findChildren)(activeSectionNode == null ? void 0 : activeSectionNode.node, (node) => {
8698
8603
  return node.type.name === "repeat";
8699
8604
  })) == null ? void 0 : _a[0] : null;
8700
- const inlineImageNodeChildren = activeSectionNode ? (_b = (0, import_react39.findChildren)(activeSectionNode == null ? void 0 : activeSectionNode.node, (node) => {
8605
+ const inlineImageNodeChildren = activeSectionNode ? (_b = (0, import_react36.findChildren)(activeSectionNode == null ? void 0 : activeSectionNode.node, (node) => {
8701
8606
  return node.type.name === "inlineImage";
8702
8607
  })) == null ? void 0 : _b[0] : null;
8703
8608
  const hasActiveRepeatNodeChildren = repeatNodeChildren && editor2.isActive("repeat");
@@ -8714,7 +8619,7 @@ function SectionBubbleMenu(props) {
8714
8619
  },
8715
8620
  getReferenceClientRect,
8716
8621
  appendTo: () => appendTo == null ? void 0 : appendTo.current,
8717
- plugins: [import_tippy7.sticky],
8622
+ plugins: [import_tippy6.sticky],
8718
8623
  sticky: "popper",
8719
8624
  maxWidth: "auto"
8720
8625
  },
@@ -8726,12 +8631,12 @@ function SectionBubbleMenu(props) {
8726
8631
  { value: "6", label: "Smooth" },
8727
8632
  { value: "9999", label: "Round" }
8728
8633
  ];
8729
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
8730
- import_react39.BubbleMenu,
8634
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
8635
+ import_react36.BubbleMenu,
8731
8636
  __spreadProps(__spreadValues({}, bubbleMenuProps), {
8732
8637
  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",
8733
- children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(TooltipProvider, { children: [
8734
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
8638
+ children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(TooltipProvider, { children: [
8639
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
8735
8640
  AlignmentSwitch,
8736
8641
  {
8737
8642
  alignment: state.currentAlignment,
@@ -8743,9 +8648,9 @@ function SectionBubbleMenu(props) {
8743
8648
  }
8744
8649
  }
8745
8650
  ),
8746
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Divider, {}),
8747
- /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "mly:flex mly:gap-x-0.5", children: [
8748
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
8651
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Divider, {}),
8652
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "mly:flex mly:gap-x-0.5", children: [
8653
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
8749
8654
  Select,
8750
8655
  {
8751
8656
  label: "Border Radius",
@@ -8761,7 +8666,7 @@ function SectionBubbleMenu(props) {
8761
8666
  className: "mly:capitalize"
8762
8667
  }
8763
8668
  ),
8764
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
8669
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
8765
8670
  Select,
8766
8671
  {
8767
8672
  label: "Border Width",
@@ -8783,8 +8688,8 @@ function SectionBubbleMenu(props) {
8783
8688
  }
8784
8689
  )
8785
8690
  ] }),
8786
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Divider, {}),
8787
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
8691
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Divider, {}),
8692
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
8788
8693
  Select,
8789
8694
  {
8790
8695
  icon: MarginIcon,
@@ -8812,8 +8717,8 @@ function SectionBubbleMenu(props) {
8812
8717
  className: "mly:capitalize"
8813
8718
  }
8814
8719
  ),
8815
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Divider, {}),
8816
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
8720
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Divider, {}),
8721
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
8817
8722
  Select,
8818
8723
  {
8819
8724
  icon: PaddingIcon,
@@ -8841,9 +8746,9 @@ function SectionBubbleMenu(props) {
8841
8746
  className: "mly:capitalize"
8842
8747
  }
8843
8748
  ),
8844
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Divider, {}),
8845
- /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "mly:flex mly:gap-x-0.5", children: [
8846
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
8749
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Divider, {}),
8750
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "mly:flex mly:gap-x-0.5", children: [
8751
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
8847
8752
  ColorPicker,
8848
8753
  {
8849
8754
  color: state.currentBorderColor,
@@ -8854,14 +8759,14 @@ function SectionBubbleMenu(props) {
8854
8759
  });
8855
8760
  },
8856
8761
  tooltip: "Border Color",
8857
- children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
8762
+ children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
8858
8763
  BaseButton,
8859
8764
  {
8860
8765
  variant: "ghost",
8861
8766
  className: "mly:h-7 mly:w-7 mly:shrink-0",
8862
8767
  size: "sm",
8863
8768
  type: "button",
8864
- children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
8769
+ children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
8865
8770
  BorderColor,
8866
8771
  {
8867
8772
  className: "mly:size-3 mly:shrink-0",
@@ -8875,7 +8780,7 @@ function SectionBubbleMenu(props) {
8875
8780
  )
8876
8781
  }
8877
8782
  ),
8878
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
8783
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
8879
8784
  ColorPicker,
8880
8785
  {
8881
8786
  color: state.currentBackgroundColor,
@@ -8891,25 +8796,25 @@ function SectionBubbleMenu(props) {
8891
8796
  }
8892
8797
  )
8893
8798
  ] }),
8894
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Divider, {}),
8895
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
8799
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Divider, {}),
8800
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
8896
8801
  BubbleMenuButton,
8897
8802
  {
8898
- icon: import_lucide_react26.Trash,
8803
+ icon: import_lucide_react25.Trash,
8899
8804
  tooltip: "Delete Section",
8900
8805
  command: () => {
8901
8806
  deleteNode(editor, "section");
8902
8807
  }
8903
8808
  }
8904
8809
  ),
8905
- state.isColumnsActive && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_jsx_runtime44.Fragment, { children: [
8906
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Divider, {}),
8907
- /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Popover, { children: [
8908
- /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(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: [
8810
+ state.isColumnsActive && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_jsx_runtime43.Fragment, { children: [
8811
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Divider, {}),
8812
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Popover, { children: [
8813
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(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: [
8909
8814
  "Column",
8910
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_lucide_react26.ChevronUp, { className: "mly:h-3 mly:w-3" })
8815
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_lucide_react25.ChevronUp, { className: "mly:h-3 mly:w-3" })
8911
8816
  ] }),
8912
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
8817
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
8913
8818
  PopoverContent,
8914
8819
  {
8915
8820
  className: "mly:w-max mly:rounded-lg mly:p-0.5!",
@@ -8922,7 +8827,7 @@ function SectionBubbleMenu(props) {
8922
8827
  onCloseAutoFocus: (e) => {
8923
8828
  e.preventDefault();
8924
8829
  },
8925
- children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(ColumnsBubbleMenuContent, { editor })
8830
+ children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(ColumnsBubbleMenuContent, { editor })
8926
8831
  }
8927
8832
  )
8928
8833
  ] })
@@ -8933,13 +8838,13 @@ function SectionBubbleMenu(props) {
8933
8838
  }
8934
8839
 
8935
8840
  // src/editor/components/spacer-menu/spacer-bubble-menu.tsx
8936
- var import_react42 = require("@tiptap/react");
8841
+ var import_react39 = require("@tiptap/react");
8937
8842
 
8938
8843
  // src/editor/components/spacer-menu/use-spacer-state.ts
8939
- var import_react41 = require("@tiptap/react");
8940
- var import_fast_deep_equal7 = __toESM(require("fast-deep-equal"), 1);
8844
+ var import_react38 = require("@tiptap/react");
8845
+ var import_fast_deep_equal6 = __toESM(require("fast-deep-equal"), 1);
8941
8846
  var useSpacerState = (editor) => {
8942
- const states = (0, import_react41.useEditorState)({
8847
+ const states = (0, import_react38.useEditorState)({
8943
8848
  editor,
8944
8849
  selector: (ctx) => {
8945
8850
  var _a;
@@ -8947,20 +8852,20 @@ var useSpacerState = (editor) => {
8947
8852
  currentShowIfKey: ((_a = ctx.editor.getAttributes("spacer")) == null ? void 0 : _a.showIfKey) || ""
8948
8853
  };
8949
8854
  },
8950
- equalityFn: import_fast_deep_equal7.default
8855
+ equalityFn: import_fast_deep_equal6.default
8951
8856
  });
8952
8857
  return states;
8953
8858
  };
8954
8859
 
8955
8860
  // src/editor/components/spacer-menu/spacer-bubble-menu.tsx
8956
- var import_react43 = require("react");
8957
- var import_jsx_runtime45 = require("react/jsx-runtime");
8861
+ var import_react40 = require("react");
8862
+ var import_jsx_runtime44 = require("react/jsx-runtime");
8958
8863
  function SpacerBubbleMenu(props) {
8959
8864
  const { editor, appendTo } = props;
8960
8865
  if (!editor) {
8961
8866
  return null;
8962
8867
  }
8963
- const items = (0, import_react43.useMemo)(
8868
+ const items = (0, import_react40.useMemo)(
8964
8869
  () => spacing.map((space) => {
8965
8870
  const { value: height, short: name } = space;
8966
8871
  return {
@@ -8986,11 +8891,11 @@ function SpacerBubbleMenu(props) {
8986
8891
  }
8987
8892
  });
8988
8893
  const state = useSpacerState(editor);
8989
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
8990
- import_react42.BubbleMenu,
8894
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
8895
+ import_react39.BubbleMenu,
8991
8896
  __spreadProps(__spreadValues({}, bubbleMenuProps), {
8992
8897
  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",
8993
- children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(TooltipProvider, { children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
8898
+ children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(TooltipProvider, { children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
8994
8899
  BubbleMenuButton,
8995
8900
  __spreadValues({
8996
8901
  className: "!mly:h-7 mly:w-7 mly:shrink-0 mly:p-0",
@@ -9224,18 +9129,18 @@ var Spacer = import_core12.Node.create({
9224
9129
 
9225
9130
  // src/editor/extensions/link-card.ts
9226
9131
  var import_core13 = require("@tiptap/core");
9227
- var import_react45 = require("@tiptap/react");
9132
+ var import_react42 = require("@tiptap/react");
9228
9133
 
9229
9134
  // src/editor/nodes/link-card.tsx
9230
- var import_react44 = require("@tiptap/react");
9135
+ var import_react41 = require("@tiptap/react");
9231
9136
 
9232
9137
  // src/editor/components/input.tsx
9233
9138
  var React5 = __toESM(require("react"), 1);
9234
- var import_jsx_runtime46 = require("react/jsx-runtime");
9139
+ var import_jsx_runtime45 = require("react/jsx-runtime");
9235
9140
  var Input = React5.forwardRef(
9236
9141
  (_a, ref) => {
9237
9142
  var _b = _a, { className, type } = _b, props = __objRest(_b, ["className", "type"]);
9238
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
9143
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
9239
9144
  "input",
9240
9145
  __spreadValues(__spreadProps(__spreadValues({}, AUTOCOMPLETE_PASSWORD_MANAGERS_OFF), {
9241
9146
  type,
@@ -9253,11 +9158,11 @@ Input.displayName = "Input";
9253
9158
 
9254
9159
  // src/editor/components/textarea.tsx
9255
9160
  var React6 = __toESM(require("react"), 1);
9256
- var import_jsx_runtime47 = require("react/jsx-runtime");
9161
+ var import_jsx_runtime46 = require("react/jsx-runtime");
9257
9162
  var Textarea = React6.forwardRef(
9258
9163
  (_a, ref) => {
9259
9164
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
9260
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
9165
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
9261
9166
  "textarea",
9262
9167
  __spreadValues({
9263
9168
  className: cn(
@@ -9273,18 +9178,18 @@ var Textarea = React6.forwardRef(
9273
9178
  Textarea.displayName = "Textarea";
9274
9179
 
9275
9180
  // src/editor/nodes/link-card.tsx
9276
- var import_jsx_runtime48 = require("react/jsx-runtime");
9181
+ var import_jsx_runtime47 = require("react/jsx-runtime");
9277
9182
  function LinkCardComponent(props) {
9278
9183
  const { title, description, link, linkTitle, image: image2, badgeText, subTitle } = props.node.attrs;
9279
9184
  const { getPos, editor } = props;
9280
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
9281
- import_react44.NodeViewWrapper,
9185
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
9186
+ import_react41.NodeViewWrapper,
9282
9187
  {
9283
9188
  className: `react-component ${props.selected && "ProseMirror-selectednode"}`,
9284
9189
  draggable: editor.isEditable,
9285
9190
  "data-drag-handle": editor.isEditable,
9286
- children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Popover, { open: props.selected, children: [
9287
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
9191
+ children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Popover, { open: props.selected, children: [
9192
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
9288
9193
  "div",
9289
9194
  {
9290
9195
  tabIndex: -1,
@@ -9293,8 +9198,8 @@ function LinkCardComponent(props) {
9293
9198
  const pos = getPos();
9294
9199
  editor.commands.setNodeSelection(pos);
9295
9200
  },
9296
- children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "mly:no-prose mly:flex mly:flex-col mly:rounded-lg mly:border mly:border-gray-300", children: [
9297
- image2 && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "mly:relative mly:mb-1.5 mly:w-full mly:shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
9201
+ children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "mly:no-prose mly:flex mly:flex-col mly:rounded-lg mly:border mly:border-gray-300", children: [
9202
+ image2 && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "mly:relative mly:mb-1.5 mly:w-full mly:shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
9298
9203
  "img",
9299
9204
  {
9300
9205
  src: image2,
@@ -9303,23 +9208,23 @@ function LinkCardComponent(props) {
9303
9208
  draggable: editor.isEditable
9304
9209
  }
9305
9210
  ) }),
9306
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "mly:flex mly:items-stretch mly:p-3", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: cn("mly:flex mly:flex-col"), children: [
9307
- /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "!mly:mb-1.5 mly:flex mly:items-center mly:gap-1.5", children: [
9308
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("h2", { className: "!mly:mb-0 mly:text-lg! mly:font-semibold", children: title }),
9309
- badgeText && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("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 }),
9211
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "mly:flex mly:items-stretch mly:p-3", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: cn("mly:flex mly:flex-col"), children: [
9212
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "!mly:mb-1.5 mly:flex mly:items-center mly:gap-1.5", children: [
9213
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("h2", { className: "!mly:mb-0 mly:text-lg! mly:font-semibold", children: title }),
9214
+ badgeText && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("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 }),
9310
9215
  " ",
9311
- subTitle && !badgeText && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "!mly:font-base mly:font-regular mly:rounded-md mly:leading-none mly:text-gray-400 text-xs", children: subTitle })
9216
+ subTitle && !badgeText && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "!mly:font-base mly:font-regular mly:rounded-md mly:leading-none mly:text-gray-400 text-xs", children: subTitle })
9312
9217
  ] }),
9313
- /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("p", { className: "!mly:my-0 mly:text-base! mly:text-gray-500", children: [
9218
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("p", { className: "!mly:my-0 mly:text-base! mly:text-gray-500", children: [
9314
9219
  description,
9315
9220
  " ",
9316
- linkTitle ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("a", { href: link, className: "mly:font-semibold", children: linkTitle }) : null
9221
+ linkTitle ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("a", { href: link, className: "mly:font-semibold", children: linkTitle }) : null
9317
9222
  ] })
9318
9223
  ] }) })
9319
9224
  ] })
9320
9225
  }
9321
9226
  ) }),
9322
- /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
9227
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
9323
9228
  PopoverContent,
9324
9229
  {
9325
9230
  align: "end",
@@ -9328,9 +9233,9 @@ function LinkCardComponent(props) {
9328
9233
  onOpenAutoFocus: (e) => e.preventDefault(),
9329
9234
  onCloseAutoFocus: (e) => e.preventDefault(),
9330
9235
  children: [
9331
- /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("label", { className: "mly:w-full mly:space-y-1", children: [
9332
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "mly:text-xs mly:font-normal mly:text-slate-400", children: "Image" }),
9333
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
9236
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("label", { className: "mly:w-full mly:space-y-1", children: [
9237
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "mly:text-xs mly:font-normal mly:text-slate-400", children: "Image" }),
9238
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
9334
9239
  Input,
9335
9240
  {
9336
9241
  placeholder: "Add Image",
@@ -9344,9 +9249,9 @@ function LinkCardComponent(props) {
9344
9249
  }
9345
9250
  )
9346
9251
  ] }),
9347
- /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("label", { className: "mly:w-full mly:space-y-1", children: [
9348
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "mly:text-xs mly:font-normal mly:text-slate-400", children: "Title" }),
9349
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
9252
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("label", { className: "mly:w-full mly:space-y-1", children: [
9253
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "mly:text-xs mly:font-normal mly:text-slate-400", children: "Title" }),
9254
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
9350
9255
  Input,
9351
9256
  {
9352
9257
  placeholder: "Add title",
@@ -9359,9 +9264,9 @@ function LinkCardComponent(props) {
9359
9264
  }
9360
9265
  )
9361
9266
  ] }),
9362
- /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("label", { className: "mly:w-full mly:space-y-1", children: [
9363
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "mly:text-xs mly:font-normal mly:text-slate-400", children: "Description" }),
9364
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
9267
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("label", { className: "mly:w-full mly:space-y-1", children: [
9268
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "mly:text-xs mly:font-normal mly:text-slate-400", children: "Description" }),
9269
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
9365
9270
  Textarea,
9366
9271
  {
9367
9272
  placeholder: "Add description here",
@@ -9374,10 +9279,10 @@ function LinkCardComponent(props) {
9374
9279
  }
9375
9280
  )
9376
9281
  ] }),
9377
- /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "mly:grid mly:grid-cols-2 mly:gap-2", children: [
9378
- /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("label", { className: "mly:w-full mly:space-y-1", children: [
9379
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "mly:text-xs mly:font-normal mly:text-slate-400", children: "Link Title" }),
9380
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
9282
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "mly:grid mly:grid-cols-2 mly:gap-2", children: [
9283
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("label", { className: "mly:w-full mly:space-y-1", children: [
9284
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "mly:text-xs mly:font-normal mly:text-slate-400", children: "Link Title" }),
9285
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
9381
9286
  Input,
9382
9287
  {
9383
9288
  placeholder: "Add link title here",
@@ -9390,9 +9295,9 @@ function LinkCardComponent(props) {
9390
9295
  }
9391
9296
  )
9392
9297
  ] }),
9393
- /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("label", { className: "mly:w-full mly:space-y-1", children: [
9394
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "mly:text-xs mly:font-normal mly:text-slate-400", children: "Link" }),
9395
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
9298
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("label", { className: "mly:w-full mly:space-y-1", children: [
9299
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "mly:text-xs mly:font-normal mly:text-slate-400", children: "Link" }),
9300
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
9396
9301
  Input,
9397
9302
  {
9398
9303
  placeholder: "Add link here",
@@ -9406,10 +9311,10 @@ function LinkCardComponent(props) {
9406
9311
  )
9407
9312
  ] })
9408
9313
  ] }),
9409
- /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "mly:grid mly:grid-cols-2 mly:gap-2", children: [
9410
- /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("label", { className: "mly:w-full mly:space-y-1", children: [
9411
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "mly:text-xs mly:font-normal mly:text-slate-400", children: "Badge Text" }),
9412
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
9314
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "mly:grid mly:grid-cols-2 mly:gap-2", children: [
9315
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("label", { className: "mly:w-full mly:space-y-1", children: [
9316
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "mly:text-xs mly:font-normal mly:text-slate-400", children: "Badge Text" }),
9317
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
9413
9318
  Input,
9414
9319
  {
9415
9320
  placeholder: "Add badge text here",
@@ -9422,9 +9327,9 @@ function LinkCardComponent(props) {
9422
9327
  }
9423
9328
  )
9424
9329
  ] }),
9425
- /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("label", { className: "mly:w-full mly:space-y-1", children: [
9426
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "mly:text-xs mly:font-normal mly:text-slate-400", children: "Sub Title" }),
9427
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
9330
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("label", { className: "mly:w-full mly:space-y-1", children: [
9331
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "mly:text-xs mly:font-normal mly:text-slate-400", children: "Sub Title" }),
9332
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
9428
9333
  Input,
9429
9334
  {
9430
9335
  placeholder: "Add sub title here",
@@ -9511,7 +9416,7 @@ var LinkCardExtension = import_core13.Node.create({
9511
9416
  };
9512
9417
  },
9513
9418
  addNodeView() {
9514
- return (0, import_react45.ReactNodeViewRenderer)(LinkCardComponent, {
9419
+ return (0, import_react42.ReactNodeViewRenderer)(LinkCardComponent, {
9515
9420
  className: "mly:relative"
9516
9421
  });
9517
9422
  }
@@ -9519,26 +9424,26 @@ var LinkCardExtension = import_core13.Node.create({
9519
9424
 
9520
9425
  // src/editor/nodes/button/button.tsx
9521
9426
  var import_core14 = require("@tiptap/core");
9522
- var import_react49 = require("@tiptap/react");
9427
+ var import_react46 = require("@tiptap/react");
9523
9428
 
9524
9429
  // src/editor/nodes/button/button-view.tsx
9525
- var import_react47 = require("@tiptap/react");
9526
- var import_react48 = require("react");
9430
+ var import_react44 = require("@tiptap/react");
9431
+ var import_react45 = require("react");
9527
9432
 
9528
9433
  // src/editor/nodes/button/button-label-input.tsx
9529
- var import_react46 = require("react");
9530
- var import_jsx_runtime49 = require("react/jsx-runtime");
9434
+ var import_react43 = require("react");
9435
+ var import_jsx_runtime48 = require("react/jsx-runtime");
9531
9436
  function ButtonLabelInput(props) {
9532
9437
  var _a, _b;
9533
9438
  const { value, onValueChange, isVariable, editor } = props;
9534
- const linkInputRef = (0, import_react46.useRef)(null);
9535
- const [isEditing, setIsEditing] = (0, import_react46.useState)(!isVariable);
9439
+ const linkInputRef = (0, import_react43.useRef)(null);
9440
+ const [isEditing, setIsEditing] = (0, import_react43.useState)(!isVariable);
9536
9441
  const { placeholderUrl = DEFAULT_PLACEHOLDER_URL } = useMailyContext();
9537
9442
  const otps = useVariableOptions(editor);
9538
9443
  const variables = otps == null ? void 0 : otps.variables;
9539
9444
  const variableTriggerCharacter = (_b = (_a = otps == null ? void 0 : otps.suggestion) == null ? void 0 : _a.char) != null ? _b : DEFAULT_VARIABLE_TRIGGER_CHAR;
9540
9445
  const renderVariable = otps == null ? void 0 : otps.renderVariable;
9541
- const autoCompleteOptions = (0, import_react46.useMemo)(() => {
9446
+ const autoCompleteOptions = (0, import_react43.useMemo)(() => {
9542
9447
  const withoutTrigger = value.replace(
9543
9448
  new RegExp(variableTriggerCharacter, "g"),
9544
9449
  ""
@@ -9549,8 +9454,8 @@ function ButtonLabelInput(props) {
9549
9454
  editor
9550
9455
  }).map((variable) => variable.name);
9551
9456
  }, [variables, value, editor]);
9552
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "mly:isolate mly:flex mly:items-center mly:rounded-lg", children: [
9553
- !isEditing && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
9457
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "mly:isolate mly:flex mly:items-center mly:rounded-lg", children: [
9458
+ !isEditing && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
9554
9459
  "button",
9555
9460
  {
9556
9461
  onClick: () => {
@@ -9571,7 +9476,7 @@ function ButtonLabelInput(props) {
9571
9476
  })
9572
9477
  }
9573
9478
  ),
9574
- isEditing && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
9479
+ isEditing && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
9575
9480
  InputAutocomplete,
9576
9481
  {
9577
9482
  editor,
@@ -9598,7 +9503,7 @@ function ButtonLabelInput(props) {
9598
9503
  }
9599
9504
 
9600
9505
  // src/editor/nodes/button/button-view.tsx
9601
- var import_jsx_runtime50 = require("react/jsx-runtime");
9506
+ var import_jsx_runtime49 = require("react/jsx-runtime");
9602
9507
  function ButtonView(props) {
9603
9508
  const { node, editor, getPos, updateAttributes: updateAttributes2 } = props;
9604
9509
  const {
@@ -9618,7 +9523,7 @@ function ButtonView(props) {
9618
9523
  } = node.attrs;
9619
9524
  const opts = useVariableOptions(editor);
9620
9525
  const renderVariable = opts == null ? void 0 : opts.renderVariable;
9621
- const sizes = (0, import_react48.useMemo)(
9526
+ const sizes = (0, import_react45.useMemo)(
9622
9527
  () => ({
9623
9528
  small: {
9624
9529
  paddingX: 24,
@@ -9635,14 +9540,14 @@ function ButtonView(props) {
9635
9540
  }),
9636
9541
  []
9637
9542
  );
9638
- const size = (0, import_react48.useMemo)(() => {
9543
+ const size = (0, import_react45.useMemo)(() => {
9639
9544
  var _a;
9640
9545
  return (_a = Object.entries(sizes).find(
9641
9546
  ([, { paddingX, paddingY }]) => paddingRight === paddingX && paddingTop === paddingY
9642
9547
  )) == null ? void 0 : _a[0];
9643
9548
  }, [paddingRight, paddingTop, sizes]);
9644
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
9645
- import_react47.NodeViewWrapper,
9549
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
9550
+ import_react44.NodeViewWrapper,
9646
9551
  {
9647
9552
  draggable: editor.isEditable,
9648
9553
  "data-drag-handle": editor.isEditable,
@@ -9650,8 +9555,8 @@ function ButtonView(props) {
9650
9555
  style: {
9651
9556
  textAlign: alignment
9652
9557
  },
9653
- children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Popover, { open: props.selected && editor.isEditable, children: [
9654
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
9558
+ children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Popover, { open: props.selected && editor.isEditable, children: [
9559
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
9655
9560
  "button",
9656
9561
  {
9657
9562
  className: cn(
@@ -9694,7 +9599,7 @@ function ButtonView(props) {
9694
9599
  }) : text2
9695
9600
  }
9696
9601
  ) }) }),
9697
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
9602
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
9698
9603
  PopoverContent,
9699
9604
  {
9700
9605
  align: "end",
@@ -9703,8 +9608,8 @@ function ButtonView(props) {
9703
9608
  sideOffset: 8,
9704
9609
  onOpenAutoFocus: (e) => e.preventDefault(),
9705
9610
  onCloseAutoFocus: (e) => e.preventDefault(),
9706
- children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "mly:flex mly:items-stretch mly:text-midnight-gray", children: [
9707
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
9611
+ children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "mly:flex mly:items-stretch mly:text-midnight-gray", children: [
9612
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
9708
9613
  ButtonLabelInput,
9709
9614
  {
9710
9615
  value: text2,
@@ -9718,9 +9623,9 @@ function ButtonView(props) {
9718
9623
  editor
9719
9624
  }
9720
9625
  ),
9721
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Divider, {}),
9722
- /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "mly:flex mly:gap-x-0.5", children: [
9723
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
9626
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Divider, {}),
9627
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "mly:flex mly:gap-x-0.5", children: [
9628
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
9724
9629
  Select,
9725
9630
  {
9726
9631
  label: "Border Radius",
@@ -9738,7 +9643,7 @@ function ButtonView(props) {
9738
9643
  className: "mly:capitalize"
9739
9644
  }
9740
9645
  ),
9741
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
9646
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
9742
9647
  Select,
9743
9648
  {
9744
9649
  label: "Style",
@@ -9756,7 +9661,7 @@ function ButtonView(props) {
9756
9661
  className: "mly:capitalize"
9757
9662
  }
9758
9663
  ),
9759
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
9664
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
9760
9665
  Select,
9761
9666
  {
9762
9667
  label: "Size",
@@ -9780,9 +9685,9 @@ function ButtonView(props) {
9780
9685
  }
9781
9686
  )
9782
9687
  ] }),
9783
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Divider, {}),
9784
- /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "mly:flex mly:gap-x-0.5", children: [
9785
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
9688
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Divider, {}),
9689
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "mly:flex mly:gap-x-0.5", children: [
9690
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
9786
9691
  AlignmentSwitch,
9787
9692
  {
9788
9693
  alignment,
@@ -9793,7 +9698,7 @@ function ButtonView(props) {
9793
9698
  }
9794
9699
  }
9795
9700
  ),
9796
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
9701
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
9797
9702
  LinkInputPopover,
9798
9703
  {
9799
9704
  defaultValue: externalLink || "",
@@ -9809,9 +9714,9 @@ function ButtonView(props) {
9809
9714
  }
9810
9715
  )
9811
9716
  ] }),
9812
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Divider, {}),
9813
- /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "mly:flex mly:gap-x-0.5", children: [
9814
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
9717
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Divider, {}),
9718
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "mly:flex mly:gap-x-0.5", children: [
9719
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
9815
9720
  BackgroundColorPickerPopup,
9816
9721
  {
9817
9722
  variant,
@@ -9823,7 +9728,7 @@ function ButtonView(props) {
9823
9728
  }
9824
9729
  }
9825
9730
  ),
9826
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
9731
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
9827
9732
  TextColorPickerPopup,
9828
9733
  {
9829
9734
  color: textColor || "transparent",
@@ -9844,20 +9749,20 @@ function ButtonView(props) {
9844
9749
  }
9845
9750
  function BackgroundColorPickerPopup(props) {
9846
9751
  const { color, onChange, variant } = props;
9847
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
9752
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
9848
9753
  ColorPicker,
9849
9754
  {
9850
9755
  color,
9851
9756
  onColorChange: onChange,
9852
9757
  tooltip: "Background Color",
9853
- children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
9758
+ children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
9854
9759
  BaseButton,
9855
9760
  {
9856
9761
  variant: "ghost",
9857
9762
  size: "sm",
9858
9763
  type: "button",
9859
9764
  className: "mly:size-7",
9860
- children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
9765
+ children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
9861
9766
  "div",
9862
9767
  {
9863
9768
  className: "mly:h-4 mly:w-4 mly:shrink-0 mly:rounded-full mly:shadow",
@@ -9876,16 +9781,16 @@ function BackgroundColorPickerPopup(props) {
9876
9781
  }
9877
9782
  function TextColorPickerPopup(props) {
9878
9783
  const { color, onChange } = props;
9879
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(ColorPicker, { color, onColorChange: onChange, tooltip: "Text Color", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
9784
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ColorPicker, { color, onColorChange: onChange, tooltip: "Text Color", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
9880
9785
  BaseButton,
9881
9786
  {
9882
9787
  variant: "ghost",
9883
9788
  size: "sm",
9884
9789
  type: "button",
9885
9790
  className: "mly:size-7",
9886
- children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "mly:flex mly:flex-col mly:items-center mly:justify-center mly:gap-px", children: [
9887
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "mly:font-bolder mly:font-mono mly:text-xs mly:text-midnight-gray", children: "A" }),
9888
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
9791
+ children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "mly:flex mly:flex-col mly:items-center mly:justify-center mly:gap-px", children: [
9792
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "mly:font-bolder mly:font-mono mly:text-xs mly:text-midnight-gray", children: "A" }),
9793
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
9889
9794
  "div",
9890
9795
  {
9891
9796
  className: "mly:h-[2px] mly:w-3 mly:shrink-0 mly:rounded-md mly:shadow",
@@ -10052,7 +9957,7 @@ var ButtonExtension = import_core14.Node.create({
10052
9957
  };
10053
9958
  },
10054
9959
  addNodeView() {
10055
- return (0, import_react49.ReactNodeViewRenderer)(ButtonView, {
9960
+ return (0, import_react46.ReactNodeViewRenderer)(ButtonView, {
10056
9961
  contentDOMElementTag: "div",
10057
9962
  className: "mly:relative"
10058
9963
  });
@@ -10061,7 +9966,7 @@ var ButtonExtension = import_core14.Node.create({
10061
9966
 
10062
9967
  // src/editor/nodes/image/image.ts
10063
9968
  var import_extension_image2 = __toESM(require("@tiptap/extension-image"), 1);
10064
- var import_react50 = require("@tiptap/react");
9969
+ var import_react47 = require("@tiptap/react");
10065
9970
  var DEFAULT_IMAGE_BORDER_RADIUS = 0;
10066
9971
  var ImageExtension = import_extension_image2.default.extend({
10067
9972
  addAttributes() {
@@ -10199,7 +10104,7 @@ var ImageExtension = import_extension_image2.default.extend({
10199
10104
  });
10200
10105
  },
10201
10106
  addNodeView() {
10202
- return (0, import_react50.ReactNodeViewRenderer)(ImageView, {
10107
+ return (0, import_react47.ReactNodeViewRenderer)(ImageView, {
10203
10108
  className: "mly:relative"
10204
10109
  });
10205
10110
  }
@@ -10208,89 +10113,30 @@ var ImageExtension = import_extension_image2.default.extend({
10208
10113
  // src/editor/nodes/html/html.tsx
10209
10114
  var import_extension_code_block_lowlight = __toESM(require("@tiptap/extension-code-block-lowlight"), 1);
10210
10115
  var import_state7 = require("@tiptap/pm/state");
10211
- var import_react60 = require("@tiptap/react");
10116
+ var import_react56 = require("@tiptap/react");
10212
10117
  var import_xml = __toESM(require("highlight.js/lib/languages/xml"), 1);
10213
10118
  var import_lowlight = require("lowlight");
10214
10119
 
10215
10120
  // src/editor/nodes/html/html-view.tsx
10216
- var import_react51 = require("@tiptap/react");
10217
- var import_react52 = require("react");
10218
- var import_jsx_runtime51 = require("react/jsx-runtime");
10121
+ var import_react48 = require("@tiptap/react");
10122
+ var import_jsx_runtime50 = require("react/jsx-runtime");
10219
10123
  function HTMLCodeBlockView(props) {
10220
- const { node, updateAttributes: updateAttributes2 } = props;
10221
- let { language, activeTab = "code" } = node.attrs;
10222
- activeTab || (activeTab = "code");
10124
+ const { node } = props;
10125
+ const { language } = node.attrs;
10223
10126
  const languageClass = language ? `language-${language}` : "";
10224
- const html2 = (0, import_react52.useMemo)(() => {
10225
- const text2 = node.content.content.reduce((acc, cur) => {
10226
- if (cur.type.name === "text") {
10227
- return acc + cur.text;
10228
- } else if (cur.type.name === "variable") {
10229
- const { id: variable, fallback } = (cur == null ? void 0 : cur.attrs) || {};
10230
- const formattedVariable = fallback ? `{{${variable},fallback=${fallback}}}` : `{{${variable}}}`;
10231
- return acc + formattedVariable;
10232
- }
10233
- return acc;
10234
- }, "");
10235
- const htmlParser = new DOMParser();
10236
- const htmlDoc = htmlParser.parseFromString(text2, "text/html");
10237
- const style = htmlDoc.querySelectorAll("style");
10238
- const body = htmlDoc.body;
10239
- const combinedStyle = Array.from(style).map((s) => s.innerHTML).join("\n");
10240
- return `<style>${combinedStyle}</style>${body.innerHTML}`;
10241
- }, [activeTab]);
10242
- const isEmpty = html2 === "";
10243
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
10244
- import_react51.NodeViewWrapper,
10127
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
10128
+ import_react48.NodeViewWrapper,
10245
10129
  {
10246
10130
  draggable: false,
10247
10131
  "data-drag-handle": false,
10248
10132
  "data-type": "htmlCodeBlock",
10249
- children: [
10250
- activeTab === "code" && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("pre", { className: "mly:my-0 mly:rounded-lg mly:border mly:border-gray-200 mly:bg-white mly:p-2 mly:text-black", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
10251
- import_react51.NodeViewContent,
10252
- {
10253
- as: "code",
10254
- className: cn("is-editable", languageClass)
10255
- }
10256
- ) }),
10257
- activeTab === "preview" && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
10258
- "div",
10259
- {
10260
- className: cn(
10261
- "mly:not-prose mly:rounded-lg mly:border mly:border-gray-200 mly:p-2",
10262
- isEmpty && "mly:min-h-[42px]"
10263
- ),
10264
- ref: (node2) => {
10265
- if (!node2 || (node2 == null ? void 0 : node2.shadowRoot)) {
10266
- return;
10267
- }
10268
- const shadow = node2.attachShadow({ mode: "open" });
10269
- const sheet = new CSSStyleSheet();
10270
- sheet.replaceSync(`
10271
- * { font-family: 'Inter', sans-serif; }
10272
- blockquote, h1, h2, h3, img, li, ol, p, ul {
10273
- margin-top: 0;
10274
- margin-bottom: 0;
10275
- }
10276
- `);
10277
- shadow.adoptedStyleSheets = [sheet];
10278
- const container = document.createElement("div");
10279
- container.innerHTML = html2;
10280
- shadow.appendChild(container);
10281
- },
10282
- contentEditable: false,
10283
- onClick: () => {
10284
- if (!isEmpty) {
10285
- return;
10286
- }
10287
- updateAttributes2({
10288
- activeTab: "code"
10289
- });
10290
- }
10291
- }
10292
- )
10293
- ]
10133
+ children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("pre", { className: "mly-html-code-pre", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
10134
+ import_react48.NodeViewContent,
10135
+ {
10136
+ as: "code",
10137
+ className: cn("is-editable", languageClass)
10138
+ }
10139
+ ) })
10294
10140
  }
10295
10141
  );
10296
10142
  }
@@ -10429,24 +10275,24 @@ var ParagraphExtension = import_extension_paragraph.default.extend({
10429
10275
 
10430
10276
  // src/editor/nodes/repeat/repeat.ts
10431
10277
  var import_core16 = require("@tiptap/core");
10432
- var import_react54 = require("@tiptap/react");
10278
+ var import_react50 = require("@tiptap/react");
10433
10279
 
10434
10280
  // src/editor/nodes/repeat/repeat-view.tsx
10435
- var import_react53 = require("@tiptap/react");
10436
- var import_lucide_react27 = require("lucide-react");
10437
- var import_jsx_runtime52 = require("react/jsx-runtime");
10281
+ var import_react49 = require("@tiptap/react");
10282
+ var import_lucide_react26 = require("lucide-react");
10283
+ var import_jsx_runtime51 = require("react/jsx-runtime");
10438
10284
  function RepeatView(props) {
10439
10285
  const { editor, getPos } = props;
10440
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
10441
- import_react53.NodeViewWrapper,
10286
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
10287
+ import_react49.NodeViewWrapper,
10442
10288
  {
10443
10289
  "data-type": "repeat",
10444
10290
  draggable: editor.isEditable,
10445
10291
  "data-drag-handle": editor.isEditable,
10446
10292
  className: "mly:relative",
10447
10293
  children: [
10448
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_react53.NodeViewContent, { className: "is-editable" }),
10449
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
10294
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_react49.NodeViewContent, { className: "is-editable" }),
10295
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
10450
10296
  "div",
10451
10297
  {
10452
10298
  role: "button",
@@ -10457,8 +10303,8 @@ function RepeatView(props) {
10457
10303
  editor.commands.setNodeSelection(getPos());
10458
10304
  },
10459
10305
  children: [
10460
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_lucide_react27.Repeat2, { className: "mly:size-3 mly:stroke-[2.5] mly:text-midnight-gray" }),
10461
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "mly:w-[1.5px] mly:grow mly:rounded-full mly:bg-rose-300" })
10306
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_lucide_react26.Repeat2, { className: "mly:size-3 mly:stroke-[2.5] mly:text-midnight-gray" }),
10307
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "mly:w-[1.5px] mly:grow mly:rounded-full mly:bg-rose-300" })
10462
10308
  ]
10463
10309
  }
10464
10310
  )
@@ -10542,7 +10388,7 @@ var RepeatExtension = import_core16.Node.create({
10542
10388
  };
10543
10389
  },
10544
10390
  addNodeView() {
10545
- return (0, import_react54.ReactNodeViewRenderer)(RepeatView, {
10391
+ return (0, import_react50.ReactNodeViewRenderer)(RepeatView, {
10546
10392
  contentDOMElementTag: "div",
10547
10393
  className: "mly:relative"
10548
10394
  });
@@ -10699,14 +10545,14 @@ var SlashCommandExtension = import_core18.Extension.create({
10699
10545
  });
10700
10546
 
10701
10547
  // src/editor/extensions/slash-command/slash-command-view.tsx
10702
- var import_react56 = require("@tiptap/react");
10703
- var import_react57 = require("react");
10704
- var import_tippy8 = __toESM(require("tippy.js"), 1);
10548
+ var import_react52 = require("@tiptap/react");
10549
+ var import_react53 = require("react");
10550
+ var import_tippy7 = __toESM(require("tippy.js"), 1);
10705
10551
 
10706
10552
  // src/editor/extensions/slash-command/slash-command-item.tsx
10707
- var import_lucide_react28 = require("lucide-react");
10708
- var import_react55 = require("react");
10709
- var import_jsx_runtime53 = require("react/jsx-runtime");
10553
+ var import_lucide_react27 = require("lucide-react");
10554
+ var import_react51 = require("react");
10555
+ var import_jsx_runtime52 = require("react/jsx-runtime");
10710
10556
  function SlashCommandItem(props) {
10711
10557
  var _a;
10712
10558
  const {
@@ -10721,7 +10567,7 @@ function SlashCommandItem(props) {
10721
10567
  hoveredItemKey,
10722
10568
  onHover
10723
10569
  } = props;
10724
- const [open, setOpen] = (0, import_react55.useState)(false);
10570
+ const [open, setOpen] = (0, import_react51.useState)(false);
10725
10571
  const isActive = groupIndex === selectedGroupIndex && commandIndex === selectedCommandIndex;
10726
10572
  const itemKey = `${groupIndex}-${commandIndex}`;
10727
10573
  const isHovered = hoveredItemKey === itemKey;
@@ -10729,19 +10575,19 @@ function SlashCommandItem(props) {
10729
10575
  const shouldOpenTooltip = !!(item == null ? void 0 : item.preview) && (isHovered || isActive && !hoveredItemKey);
10730
10576
  const hasRenderFunction = typeof item.render === "function";
10731
10577
  const renderFunctionValue = hasRenderFunction ? (_a = item.render) == null ? void 0 : _a.call(item, editor) : null;
10732
- let value = /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_jsx_runtime53.Fragment, { children: [
10733
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "mly:flex mly:h-6 mly:w-6 mly:shrink-0 mly:items-center mly:justify-center", children: item.icon }),
10734
- /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "mly:grow", children: [
10735
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { className: "mly:font-medium", children: item.title }),
10736
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { className: "mly:text-xs mly:text-gray-400", children: item.description })
10578
+ let value = /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_jsx_runtime52.Fragment, { children: [
10579
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "mly:flex mly:h-6 mly:w-6 mly:shrink-0 mly:items-center mly:justify-center", children: item.icon }),
10580
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "mly:grow", children: [
10581
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "mly:font-medium", children: item.title }),
10582
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "mly:text-xs mly:text-gray-400", children: item.description })
10737
10583
  ] }),
10738
- isSubCommand2 && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "mly:block mly:px-1 mly:text-gray-400", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_lucide_react28.ChevronRightIcon, { className: "mly:size-3.5 mly:stroke-[2.5]" }) })
10584
+ isSubCommand2 && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "mly:block mly:px-1 mly:text-gray-400", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_lucide_react27.ChevronRightIcon, { className: "mly:size-3.5 mly:stroke-[2.5]" }) })
10739
10585
  ] });
10740
10586
  if (renderFunctionValue !== null && renderFunctionValue !== true) {
10741
10587
  value = renderFunctionValue;
10742
10588
  }
10743
- const openTimerRef = (0, import_react55.useRef)(0);
10744
- const handleDelayedOpen = (0, import_react55.useCallback)(() => {
10589
+ const openTimerRef = (0, import_react51.useRef)(0);
10590
+ const handleDelayedOpen = (0, import_react51.useCallback)(() => {
10745
10591
  window.clearTimeout(openTimerRef.current);
10746
10592
  const delay = 200;
10747
10593
  openTimerRef.current = window.setTimeout(() => {
@@ -10749,7 +10595,7 @@ function SlashCommandItem(props) {
10749
10595
  openTimerRef.current = 0;
10750
10596
  }, delay);
10751
10597
  }, [setOpen]);
10752
- (0, import_react55.useEffect)(() => {
10598
+ (0, import_react51.useEffect)(() => {
10753
10599
  if (shouldOpenTooltip) {
10754
10600
  handleDelayedOpen();
10755
10601
  } else {
@@ -10758,7 +10604,7 @@ function SlashCommandItem(props) {
10758
10604
  setOpen(false);
10759
10605
  }
10760
10606
  }, [shouldOpenTooltip]);
10761
- (0, import_react55.useEffect)(() => {
10607
+ (0, import_react51.useEffect)(() => {
10762
10608
  return () => {
10763
10609
  if (openTimerRef.current) {
10764
10610
  window.clearTimeout(openTimerRef.current);
@@ -10766,8 +10612,8 @@ function SlashCommandItem(props) {
10766
10612
  }
10767
10613
  };
10768
10614
  }, []);
10769
- return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(Tooltip, { open, children: [
10770
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
10615
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Tooltip, { open, children: [
10616
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
10771
10617
  "button",
10772
10618
  {
10773
10619
  className: cn(
@@ -10782,14 +10628,14 @@ function SlashCommandItem(props) {
10782
10628
  children: value
10783
10629
  }
10784
10630
  ) }),
10785
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
10631
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
10786
10632
  TooltipContent,
10787
10633
  {
10788
10634
  side: "right",
10789
10635
  sideOffset: 10,
10790
10636
  className: "mly:w-52 mly:rounded-lg mly:border-none mly:p-1 mly:shadow",
10791
- children: typeof item.preview === "function" ? item == null ? void 0 : item.preview(editor) : /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_jsx_runtime53.Fragment, { children: [
10792
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("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__ */ (0, import_jsx_runtime53.jsx)(
10637
+ children: typeof item.preview === "function" ? item == null ? void 0 : item.preview(editor) : /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_jsx_runtime52.Fragment, { children: [
10638
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("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__ */ (0, import_jsx_runtime52.jsx)(
10793
10639
  "img",
10794
10640
  {
10795
10641
  src: item == null ? void 0 : item.preview,
@@ -10797,7 +10643,7 @@ function SlashCommandItem(props) {
10797
10643
  className: "mly:absolute mly:inset-0 mly:h-full mly:w-full mly:object-cover"
10798
10644
  }
10799
10645
  ) }),
10800
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { className: "mly:mt-2 mly:px-0.5 mly:text-gray-500", children: item.description })
10646
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "mly:mt-2 mly:px-0.5 mly:text-gray-500", children: item.description })
10801
10647
  ] })
10802
10648
  }
10803
10649
  )
@@ -10886,16 +10732,16 @@ function processCommand(options) {
10886
10732
  }
10887
10733
 
10888
10734
  // src/editor/extensions/slash-command/slash-command-view.tsx
10889
- var import_jsx_runtime54 = require("react/jsx-runtime");
10890
- var CommandList = (0, import_react57.forwardRef)((props, ref) => {
10735
+ var import_jsx_runtime53 = require("react/jsx-runtime");
10736
+ var CommandList = (0, import_react53.forwardRef)((props, ref) => {
10891
10737
  const { items: groups, command, editor, range, query } = props;
10892
- const [selectedGroupIndex, setSelectedGroupIndex] = (0, import_react57.useState)(0);
10893
- const [selectedCommandIndex, setSelectedCommandIndex] = (0, import_react57.useState)(0);
10894
- const [hoveredItemKey, setHoveredItemKey] = (0, import_react57.useState)(null);
10895
- const prevQuery = (0, import_react57.useRef)("");
10896
- const prevSelectedGroupIndex = (0, import_react57.useRef)(0);
10897
- const prevSelectedCommandIndex = (0, import_react57.useRef)(0);
10898
- const selectItem = (0, import_react57.useCallback)(
10738
+ const [selectedGroupIndex, setSelectedGroupIndex] = (0, import_react53.useState)(0);
10739
+ const [selectedCommandIndex, setSelectedCommandIndex] = (0, import_react53.useState)(0);
10740
+ const [hoveredItemKey, setHoveredItemKey] = (0, import_react53.useState)(null);
10741
+ const prevQuery = (0, import_react53.useRef)("");
10742
+ const prevSelectedGroupIndex = (0, import_react53.useRef)(0);
10743
+ const prevSelectedCommandIndex = (0, import_react53.useRef)(0);
10744
+ const selectItem = (0, import_react53.useCallback)(
10899
10745
  (groupIndex, commandIndex) => {
10900
10746
  const item = groups[groupIndex].commands[commandIndex];
10901
10747
  if (!item) {
@@ -10905,7 +10751,7 @@ var CommandList = (0, import_react57.forwardRef)((props, ref) => {
10905
10751
  },
10906
10752
  [command]
10907
10753
  );
10908
- (0, import_react57.useImperativeHandle)(ref, () => ({
10754
+ (0, import_react53.useImperativeHandle)(ref, () => ({
10909
10755
  onKeyDown: ({ event }) => {
10910
10756
  var _a, _b, _c, _d;
10911
10757
  const navigationKeys = [
@@ -10993,9 +10839,9 @@ var CommandList = (0, import_react57.forwardRef)((props, ref) => {
10993
10839
  }
10994
10840
  }
10995
10841
  }));
10996
- const commandListContainer = (0, import_react57.useRef)(null);
10997
- const activeCommandRef = (0, import_react57.useRef)(null);
10998
- (0, import_react57.useLayoutEffect)(() => {
10842
+ const commandListContainer = (0, import_react53.useRef)(null);
10843
+ const activeCommandRef = (0, import_react53.useRef)(null);
10844
+ (0, import_react53.useLayoutEffect)(() => {
10999
10845
  const container = commandListContainer == null ? void 0 : commandListContainer.current;
11000
10846
  const activeCommandContainer = activeCommandRef == null ? void 0 : activeCommandRef.current;
11001
10847
  if (!container || !activeCommandContainer) {
@@ -11010,11 +10856,11 @@ var CommandList = (0, import_react57.forwardRef)((props, ref) => {
11010
10856
  commandListContainer,
11011
10857
  activeCommandRef
11012
10858
  ]);
11013
- (0, import_react57.useEffect)(() => {
10859
+ (0, import_react53.useEffect)(() => {
11014
10860
  setSelectedGroupIndex(0);
11015
10861
  setSelectedCommandIndex(0);
11016
10862
  }, [groups]);
11017
- (0, import_react57.useEffect)(() => {
10863
+ (0, import_react53.useEffect)(() => {
11018
10864
  return () => {
11019
10865
  prevQuery.current = "";
11020
10866
  prevSelectedGroupIndex.current = 0;
@@ -11024,15 +10870,15 @@ var CommandList = (0, import_react57.forwardRef)((props, ref) => {
11024
10870
  if (!groups || groups.length === 0) {
11025
10871
  return null;
11026
10872
  }
11027
- return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("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: [
11028
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
10873
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("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: [
10874
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
11029
10875
  "div",
11030
10876
  {
11031
10877
  id: "slash-command",
11032
10878
  ref: commandListContainer,
11033
10879
  className: "mly:no-scrollbar mly:h-auto mly:max-h-[330px] mly:overflow-y-auto",
11034
- children: groups.map((group, groupIndex) => /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_react57.Fragment, { children: [
11035
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
10880
+ children: groups.map((group, groupIndex) => /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_react53.Fragment, { children: [
10881
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
11036
10882
  "span",
11037
10883
  {
11038
10884
  className: cn(
@@ -11042,9 +10888,9 @@ var CommandList = (0, import_react57.forwardRef)((props, ref) => {
11042
10888
  children: group.title
11043
10889
  }
11044
10890
  ),
11045
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "mly:space-y-0.5 mly:p-1", children: group.commands.map((item, commandIndex) => {
10891
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "mly:space-y-0.5 mly:p-1", children: group.commands.map((item, commandIndex) => {
11046
10892
  const itemKey = `${groupIndex}-${commandIndex}`;
11047
- return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
10893
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
11048
10894
  SlashCommandItem,
11049
10895
  {
11050
10896
  item,
@@ -11064,16 +10910,16 @@ var CommandList = (0, import_react57.forwardRef)((props, ref) => {
11064
10910
  ] }, groupIndex))
11065
10911
  }
11066
10912
  ),
11067
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "mly:border-t mly:border-gray-200 mly:px-1 mly:py-3 mly:pl-4", children: /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "mly:flex mly:items-center", children: [
11068
- /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("p", { className: "mly:text-center mly:text-xs mly:text-gray-400", children: [
11069
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("kbd", { className: "mly:rounded mly:border mly:border-gray-200 mly:p-1 mly:px-2 mly:font-medium", children: "\u2191" }),
11070
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("kbd", { className: "mly:ml-1 mly:rounded mly:border mly:border-gray-200 mly:p-1 mly:px-2 mly:font-medium", children: "\u2193" }),
10913
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "mly:border-t mly:border-gray-200 mly:px-1 mly:py-3 mly:pl-4", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "mly:flex mly:items-center", children: [
10914
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("p", { className: "mly:text-center mly:text-xs mly:text-gray-400", children: [
10915
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("kbd", { className: "mly:rounded mly:border mly:border-gray-200 mly:p-1 mly:px-2 mly:font-medium", children: "\u2191" }),
10916
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("kbd", { className: "mly:ml-1 mly:rounded mly:border mly:border-gray-200 mly:p-1 mly:px-2 mly:font-medium", children: "\u2193" }),
11071
10917
  " ",
11072
10918
  "to navigate"
11073
10919
  ] }),
11074
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { "aria-hidden": "true", className: "mly:select-none mly:px-1", children: "\xB7" }),
11075
- /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("p", { className: "mly:text-center mly:text-xs mly:text-gray-400", children: [
11076
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("kbd", { className: "mly:rounded mly:border mly:border-gray-200 mly:p-1 mly:px-1.5 mly:font-medium", children: "Enter" }),
10920
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { "aria-hidden": "true", className: "mly:select-none mly:px-1", children: "\xB7" }),
10921
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("p", { className: "mly:text-center mly:text-xs mly:text-gray-400", children: [
10922
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("kbd", { className: "mly:rounded mly:border mly:border-gray-200 mly:p-1 mly:px-1.5 mly:font-medium", children: "Enter" }),
11077
10923
  " ",
11078
10924
  "to select"
11079
10925
  ] })
@@ -11097,11 +10943,11 @@ function getSlashCommandSuggestions(groups = DEFAULT_SLASH_COMMANDS) {
11097
10943
  let popup = null;
11098
10944
  return {
11099
10945
  onStart: (props) => {
11100
- component = new import_react56.ReactRenderer(CommandList, {
10946
+ component = new import_react52.ReactRenderer(CommandList, {
11101
10947
  props,
11102
10948
  editor: props.editor
11103
10949
  });
11104
- popup = (0, import_tippy8.default)("body", {
10950
+ popup = (0, import_tippy7.default)("body", {
11105
10951
  getReferenceClientRect: props.clientRect,
11106
10952
  appendTo: () => document.body,
11107
10953
  content: component.element,
@@ -11150,16 +10996,16 @@ function getSlashCommandSuggestions(groups = DEFAULT_SLASH_COMMANDS) {
11150
10996
  }
11151
10997
 
11152
10998
  // src/editor/nodes/variable/variable-suggestions.tsx
11153
- var import_react58 = require("@tiptap/react");
11154
- var import_react59 = require("react");
11155
- var import_tippy9 = __toESM(require("tippy.js"), 1);
11156
- var import_jsx_runtime55 = require("react/jsx-runtime");
11157
- var VariableList = (0, import_react59.forwardRef)((props, ref) => {
10999
+ var import_react54 = require("@tiptap/react");
11000
+ var import_react55 = require("react");
11001
+ var import_tippy8 = __toESM(require("tippy.js"), 1);
11002
+ var import_jsx_runtime54 = require("react/jsx-runtime");
11003
+ var VariableList = (0, import_react55.forwardRef)((props, ref) => {
11158
11004
  var _a;
11159
11005
  const { items = [], editor } = props;
11160
- const popoverRef = (0, import_react59.useRef)(null);
11006
+ const popoverRef = (0, import_react55.useRef)(null);
11161
11007
  const VariableSuggestionPopoverComponent = (_a = useVariableOptions(editor)) == null ? void 0 : _a.variableSuggestionsPopover;
11162
- (0, import_react59.useImperativeHandle)(ref, () => ({
11008
+ (0, import_react55.useImperativeHandle)(ref, () => ({
11163
11009
  onKeyDown: ({ event }) => {
11164
11010
  if (!popoverRef.current) {
11165
11011
  return false;
@@ -11182,7 +11028,7 @@ var VariableList = (0, import_react59.forwardRef)((props, ref) => {
11182
11028
  return false;
11183
11029
  }
11184
11030
  }));
11185
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
11031
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
11186
11032
  VariableSuggestionPopoverComponent,
11187
11033
  {
11188
11034
  items,
@@ -11217,14 +11063,14 @@ function getVariableSuggestions(char = DEFAULT_VARIABLE_TRIGGER_CHAR) {
11217
11063
  let popup = null;
11218
11064
  return {
11219
11065
  onStart: (props) => {
11220
- component = new import_react58.ReactRenderer(VariableList, {
11066
+ component = new import_react54.ReactRenderer(VariableList, {
11221
11067
  props,
11222
11068
  editor: props.editor
11223
11069
  });
11224
11070
  if (!props.clientRect) {
11225
11071
  return;
11226
11072
  }
11227
- popup = (0, import_tippy9.default)("body", {
11073
+ popup = (0, import_tippy8.default)("body", {
11228
11074
  getReferenceClientRect: props.clientRect,
11229
11075
  appendTo: () => document.body,
11230
11076
  content: component.element,
@@ -11291,7 +11137,7 @@ var HTMLCodeBlockExtension = import_extension_code_block_lowlight.default.extend
11291
11137
  });
11292
11138
  },
11293
11139
  addNodeView() {
11294
- return (0, import_react60.ReactNodeViewRenderer)(HTMLCodeBlockView, {
11140
+ return (0, import_react56.ReactNodeViewRenderer)(HTMLCodeBlockView, {
11295
11141
  className: "mly:relative",
11296
11142
  attrs: ({ node }) => {
11297
11143
  var _a;
@@ -11366,17 +11212,17 @@ var isCustomNodeSelected = (editor, node) => {
11366
11212
  };
11367
11213
 
11368
11214
  // src/editor/components/text-menu/text-bubble-menu.tsx
11369
- var import_react64 = require("@tiptap/react");
11215
+ var import_react60 = require("@tiptap/react");
11370
11216
 
11371
11217
  // src/editor/components/text-menu/text-bubble-content.tsx
11372
- var import_lucide_react29 = require("lucide-react");
11218
+ var import_lucide_react28 = require("lucide-react");
11373
11219
 
11374
11220
  // src/editor/components/text-menu/use-text-menu-state.tsx
11375
- var import_react61 = require("@tiptap/react");
11376
- var import_fast_deep_equal8 = __toESM(require("fast-deep-equal"), 1);
11221
+ var import_react57 = require("@tiptap/react");
11222
+ var import_fast_deep_equal7 = __toESM(require("fast-deep-equal"), 1);
11377
11223
  var DEFAULT_TEXT_COLOR = "#374151";
11378
11224
  var useTextMenuState = (editor) => {
11379
- const states = (0, import_react61.useEditorState)({
11225
+ const states = (0, import_react57.useEditorState)({
11380
11226
  editor,
11381
11227
  selector: (ctx) => {
11382
11228
  var _a, _b, _c, _d, _e, _f, _g, _h;
@@ -11392,13 +11238,13 @@ var useTextMenuState = (editor) => {
11392
11238
  paragraphShowIfKey: ((_h = ctx.editor.getAttributes("paragraph")) == null ? void 0 : _h.showIfKey) || ""
11393
11239
  };
11394
11240
  },
11395
- equalityFn: import_fast_deep_equal8.default
11241
+ equalityFn: import_fast_deep_equal7.default
11396
11242
  });
11397
11243
  return states;
11398
11244
  };
11399
11245
 
11400
11246
  // src/editor/components/text-menu/text-bubble-content.tsx
11401
- var import_jsx_runtime56 = require("react/jsx-runtime");
11247
+ var import_jsx_runtime55 = require("react/jsx-runtime");
11402
11248
  function TextBubbleContent(props) {
11403
11249
  var _a, _b, _c, _d;
11404
11250
  const { editor, showListMenu = true } = props;
@@ -11410,41 +11256,41 @@ function TextBubbleContent(props) {
11410
11256
  name: "bold",
11411
11257
  isActive: () => editor == null ? void 0 : editor.isActive("bold"),
11412
11258
  command: () => editor == null ? void 0 : editor.chain().focus().toggleBold().run(),
11413
- icon: import_lucide_react29.BoldIcon,
11259
+ icon: import_lucide_react28.BoldIcon,
11414
11260
  tooltip: "Bold"
11415
11261
  },
11416
11262
  {
11417
11263
  name: "italic",
11418
11264
  isActive: () => editor == null ? void 0 : editor.isActive("italic"),
11419
11265
  command: () => editor == null ? void 0 : editor.chain().focus().toggleItalic().run(),
11420
- icon: import_lucide_react29.ItalicIcon,
11266
+ icon: import_lucide_react28.ItalicIcon,
11421
11267
  tooltip: "Italic"
11422
11268
  },
11423
11269
  {
11424
11270
  name: "underline",
11425
11271
  isActive: () => editor == null ? void 0 : editor.isActive("underline"),
11426
11272
  command: () => editor == null ? void 0 : editor.chain().focus().toggleUnderline().run(),
11427
- icon: import_lucide_react29.UnderlineIcon,
11273
+ icon: import_lucide_react28.UnderlineIcon,
11428
11274
  tooltip: "Underline"
11429
11275
  },
11430
11276
  {
11431
11277
  name: "strike",
11432
11278
  isActive: () => editor == null ? void 0 : editor.isActive("strike"),
11433
11279
  command: () => editor == null ? void 0 : editor.chain().focus().toggleStrike().run(),
11434
- icon: import_lucide_react29.StrikethroughIcon,
11280
+ icon: import_lucide_react28.StrikethroughIcon,
11435
11281
  tooltip: "Strikethrough"
11436
11282
  },
11437
11283
  {
11438
11284
  name: "code",
11439
11285
  isActive: () => editor == null ? void 0 : editor.isActive("code"),
11440
11286
  command: () => editor == null ? void 0 : editor.chain().focus().toggleCode().run(),
11441
- icon: import_lucide_react29.CodeIcon,
11287
+ icon: import_lucide_react28.CodeIcon,
11442
11288
  tooltip: "Code"
11443
11289
  }
11444
11290
  ];
11445
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_jsx_runtime56.Fragment, { children: [
11446
- items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(BubbleMenuButton, __spreadValues({}, item), index)),
11447
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
11291
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_jsx_runtime55.Fragment, { children: [
11292
+ items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(BubbleMenuButton, __spreadValues({}, item), index)),
11293
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
11448
11294
  AlignmentSwitch,
11449
11295
  {
11450
11296
  alignment: state.textAlign,
@@ -11453,21 +11299,21 @@ function TextBubbleContent(props) {
11453
11299
  }
11454
11300
  }
11455
11301
  ),
11456
- !state.isListActive && showListMenu && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_jsx_runtime56.Fragment, { children: [
11457
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
11302
+ !state.isListActive && showListMenu && /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_jsx_runtime55.Fragment, { children: [
11303
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
11458
11304
  BubbleMenuButton,
11459
11305
  {
11460
- icon: import_lucide_react29.List,
11306
+ icon: import_lucide_react28.List,
11461
11307
  command: () => {
11462
11308
  editor.chain().focus().toggleBulletList().run();
11463
11309
  },
11464
11310
  tooltip: "Bullet List"
11465
11311
  }
11466
11312
  ),
11467
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
11313
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
11468
11314
  BubbleMenuButton,
11469
11315
  {
11470
- icon: import_lucide_react29.ListOrdered,
11316
+ icon: import_lucide_react28.ListOrdered,
11471
11317
  command: () => {
11472
11318
  editor.chain().focus().toggleOrderedList().run();
11473
11319
  },
@@ -11475,7 +11321,7 @@ function TextBubbleContent(props) {
11475
11321
  }
11476
11322
  )
11477
11323
  ] }),
11478
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
11324
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
11479
11325
  LinkInputPopover,
11480
11326
  {
11481
11327
  defaultValue: (_d = state == null ? void 0 : state.linkUrl) != null ? _d : "",
@@ -11491,8 +11337,8 @@ function TextBubbleContent(props) {
11491
11337
  isVariable: state.isUrlVariable
11492
11338
  }
11493
11339
  ),
11494
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Divider, {}),
11495
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
11340
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Divider, {}),
11341
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
11496
11342
  ColorPicker,
11497
11343
  {
11498
11344
  color: state.currentTextColor,
@@ -11501,16 +11347,16 @@ function TextBubbleContent(props) {
11501
11347
  },
11502
11348
  tooltip: "Text Color",
11503
11349
  suggestedColors,
11504
- children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
11350
+ children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
11505
11351
  BaseButton,
11506
11352
  {
11507
11353
  variant: "ghost",
11508
11354
  size: "sm",
11509
11355
  type: "button",
11510
11356
  className: "mly:h-7 mly:w-7 mly:shrink-0 mly:p-0",
11511
- children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "mly:flex mly:flex-col mly:items-center mly:justify-center mly:gap-px", children: [
11512
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "mly:font-bolder mly:font-mono mly:text-xs mly:text-slate-700", children: "A" }),
11513
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
11357
+ children: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "mly:flex mly:flex-col mly:items-center mly:justify-center mly:gap-px", children: [
11358
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "mly:font-bolder mly:font-mono mly:text-xs mly:text-slate-700", children: "A" }),
11359
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
11514
11360
  "div",
11515
11361
  {
11516
11362
  className: "mly:h-[2px] mly:w-3",
@@ -11526,35 +11372,35 @@ function TextBubbleContent(props) {
11526
11372
  }
11527
11373
 
11528
11374
  // src/editor/components/text-menu/turn-into-block.tsx
11529
- var import_lucide_react30 = require("lucide-react");
11530
- var import_react62 = require("react");
11531
- var import_jsx_runtime57 = require("react/jsx-runtime");
11375
+ var import_lucide_react29 = require("lucide-react");
11376
+ var import_react58 = require("react");
11377
+ var import_jsx_runtime56 = require("react/jsx-runtime");
11532
11378
  var isOption = (option) => option.type === "option";
11533
11379
  var isCategory = (option) => option.type === "category";
11534
11380
  function TurnIntoBlock(props) {
11535
11381
  const { options } = props;
11536
- const activeItem = (0, import_react62.useMemo)(
11382
+ const activeItem = (0, import_react58.useMemo)(
11537
11383
  () => options.find((option) => option.type === "option" && option.isActive()),
11538
11384
  [options]
11539
11385
  );
11540
- const { icon: ActiveIcon = import_lucide_react30.PilcrowIcon } = activeItem || {};
11541
- return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(Popover, { children: [
11542
- /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(Tooltip, { children: [
11543
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
11386
+ const { icon: ActiveIcon = import_lucide_react29.PilcrowIcon } = activeItem || {};
11387
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(Popover, { children: [
11388
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(Tooltip, { children: [
11389
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
11544
11390
  PopoverTrigger,
11545
11391
  {
11546
11392
  className: cn(
11547
11393
  "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"
11548
11394
  ),
11549
11395
  children: [
11550
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(ActiveIcon, { className: "mly:h-3 mly:w-3 mly:shrink-0 mly:stroke-[2.5]" }),
11551
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_lucide_react30.ChevronDownIcon, { className: "mly:h-3 mly:w-3 mly:shrink-0 mly:stroke-[2.5]" })
11396
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(ActiveIcon, { className: "mly:h-3 mly:w-3 mly:shrink-0 mly:stroke-[2.5]" }),
11397
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_lucide_react29.ChevronDownIcon, { className: "mly:h-3 mly:w-3 mly:shrink-0 mly:stroke-[2.5]" })
11552
11398
  ]
11553
11399
  }
11554
11400
  ) }),
11555
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(TooltipContent, { sideOffset: 8, children: "Turn into" })
11401
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(TooltipContent, { sideOffset: 8, children: "Turn into" })
11556
11402
  ] }),
11557
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
11403
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
11558
11404
  PopoverContent,
11559
11405
  {
11560
11406
  align: "start",
@@ -11563,25 +11409,25 @@ function TurnIntoBlock(props) {
11563
11409
  className: "mly:flex mly:w-[160px] mly:flex-col mly:rounded-md mly:p-1",
11564
11410
  children: options.map((option, index) => {
11565
11411
  if (isOption(option)) {
11566
- return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
11412
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
11567
11413
  BaseButton,
11568
11414
  {
11569
11415
  onClick: option.onClick,
11570
11416
  variant: "ghost",
11571
- className: "mly:mb-0.5 mly:h-auto mly:justify-start mly:gap-2 mly:rounded! mly:px-2 mly:py-1 mly:text-sm mly:font-normal mly:text-midnight-gray",
11417
+ 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",
11572
11418
  children: [
11573
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(option.icon, { className: "mly:size-[15px] mly:shrink-0" }),
11419
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(option.icon, { className: "mly:size-[15px] mly:shrink-0" }),
11574
11420
  option.label
11575
11421
  ]
11576
11422
  },
11577
11423
  option.id
11578
11424
  );
11579
11425
  } else if (isCategory(option)) {
11580
- return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
11426
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
11581
11427
  "label",
11582
11428
  {
11583
11429
  className: cn(
11584
- "mly:px-2 mly:text-xs mly:font-medium mly:text-midnight-gray/60",
11430
+ "mly:!px-2.5 mly:!pl-3.5 mly:text-xs mly:font-medium mly:text-midnight-gray/60",
11585
11431
  index === 0 ? "mly:mb-2 mly:mt-1" : "mly:my-2"
11586
11432
  ),
11587
11433
  children: option.label
@@ -11596,10 +11442,10 @@ function TurnIntoBlock(props) {
11596
11442
  }
11597
11443
 
11598
11444
  // src/editor/components/text-menu/use-turn-into-block-options.tsx
11599
- var import_react63 = require("@tiptap/react");
11600
- var import_lucide_react31 = require("lucide-react");
11445
+ var import_react59 = require("@tiptap/react");
11446
+ var import_lucide_react30 = require("lucide-react");
11601
11447
  function useTurnIntoBlockOptions(editor) {
11602
- return (0, import_react63.useEditorState)({
11448
+ return (0, import_react59.useEditorState)({
11603
11449
  editor,
11604
11450
  selector: ({ editor: editor2 }) => [
11605
11451
  {
@@ -11608,7 +11454,7 @@ function useTurnIntoBlockOptions(editor) {
11608
11454
  id: "hierarchy"
11609
11455
  },
11610
11456
  {
11611
- icon: import_lucide_react31.PilcrowIcon,
11457
+ icon: import_lucide_react30.PilcrowIcon,
11612
11458
  onClick: () => editor2.chain().focus().liftListItem("listItem").setParagraph().run(),
11613
11459
  id: "paragraph",
11614
11460
  disabled: () => !editor2.can().setParagraph(),
@@ -11617,7 +11463,7 @@ function useTurnIntoBlockOptions(editor) {
11617
11463
  type: "option"
11618
11464
  },
11619
11465
  {
11620
- icon: import_lucide_react31.Heading1Icon,
11466
+ icon: import_lucide_react30.Heading1Icon,
11621
11467
  onClick: () => editor2.chain().focus().liftListItem("listItem").setHeading({ level: 1 }).run(),
11622
11468
  id: "heading1",
11623
11469
  disabled: () => !editor2.can().setHeading({ level: 1 }),
@@ -11626,7 +11472,7 @@ function useTurnIntoBlockOptions(editor) {
11626
11472
  type: "option"
11627
11473
  },
11628
11474
  {
11629
- icon: import_lucide_react31.Heading2Icon,
11475
+ icon: import_lucide_react30.Heading2Icon,
11630
11476
  onClick: () => editor2.chain().focus().liftListItem("listItem").setHeading({ level: 2 }).run(),
11631
11477
  id: "heading2",
11632
11478
  disabled: () => !editor2.can().setHeading({ level: 2 }),
@@ -11635,7 +11481,7 @@ function useTurnIntoBlockOptions(editor) {
11635
11481
  type: "option"
11636
11482
  },
11637
11483
  {
11638
- icon: import_lucide_react31.Heading3Icon,
11484
+ icon: import_lucide_react30.Heading3Icon,
11639
11485
  onClick: () => editor2.chain().focus().liftListItem("listItem").setHeading({ level: 3 }).run(),
11640
11486
  id: "heading3",
11641
11487
  disabled: () => !editor2.can().setHeading({ level: 3 }),
@@ -11649,7 +11495,7 @@ function useTurnIntoBlockOptions(editor) {
11649
11495
  id: "lists"
11650
11496
  },
11651
11497
  {
11652
- icon: import_lucide_react31.ListIcon,
11498
+ icon: import_lucide_react30.ListIcon,
11653
11499
  onClick: () => editor2.chain().focus().toggleBulletList().run(),
11654
11500
  id: "bulletList",
11655
11501
  disabled: () => !editor2.can().toggleBulletList(),
@@ -11658,7 +11504,7 @@ function useTurnIntoBlockOptions(editor) {
11658
11504
  type: "option"
11659
11505
  },
11660
11506
  {
11661
- icon: import_lucide_react31.ListOrderedIcon,
11507
+ icon: import_lucide_react30.ListOrderedIcon,
11662
11508
  onClick: () => editor2.chain().focus().toggleOrderedList().run(),
11663
11509
  id: "orderedList",
11664
11510
  disabled: () => !editor2.can().toggleOrderedList(),
@@ -11671,7 +11517,7 @@ function useTurnIntoBlockOptions(editor) {
11671
11517
  }
11672
11518
 
11673
11519
  // src/editor/components/text-menu/text-bubble-menu.tsx
11674
- var import_jsx_runtime58 = require("react/jsx-runtime");
11520
+ var import_jsx_runtime57 = require("react/jsx-runtime");
11675
11521
  function TextBubbleMenu(props) {
11676
11522
  const { editor, appendTo } = props;
11677
11523
  if (!editor) {
@@ -11722,23 +11568,23 @@ function TextBubbleMenu(props) {
11722
11568
  }
11723
11569
  });
11724
11570
  const turnIntoBlockOptions = useTurnIntoBlockOptions(editor);
11725
- return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
11726
- import_react64.BubbleMenu,
11571
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
11572
+ import_react60.BubbleMenu,
11727
11573
  __spreadProps(__spreadValues({}, bubbleMenuProps), {
11728
11574
  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",
11729
- children: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(TooltipProvider, { children: [
11730
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(TurnIntoBlock, { options: turnIntoBlockOptions }),
11731
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Divider, { className: "mly:mx-0" }),
11732
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(TextBubbleContent, { editor })
11575
+ children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(TooltipProvider, { children: [
11576
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(TurnIntoBlock, { options: turnIntoBlockOptions }),
11577
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Divider, { className: "mly:mx-0" }),
11578
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(TextBubbleContent, { editor })
11733
11579
  ] })
11734
11580
  })
11735
11581
  );
11736
11582
  }
11737
11583
 
11738
11584
  // src/editor/components/variable-menu/variable-bubble-menu.tsx
11739
- var import_react65 = require("@tiptap/react");
11740
- var import_tippy10 = require("tippy.js");
11741
- var import_jsx_runtime59 = require("react/jsx-runtime");
11585
+ var import_react61 = require("@tiptap/react");
11586
+ var import_tippy9 = require("tippy.js");
11587
+ var import_jsx_runtime58 = require("react/jsx-runtime");
11742
11588
  function VariableBubbleMenu(props) {
11743
11589
  const { editor, appendTo } = props;
11744
11590
  if (!editor) {
@@ -11754,18 +11600,18 @@ function VariableBubbleMenu(props) {
11754
11600
  popperOptions: {
11755
11601
  modifiers: [{ name: "flip", enabled: false }]
11756
11602
  },
11757
- plugins: [import_tippy10.sticky],
11603
+ plugins: [import_tippy9.sticky],
11758
11604
  sticky: "popper",
11759
11605
  maxWidth: "100%",
11760
11606
  appendTo: () => (appendTo == null ? void 0 : appendTo.current) || "parent",
11761
11607
  placement: "top-start"
11762
11608
  }
11763
11609
  });
11764
- return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
11765
- import_react65.BubbleMenu,
11610
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
11611
+ import_react61.BubbleMenu,
11766
11612
  __spreadProps(__spreadValues({}, bubbleMenuProps), {
11767
11613
  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",
11768
- children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(TextBubbleContent, { showListMenu: false, editor }) })
11614
+ children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(TextBubbleContent, { showListMenu: false, editor }) })
11769
11615
  })
11770
11616
  );
11771
11617
  }
@@ -11851,8 +11697,8 @@ function replaceDeprecatedNode(json) {
11851
11697
  }
11852
11698
 
11853
11699
  // src/editor/index.tsx
11854
- var import_jsx_runtime60 = require("react/jsx-runtime");
11855
- function Editor13(props) {
11700
+ var import_jsx_runtime59 = require("react/jsx-runtime");
11701
+ function Editor12(props) {
11856
11702
  const {
11857
11703
  config: {
11858
11704
  wrapClassName = "",
@@ -11875,7 +11721,7 @@ function Editor13(props) {
11875
11721
  scrollThreshold = 40,
11876
11722
  scrollMargin = 40
11877
11723
  } = props;
11878
- const formattedContent = (0, import_react67.useMemo)(() => {
11724
+ const formattedContent = (0, import_react63.useMemo)(() => {
11879
11725
  if (contentJson) {
11880
11726
  const json = (contentJson == null ? void 0 : contentJson.type) === "doc" ? contentJson : {
11881
11727
  type: "doc",
@@ -11896,8 +11742,8 @@ function Editor13(props) {
11896
11742
  };
11897
11743
  }
11898
11744
  }, [contentHtml, contentJson, replaceDeprecatedNode]);
11899
- const menuContainerRef = (0, import_react67.useRef)(null);
11900
- const editor = (0, import_react66.useEditor)({
11745
+ const menuContainerRef = (0, import_react63.useRef)(null);
11746
+ const editor = (0, import_react62.useEditor)({
11901
11747
  editorProps: {
11902
11748
  scrollThreshold,
11903
11749
  scrollMargin,
@@ -11924,7 +11770,7 @@ function Editor13(props) {
11924
11770
  if (!editor) {
11925
11771
  return null;
11926
11772
  }
11927
- return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(MailyProvider, { placeholderUrl, children: /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
11773
+ return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(MailyProvider, { placeholderUrl, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
11928
11774
  "div",
11929
11775
  {
11930
11776
  id: "mly-editor",
@@ -11935,8 +11781,8 @@ function Editor13(props) {
11935
11781
  ),
11936
11782
  ref: menuContainerRef,
11937
11783
  children: [
11938
- hasMenuBar && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(EditorMenuBar, { config: props.config, editor }),
11939
- /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
11784
+ hasMenuBar && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(EditorMenuBar, { config: props.config, editor }),
11785
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
11940
11786
  "div",
11941
11787
  {
11942
11788
  className: cn(
@@ -11944,17 +11790,16 @@ function Editor13(props) {
11944
11790
  bodyClassName
11945
11791
  ),
11946
11792
  children: [
11947
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(TextBubbleMenu, { editor, appendTo: menuContainerRef }),
11948
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(ImageBubbleMenu, { editor, appendTo: menuContainerRef }),
11949
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(SpacerBubbleMenu, { editor, appendTo: menuContainerRef }),
11950
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react66.EditorContent, { editor }),
11951
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(SectionBubbleMenu, { editor, appendTo: menuContainerRef }),
11952
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(ColumnsBubbleMenu, { editor, appendTo: menuContainerRef }),
11953
- !hideContextMenu && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(ContentMenu, { editor }),
11954
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(VariableBubbleMenu, { editor, appendTo: menuContainerRef }),
11955
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(RepeatBubbleMenu, { editor, appendTo: menuContainerRef }),
11956
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(HTMLBubbleMenu, { editor, appendTo: menuContainerRef }),
11957
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(InlineImageBubbleMenu, { editor, appendTo: menuContainerRef })
11793
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(TextBubbleMenu, { editor, appendTo: menuContainerRef }),
11794
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(ImageBubbleMenu, { editor, appendTo: menuContainerRef }),
11795
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(SpacerBubbleMenu, { editor, appendTo: menuContainerRef }),
11796
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_react62.EditorContent, { editor }),
11797
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(SectionBubbleMenu, { editor, appendTo: menuContainerRef }),
11798
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(ColumnsBubbleMenu, { editor, appendTo: menuContainerRef }),
11799
+ !hideContextMenu && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(ContentMenu, { editor }),
11800
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(VariableBubbleMenu, { editor, appendTo: menuContainerRef }),
11801
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(RepeatBubbleMenu, { editor, appendTo: menuContainerRef }),
11802
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(InlineImageBubbleMenu, { editor, appendTo: menuContainerRef })
11958
11803
  ]
11959
11804
  }
11960
11805
  )