@rufous/ui 0.3.14 → 0.3.15

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/main.js CHANGED
@@ -2104,10 +2104,10 @@ function defaultIsEqual(a, b) {
2104
2104
  if (!aIsObj && bIsObj) return a === b.value;
2105
2105
  return false;
2106
2106
  }
2107
- function defaultFilter(options, inputValue, getLabel) {
2107
+ function defaultFilter(options, inputValue, getLabel2) {
2108
2108
  if (!inputValue) return options;
2109
2109
  const q = inputValue.toLowerCase();
2110
- return options.filter((o) => getLabel(o).toLowerCase().includes(q));
2110
+ return options.filter((o) => getLabel2(o).toLowerCase().includes(q));
2111
2111
  }
2112
2112
  function AutocompleteInner(props, _ref) {
2113
2113
  const {
@@ -9330,8 +9330,105 @@ function TreeSelect({
9330
9330
  ));
9331
9331
  }
9332
9332
 
9333
+ // lib/UserSelectionField/UserSelectionField.tsx
9334
+ import React107 from "react";
9335
+ function getOptionId(opt) {
9336
+ return opt.id ?? opt._id;
9337
+ }
9338
+ function getLabel(opt) {
9339
+ if (!opt.userFirstName) return "";
9340
+ return `${opt.userFirstName} ${opt.userLastName ?? ""}`.trim();
9341
+ }
9342
+ function matchesSearch(opt, query) {
9343
+ const q = query.toLowerCase();
9344
+ return opt.userFirstName?.toLowerCase().includes(q) || opt.userLastName?.toLowerCase().includes(q) || opt.emailId?.toLowerCase().includes(q) || false;
9345
+ }
9346
+ function UserAvatar({ user }) {
9347
+ const initials = (user.userFirstName?.[0] ?? "").toUpperCase() + (user.userLastName?.[0] ?? "").toUpperCase();
9348
+ return /* @__PURE__ */ React107.createElement("span", { style: {
9349
+ width: 28,
9350
+ height: 28,
9351
+ borderRadius: "50%",
9352
+ backgroundColor: "var(--hover-color, #e0e0e0)",
9353
+ border: "1px solid var(--border-color, #ddd)",
9354
+ display: "inline-flex",
9355
+ alignItems: "center",
9356
+ justifyContent: "center",
9357
+ fontSize: "0.7rem",
9358
+ fontWeight: 600,
9359
+ color: "var(--text-secondary, #555)",
9360
+ flexShrink: 0,
9361
+ letterSpacing: "0.02em"
9362
+ } }, initials || "?");
9363
+ }
9364
+ function UserSelectionField({
9365
+ value,
9366
+ onChange,
9367
+ options = [],
9368
+ loading = false,
9369
+ onSearchChange,
9370
+ label = "Select user",
9371
+ multiple = false,
9372
+ limitTags,
9373
+ size = "small",
9374
+ variant = "outlined",
9375
+ disabled = false,
9376
+ error = false,
9377
+ helperText,
9378
+ fullWidth = true,
9379
+ required = false,
9380
+ filterOptions: filterOptionsProp,
9381
+ className,
9382
+ style,
9383
+ sx
9384
+ }) {
9385
+ const handleInputChange = (_, inputValue) => {
9386
+ if (!onSearchChange) return;
9387
+ if (!inputValue) {
9388
+ onSearchChange("");
9389
+ return;
9390
+ }
9391
+ const hasLocalMatch = options.some((opt) => matchesSearch(opt, inputValue));
9392
+ if (!hasLocalMatch) {
9393
+ onSearchChange(inputValue);
9394
+ }
9395
+ };
9396
+ return /* @__PURE__ */ React107.createElement(
9397
+ Autocomplete,
9398
+ {
9399
+ options,
9400
+ value: value ?? (multiple ? [] : null),
9401
+ onChange: (_, newValue) => onChange(newValue),
9402
+ onInputChange: handleInputChange,
9403
+ multiple,
9404
+ limitTags,
9405
+ loading,
9406
+ loadingText: /* @__PURE__ */ React107.createElement("span", { style: { display: "flex", alignItems: "center", gap: 8, padding: "4px 0" } }, /* @__PURE__ */ React107.createElement(circularProgress_default, { size: 16 }), /* @__PURE__ */ React107.createElement("span", { style: { fontSize: "0.875rem", color: "var(--text-secondary)" } }, "Loading\u2026")),
9407
+ getOptionLabel: getLabel,
9408
+ isOptionEqualToValue: (opt, val) => getOptionId(opt) === getOptionId(val),
9409
+ filterOptions: filterOptionsProp ? (opts, inputValue) => filterOptionsProp(opts, inputValue) : (opts, inputValue) => inputValue ? opts.filter((opt) => matchesSearch(opt, inputValue)) : opts,
9410
+ renderOption: (props, option) => {
9411
+ const { key, ...rest } = props;
9412
+ return /* @__PURE__ */ React107.createElement("li", { key, ...rest, style: { padding: "6px 12px", listStyle: "none" } }, /* @__PURE__ */ React107.createElement("span", { style: { display: "flex", alignItems: "center", gap: 10 } }, /* @__PURE__ */ React107.createElement(UserAvatar, { user: option }), /* @__PURE__ */ React107.createElement("span", { style: { display: "flex", flexDirection: "column", minWidth: 0 } }, /* @__PURE__ */ React107.createElement("span", { style: { fontSize: "0.85rem", color: "var(--text-color)", lineHeight: 1.3 } }, option.userFirstName, " ", option.userLastName), /* @__PURE__ */ React107.createElement("span", { style: { fontSize: "0.75rem", color: "var(--text-secondary)", lineHeight: 1.3 } }, option.emailId))));
9413
+ },
9414
+ label,
9415
+ placeholder: label,
9416
+ size,
9417
+ variant,
9418
+ disabled,
9419
+ error,
9420
+ helperText,
9421
+ fullWidth,
9422
+ required,
9423
+ className,
9424
+ style,
9425
+ sx
9426
+ }
9427
+ );
9428
+ }
9429
+
9333
9430
  // lib/RufousTextEditor/RufousTextEditor.tsx
9334
- import React117, { useMemo as useMemo4, useCallback as useCallback15, useState as useState35, useRef as useRef32, useEffect as useEffect29 } from "react";
9431
+ import React118, { useMemo as useMemo4, useCallback as useCallback15, useState as useState35, useRef as useRef32, useEffect as useEffect29 } from "react";
9335
9432
  import { createPortal as createPortal8 } from "react-dom";
9336
9433
  import { useEditor, EditorContent, EditorContext, FloatingMenu, BubbleMenu } from "@tiptap/react";
9337
9434
  import StarterKit from "@tiptap/starter-kit";
@@ -9357,7 +9454,7 @@ import { ReactRenderer } from "@tiptap/react";
9357
9454
  import tippy from "tippy.js";
9358
9455
 
9359
9456
  // lib/RufousTextEditor/MentionList.tsx
9360
- import React107, { forwardRef as forwardRef11, useEffect as useEffect21, useImperativeHandle, useState as useState26 } from "react";
9457
+ import React108, { forwardRef as forwardRef11, useEffect as useEffect21, useImperativeHandle, useState as useState26 } from "react";
9361
9458
  var MentionList = forwardRef11((props, ref) => {
9362
9459
  const [selectedIndex, setSelectedIndex] = useState26(0);
9363
9460
  const selectItem = (index) => {
@@ -9385,17 +9482,17 @@ var MentionList = forwardRef11((props, ref) => {
9385
9482
  }
9386
9483
  }));
9387
9484
  if (!props.items.length) {
9388
- return /* @__PURE__ */ React107.createElement("div", { className: "rf-rte-mention-dropdown" }, /* @__PURE__ */ React107.createElement("div", { className: "rf-rte-mention-item rf-rte-mention-no-result" }, "No results"));
9485
+ return /* @__PURE__ */ React108.createElement("div", { className: "rf-rte-mention-dropdown" }, /* @__PURE__ */ React108.createElement("div", { className: "rf-rte-mention-item rf-rte-mention-no-result" }, "No results"));
9389
9486
  }
9390
- return /* @__PURE__ */ React107.createElement("div", { className: "rf-rte-mention-dropdown" }, props.items.map((item, index) => /* @__PURE__ */ React107.createElement(
9487
+ return /* @__PURE__ */ React108.createElement("div", { className: "rf-rte-mention-dropdown" }, props.items.map((item, index) => /* @__PURE__ */ React108.createElement(
9391
9488
  "button",
9392
9489
  {
9393
9490
  className: `rf-rte-mention-item ${index === selectedIndex ? "is-selected" : ""}`,
9394
9491
  key: item.id,
9395
9492
  onClick: () => selectItem(index)
9396
9493
  },
9397
- /* @__PURE__ */ React107.createElement("span", { className: "rf-rte-mention-avatar" }, item.avatar || item.name.charAt(0).toUpperCase()),
9398
- /* @__PURE__ */ React107.createElement("span", { className: "rf-rte-mention-name" }, item.name)
9494
+ /* @__PURE__ */ React108.createElement("span", { className: "rf-rte-mention-avatar" }, item.avatar || item.name.charAt(0).toUpperCase()),
9495
+ /* @__PURE__ */ React108.createElement("span", { className: "rf-rte-mention-name" }, item.name)
9399
9496
  )));
9400
9497
  });
9401
9498
  MentionList.displayName = "MentionList";
@@ -9453,11 +9550,11 @@ function createMentionSuggestion(users) {
9453
9550
  }
9454
9551
 
9455
9552
  // lib/RufousTextEditor/Toolbar.tsx
9456
- import React113, { useState as useState31, useRef as useRef28, useEffect as useEffect25, useCallback as useCallback14 } from "react";
9553
+ import React114, { useState as useState31, useRef as useRef28, useEffect as useEffect25, useCallback as useCallback14 } from "react";
9457
9554
  import { createPortal as createPortal4 } from "react-dom";
9458
9555
 
9459
9556
  // lib/RufousTextEditor/TextToSpeech.tsx
9460
- import React108, { useState as useState27, useEffect as useEffect22, useRef as useRef25, useCallback as useCallback11, forwardRef as forwardRef12, useImperativeHandle as useImperativeHandle2 } from "react";
9557
+ import React109, { useState as useState27, useEffect as useEffect22, useRef as useRef25, useCallback as useCallback11, forwardRef as forwardRef12, useImperativeHandle as useImperativeHandle2 } from "react";
9461
9558
  var TextToSpeech = forwardRef12(({ editor, onTextToSpeech }, ref) => {
9462
9559
  const [speaking, setSpeaking] = useState27(false);
9463
9560
  const [paused, setPaused] = useState27(false);
@@ -9562,7 +9659,7 @@ var TextToSpeech = forwardRef12(({ editor, onTextToSpeech }, ref) => {
9562
9659
  setPaused(false);
9563
9660
  }, []);
9564
9661
  useImperativeHandle2(ref, () => ({ stop: handleStop }), [handleStop]);
9565
- return /* @__PURE__ */ React108.createElement("div", { className: "tts-wrapper", ref: panelRef }, /* @__PURE__ */ React108.createElement(Tooltip, { title: "Text to Speech", placement: "top" }, /* @__PURE__ */ React108.createElement(
9662
+ return /* @__PURE__ */ React109.createElement("div", { className: "tts-wrapper", ref: panelRef }, /* @__PURE__ */ React109.createElement(Tooltip, { title: "Text to Speech", placement: "top" }, /* @__PURE__ */ React109.createElement(
9566
9663
  "button",
9567
9664
  {
9568
9665
  className: `toolbar-btn ${speaking ? "is-active" : ""}`,
@@ -9575,15 +9672,15 @@ var TextToSpeech = forwardRef12(({ editor, onTextToSpeech }, ref) => {
9575
9672
  }
9576
9673
  },
9577
9674
  speaking ? "\u23F9" : "\u{1F50A}"
9578
- )), showPanel && !speaking && /* @__PURE__ */ React108.createElement("div", { className: "tts-panel" }, /* @__PURE__ */ React108.createElement("div", { className: "tts-panel-header" }, "Text to Speech"), /* @__PURE__ */ React108.createElement("label", { className: "tts-label" }, "Voice"), /* @__PURE__ */ React108.createElement(
9675
+ )), showPanel && !speaking && /* @__PURE__ */ React109.createElement("div", { className: "tts-panel" }, /* @__PURE__ */ React109.createElement("div", { className: "tts-panel-header" }, "Text to Speech"), /* @__PURE__ */ React109.createElement("label", { className: "tts-label" }, "Voice"), /* @__PURE__ */ React109.createElement(
9579
9676
  "select",
9580
9677
  {
9581
9678
  className: "tts-select",
9582
9679
  value: selectedVoice,
9583
9680
  onChange: (e) => setSelectedVoice(e.target.value)
9584
9681
  },
9585
- voices.map((v) => /* @__PURE__ */ React108.createElement("option", { key: v.name, value: v.name }, v.name, " (", v.lang, ")"))
9586
- ), /* @__PURE__ */ React108.createElement("label", { className: "tts-label" }, "Speed: ", rate, "x"), /* @__PURE__ */ React108.createElement(
9682
+ voices.map((v) => /* @__PURE__ */ React109.createElement("option", { key: v.name, value: v.name }, v.name, " (", v.lang, ")"))
9683
+ ), /* @__PURE__ */ React109.createElement("label", { className: "tts-label" }, "Speed: ", rate, "x"), /* @__PURE__ */ React109.createElement(
9587
9684
  "input",
9588
9685
  {
9589
9686
  type: "range",
@@ -9594,15 +9691,15 @@ var TextToSpeech = forwardRef12(({ editor, onTextToSpeech }, ref) => {
9594
9691
  value: rate,
9595
9692
  onChange: (e) => setRate(Number(e.target.value))
9596
9693
  }
9597
- ), /* @__PURE__ */ React108.createElement("div", { className: "tts-info" }, editor && !editor.state.selection.empty ? "Will read selected text" : "Will read all editor text"), /* @__PURE__ */ React108.createElement("button", { className: "tts-speak-btn", onClick: () => {
9694
+ ), /* @__PURE__ */ React109.createElement("div", { className: "tts-info" }, editor && !editor.state.selection.empty ? "Will read selected text" : "Will read all editor text"), /* @__PURE__ */ React109.createElement("button", { className: "tts-speak-btn", onClick: () => {
9598
9695
  handleSpeak();
9599
9696
  setShowPanel(false);
9600
- } }, "\u25B6 Speak")), speaking && /* @__PURE__ */ React108.createElement("div", { className: "tts-controls" }, paused ? /* @__PURE__ */ React108.createElement(Tooltip, { title: "Resume", placement: "top" }, /* @__PURE__ */ React108.createElement("button", { className: "toolbar-btn", onClick: handleResume }, "\u25B6")) : /* @__PURE__ */ React108.createElement(Tooltip, { title: "Pause", placement: "top" }, /* @__PURE__ */ React108.createElement("button", { className: "toolbar-btn", onClick: handlePause }, "\u275A\u275A")), /* @__PURE__ */ React108.createElement(Tooltip, { title: "Stop", placement: "top" }, /* @__PURE__ */ React108.createElement("button", { className: "toolbar-btn", onClick: handleStop }, "\u25A0"))));
9697
+ } }, "\u25B6 Speak")), speaking && /* @__PURE__ */ React109.createElement("div", { className: "tts-controls" }, paused ? /* @__PURE__ */ React109.createElement(Tooltip, { title: "Resume", placement: "top" }, /* @__PURE__ */ React109.createElement("button", { className: "toolbar-btn", onClick: handleResume }, "\u25B6")) : /* @__PURE__ */ React109.createElement(Tooltip, { title: "Pause", placement: "top" }, /* @__PURE__ */ React109.createElement("button", { className: "toolbar-btn", onClick: handlePause }, "\u275A\u275A")), /* @__PURE__ */ React109.createElement(Tooltip, { title: "Stop", placement: "top" }, /* @__PURE__ */ React109.createElement("button", { className: "toolbar-btn", onClick: handleStop }, "\u25A0"))));
9601
9698
  });
9602
9699
  var TextToSpeech_default = TextToSpeech;
9603
9700
 
9604
9701
  // lib/RufousTextEditor/SpeechToText.tsx
9605
- import React109, { useState as useState28, useRef as useRef26, useCallback as useCallback12, useEffect as useEffect23, forwardRef as forwardRef13, useImperativeHandle as useImperativeHandle3 } from "react";
9702
+ import React110, { useState as useState28, useRef as useRef26, useCallback as useCallback12, useEffect as useEffect23, forwardRef as forwardRef13, useImperativeHandle as useImperativeHandle3 } from "react";
9606
9703
  var SpeechToText = forwardRef13(({ editor, onSpeechToText }, ref) => {
9607
9704
  const [listening, setListening] = useState28(false);
9608
9705
  const [showPanel, setShowPanel] = useState28(false);
@@ -9716,7 +9813,7 @@ var SpeechToText = forwardRef13(({ editor, onSpeechToText }, ref) => {
9716
9813
  }, []);
9717
9814
  useImperativeHandle3(ref, () => ({ stop: stopListening }), [stopListening]);
9718
9815
  if (!supported) {
9719
- return /* @__PURE__ */ React109.createElement(Tooltip, { title: "Speech recognition not supported in this browser", placement: "top" }, /* @__PURE__ */ React109.createElement("button", { className: "toolbar-btn", disabled: true }, "\u{1F3A4}"));
9816
+ return /* @__PURE__ */ React110.createElement(Tooltip, { title: "Speech recognition not supported in this browser", placement: "top" }, /* @__PURE__ */ React110.createElement("button", { className: "toolbar-btn", disabled: true }, "\u{1F3A4}"));
9720
9817
  }
9721
9818
  const LANGUAGES2 = [
9722
9819
  { code: "en-US", label: "English (US)" },
@@ -9738,7 +9835,7 @@ var SpeechToText = forwardRef13(({ editor, onSpeechToText }, ref) => {
9738
9835
  { code: "kn-IN", label: "Kannada" },
9739
9836
  { code: "ml-IN", label: "Malayalam" }
9740
9837
  ];
9741
- return /* @__PURE__ */ React109.createElement("div", { className: "stt-wrapper", ref: panelRef }, /* @__PURE__ */ React109.createElement(Tooltip, { title: listening ? "Stop recording" : "Speech to Text", placement: "top" }, /* @__PURE__ */ React109.createElement(
9838
+ return /* @__PURE__ */ React110.createElement("div", { className: "stt-wrapper", ref: panelRef }, /* @__PURE__ */ React110.createElement(Tooltip, { title: listening ? "Stop recording" : "Speech to Text", placement: "top" }, /* @__PURE__ */ React110.createElement(
9742
9839
  "button",
9743
9840
  {
9744
9841
  className: `toolbar-btn ${listening ? "is-active stt-recording" : ""}`,
@@ -9751,20 +9848,20 @@ var SpeechToText = forwardRef13(({ editor, onSpeechToText }, ref) => {
9751
9848
  }
9752
9849
  },
9753
9850
  "\u{1F3A4}"
9754
- )), showPanel && !listening && /* @__PURE__ */ React109.createElement("div", { className: "stt-panel" }, /* @__PURE__ */ React109.createElement("div", { className: "stt-panel-header" }, "Speech to Text"), /* @__PURE__ */ React109.createElement("label", { className: "stt-label" }, "Language"), /* @__PURE__ */ React109.createElement(
9851
+ )), showPanel && !listening && /* @__PURE__ */ React110.createElement("div", { className: "stt-panel" }, /* @__PURE__ */ React110.createElement("div", { className: "stt-panel-header" }, "Speech to Text"), /* @__PURE__ */ React110.createElement("label", { className: "stt-label" }, "Language"), /* @__PURE__ */ React110.createElement(
9755
9852
  "select",
9756
9853
  {
9757
9854
  className: "stt-select",
9758
9855
  value: language,
9759
9856
  onChange: (e) => setLanguage(e.target.value)
9760
9857
  },
9761
- LANGUAGES2.map((l) => /* @__PURE__ */ React109.createElement("option", { key: l.code, value: l.code }, l.label))
9762
- ), /* @__PURE__ */ React109.createElement("div", { className: "stt-info" }, "Speak into your microphone and the text will be typed into the editor."), /* @__PURE__ */ React109.createElement("button", { className: "stt-start-btn", onClick: startListening }, "\u{1F3A4} Start Listening")), listening && interim && /* @__PURE__ */ React109.createElement("div", { className: "stt-interim" }, interim));
9858
+ LANGUAGES2.map((l) => /* @__PURE__ */ React110.createElement("option", { key: l.code, value: l.code }, l.label))
9859
+ ), /* @__PURE__ */ React110.createElement("div", { className: "stt-info" }, "Speak into your microphone and the text will be typed into the editor."), /* @__PURE__ */ React110.createElement("button", { className: "stt-start-btn", onClick: startListening }, "\u{1F3A4} Start Listening")), listening && interim && /* @__PURE__ */ React110.createElement("div", { className: "stt-interim" }, interim));
9763
9860
  });
9764
9861
  var SpeechToText_default = SpeechToText;
9765
9862
 
9766
9863
  // lib/RufousTextEditor/AICommands.tsx
9767
- import React110, { useState as useState29, useRef as useRef27, useEffect as useEffect24, useCallback as useCallback13 } from "react";
9864
+ import React111, { useState as useState29, useRef as useRef27, useEffect as useEffect24, useCallback as useCallback13 } from "react";
9768
9865
  import { createPortal as createPortal2 } from "react-dom";
9769
9866
  var AI_COMMANDS = [
9770
9867
  { id: "improve", label: "Improve writing", prompt: "Improve the following text to make it clearer, more engaging, and well-structured. Return only the improved text, no explanations." },
@@ -9905,15 +10002,15 @@ var AICommands = ({ editor, onAICommand }) => {
9905
10002
  setPreviousResults([]);
9906
10003
  }, []);
9907
10004
  if (!editor) return null;
9908
- return /* @__PURE__ */ React110.createElement(React110.Fragment, null, /* @__PURE__ */ React110.createElement("div", { className: "ai-commands-wrapper", ref: panelRef }, /* @__PURE__ */ React110.createElement(Tooltip, { title: "AI Commands", placement: "top" }, /* @__PURE__ */ React110.createElement(
10005
+ return /* @__PURE__ */ React111.createElement(React111.Fragment, null, /* @__PURE__ */ React111.createElement("div", { className: "ai-commands-wrapper", ref: panelRef }, /* @__PURE__ */ React111.createElement(Tooltip, { title: "AI Commands", placement: "top" }, /* @__PURE__ */ React111.createElement(
9909
10006
  "button",
9910
10007
  {
9911
10008
  className: `toolbar-btn ${open ? "is-active" : ""}`,
9912
10009
  onClick: () => setOpen(!open)
9913
10010
  },
9914
- /* @__PURE__ */ React110.createElement("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", stroke: "none" }, /* @__PURE__ */ React110.createElement("path", { d: "M9 2l1.5 3L14 6.5 10.5 8 9 11 7.5 8 4 6.5 7.5 5zM18 10l1 2 2 1-2 1-1 2-1-2-2-1 2-1zM5 17l1.5 3L10 21.5 6.5 23 5 26 3.5 23 0 21.5 3.5 20z" })),
9915
- /* @__PURE__ */ React110.createElement("span", { className: "dropdown-arrow" }, "\u25BE")
9916
- )), open && /* @__PURE__ */ React110.createElement("div", { className: "ai-commands-panel" }, /* @__PURE__ */ React110.createElement("div", { className: "ai-commands-header" }, "AI Commands"), /* @__PURE__ */ React110.createElement("div", { className: "ai-commands-list" }, AI_COMMANDS.map((cmd) => /* @__PURE__ */ React110.createElement(
10011
+ /* @__PURE__ */ React111.createElement("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", stroke: "none" }, /* @__PURE__ */ React111.createElement("path", { d: "M9 2l1.5 3L14 6.5 10.5 8 9 11 7.5 8 4 6.5 7.5 5zM18 10l1 2 2 1-2 1-1 2-1-2-2-1 2-1zM5 17l1.5 3L10 21.5 6.5 23 5 26 3.5 23 0 21.5 3.5 20z" })),
10012
+ /* @__PURE__ */ React111.createElement("span", { className: "dropdown-arrow" }, "\u25BE")
10013
+ )), open && /* @__PURE__ */ React111.createElement("div", { className: "ai-commands-panel" }, /* @__PURE__ */ React111.createElement("div", { className: "ai-commands-header" }, "AI Commands"), /* @__PURE__ */ React111.createElement("div", { className: "ai-commands-list" }, AI_COMMANDS.map((cmd) => /* @__PURE__ */ React111.createElement(
9917
10014
  "button",
9918
10015
  {
9919
10016
  key: cmd.id,
@@ -9921,8 +10018,8 @@ var AICommands = ({ editor, onAICommand }) => {
9921
10018
  onClick: () => handleCommandSelect(cmd)
9922
10019
  },
9923
10020
  cmd.label
9924
- ))), /* @__PURE__ */ React110.createElement("div", { className: "ai-commands-hint" }, editor.state.selection.empty ? "Will apply to all text" : "Will apply to selected text"))), showModal && createPortal2(
9925
- /* @__PURE__ */ React110.createElement("div", { className: "ai-modal-overlay", onMouseDown: handleCancel }, /* @__PURE__ */ React110.createElement("div", { className: "ai-modal", onMouseDown: (e) => e.stopPropagation() }, /* @__PURE__ */ React110.createElement("div", { className: "ai-modal-header" }, /* @__PURE__ */ React110.createElement("span", { className: "ai-modal-title" }, "AI Assistant"), /* @__PURE__ */ React110.createElement("button", { className: "ai-modal-close", onClick: handleCancel }, "\xD7")), /* @__PURE__ */ React110.createElement("div", { className: "ai-modal-prompt-section" }, /* @__PURE__ */ React110.createElement("label", { className: "ai-modal-label" }, "Prompt"), /* @__PURE__ */ React110.createElement("div", { className: "ai-modal-prompt-row" }, /* @__PURE__ */ React110.createElement(
10021
+ ))), /* @__PURE__ */ React111.createElement("div", { className: "ai-commands-hint" }, editor.state.selection.empty ? "Will apply to all text" : "Will apply to selected text"))), showModal && createPortal2(
10022
+ /* @__PURE__ */ React111.createElement("div", { className: "ai-modal-overlay", onMouseDown: handleCancel }, /* @__PURE__ */ React111.createElement("div", { className: "ai-modal", onMouseDown: (e) => e.stopPropagation() }, /* @__PURE__ */ React111.createElement("div", { className: "ai-modal-header" }, /* @__PURE__ */ React111.createElement("span", { className: "ai-modal-title" }, "AI Assistant"), /* @__PURE__ */ React111.createElement("button", { className: "ai-modal-close", onClick: handleCancel }, "\xD7")), /* @__PURE__ */ React111.createElement("div", { className: "ai-modal-prompt-section" }, /* @__PURE__ */ React111.createElement("label", { className: "ai-modal-label" }, "Prompt"), /* @__PURE__ */ React111.createElement("div", { className: "ai-modal-prompt-row" }, /* @__PURE__ */ React111.createElement(
9926
10023
  "textarea",
9927
10024
  {
9928
10025
  className: "ai-modal-prompt",
@@ -9930,15 +10027,15 @@ var AICommands = ({ editor, onAICommand }) => {
9930
10027
  onChange: (e) => setPromptText(e.target.value),
9931
10028
  rows: 3
9932
10029
  }
9933
- ), /* @__PURE__ */ React110.createElement(Tooltip, { title: "Run with custom prompt", placement: "top" }, /* @__PURE__ */ React110.createElement(
10030
+ ), /* @__PURE__ */ React111.createElement(Tooltip, { title: "Run with custom prompt", placement: "top" }, /* @__PURE__ */ React111.createElement(
9934
10031
  "button",
9935
10032
  {
9936
10033
  className: "ai-modal-robot-btn",
9937
10034
  onClick: () => fetchAIResult(promptText, originalText),
9938
10035
  disabled: loading
9939
10036
  },
9940
- /* @__PURE__ */ React110.createElement("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React110.createElement("rect", { x: "3", y: "11", width: "18", height: "10", rx: "2" }), /* @__PURE__ */ React110.createElement("circle", { cx: "9", cy: "16", r: "1" }), /* @__PURE__ */ React110.createElement("circle", { cx: "15", cy: "16", r: "1" }), /* @__PURE__ */ React110.createElement("path", { d: "M12 2v4" }), /* @__PURE__ */ React110.createElement("path", { d: "M8 7h8" }))
9941
- )))), /* @__PURE__ */ React110.createElement("div", { className: "ai-modal-actions" }, /* @__PURE__ */ React110.createElement(
10037
+ /* @__PURE__ */ React111.createElement("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React111.createElement("rect", { x: "3", y: "11", width: "18", height: "10", rx: "2" }), /* @__PURE__ */ React111.createElement("circle", { cx: "9", cy: "16", r: "1" }), /* @__PURE__ */ React111.createElement("circle", { cx: "15", cy: "16", r: "1" }), /* @__PURE__ */ React111.createElement("path", { d: "M12 2v4" }), /* @__PURE__ */ React111.createElement("path", { d: "M8 7h8" }))
10038
+ )))), /* @__PURE__ */ React111.createElement("div", { className: "ai-modal-actions" }, /* @__PURE__ */ React111.createElement(
9942
10039
  "button",
9943
10040
  {
9944
10041
  className: "ai-modal-action-btn ai-modal-insert-btn",
@@ -9946,7 +10043,7 @@ var AICommands = ({ editor, onAICommand }) => {
9946
10043
  disabled: loading || !resultText
9947
10044
  },
9948
10045
  "Insert"
9949
- ), /* @__PURE__ */ React110.createElement(
10046
+ ), /* @__PURE__ */ React111.createElement(
9950
10047
  "button",
9951
10048
  {
9952
10049
  className: "ai-modal-action-btn ai-modal-insert-after-btn ms-2",
@@ -9954,22 +10051,22 @@ var AICommands = ({ editor, onAICommand }) => {
9954
10051
  disabled: loading || !resultText
9955
10052
  },
9956
10053
  "Insert After"
9957
- ), /* @__PURE__ */ React110.createElement(Tooltip, { title: "Generate another response", placement: "top" }, /* @__PURE__ */ React110.createElement(
10054
+ ), /* @__PURE__ */ React111.createElement(Tooltip, { title: "Generate another response", placement: "top" }, /* @__PURE__ */ React111.createElement(
9958
10055
  "button",
9959
10056
  {
9960
10057
  className: "ai-modal-action-btn ai-modal-refresh-btn",
9961
10058
  onClick: handleRefresh,
9962
10059
  disabled: loading
9963
10060
  },
9964
- /* @__PURE__ */ React110.createElement("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React110.createElement("path", { d: "M21 2v6h-6" }), /* @__PURE__ */ React110.createElement("path", { d: "M3 12a9 9 0 0 1 15-6.7L21 8" }), /* @__PURE__ */ React110.createElement("path", { d: "M3 22v-6h6" }), /* @__PURE__ */ React110.createElement("path", { d: "M21 12a9 9 0 0 1-15 6.7L3 16" }))
9965
- ))), /* @__PURE__ */ React110.createElement("div", { className: "ai-modal-result-section" }, loading ? /* @__PURE__ */ React110.createElement("div", { className: "ai-modal-loading" }, /* @__PURE__ */ React110.createElement("span", { className: "ai-spinner" }), /* @__PURE__ */ React110.createElement("span", null, "Generating response...")) : /* @__PURE__ */ React110.createElement("div", { className: "ai-modal-result" }, resultText)), /* @__PURE__ */ React110.createElement("div", { className: "ai-modal-footer" }, /* @__PURE__ */ React110.createElement("button", { className: "ai-modal-cancel-btn", onClick: handleCancel }, "CANCEL")))),
10061
+ /* @__PURE__ */ React111.createElement("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React111.createElement("path", { d: "M21 2v6h-6" }), /* @__PURE__ */ React111.createElement("path", { d: "M3 12a9 9 0 0 1 15-6.7L21 8" }), /* @__PURE__ */ React111.createElement("path", { d: "M3 22v-6h6" }), /* @__PURE__ */ React111.createElement("path", { d: "M21 12a9 9 0 0 1-15 6.7L3 16" }))
10062
+ ))), /* @__PURE__ */ React111.createElement("div", { className: "ai-modal-result-section" }, loading ? /* @__PURE__ */ React111.createElement("div", { className: "ai-modal-loading" }, /* @__PURE__ */ React111.createElement("span", { className: "ai-spinner" }), /* @__PURE__ */ React111.createElement("span", null, "Generating response...")) : /* @__PURE__ */ React111.createElement("div", { className: "ai-modal-result" }, resultText)), /* @__PURE__ */ React111.createElement("div", { className: "ai-modal-footer" }, /* @__PURE__ */ React111.createElement("button", { className: "ai-modal-cancel-btn", onClick: handleCancel }, "CANCEL")))),
9966
10063
  document.body
9967
10064
  ));
9968
10065
  };
9969
10066
  var AICommands_default = AICommands;
9970
10067
 
9971
10068
  // lib/RufousTextEditor/TranslateModal.tsx
9972
- import React111, { useState as useState30, useMemo as useMemo3 } from "react";
10069
+ import React112, { useState as useState30, useMemo as useMemo3 } from "react";
9973
10070
  import { createPortal as createPortal3 } from "react-dom";
9974
10071
  var LANGUAGES = [
9975
10072
  { code: "af", name: "Afrikaans" },
@@ -10162,7 +10259,7 @@ var TranslateModal = ({ editor, onClose, onTranslate, initialSource, initialTarg
10162
10259
  }
10163
10260
  };
10164
10261
  return createPortal3(
10165
- /* @__PURE__ */ React111.createElement("div", { className: "modal-overlay", onClick: onClose }, /* @__PURE__ */ React111.createElement("div", { className: "modal-content translate-modal", onClick: (e) => e.stopPropagation() }, /* @__PURE__ */ React111.createElement("div", { className: "modal-header" }, /* @__PURE__ */ React111.createElement("h3", null, "Translate options"), /* @__PURE__ */ React111.createElement("button", { className: "modal-close", onClick: onClose }, "\xD7")), /* @__PURE__ */ React111.createElement("div", { className: "modal-body" }, /* @__PURE__ */ React111.createElement("div", { className: "translate-columns" }, /* @__PURE__ */ React111.createElement("div", { className: "translate-col" }, /* @__PURE__ */ React111.createElement("div", { className: "translate-filter" }, /* @__PURE__ */ React111.createElement(
10262
+ /* @__PURE__ */ React112.createElement("div", { className: "modal-overlay", onClick: onClose }, /* @__PURE__ */ React112.createElement("div", { className: "modal-content translate-modal", onClick: (e) => e.stopPropagation() }, /* @__PURE__ */ React112.createElement("div", { className: "modal-header" }, /* @__PURE__ */ React112.createElement("h3", null, "Translate options"), /* @__PURE__ */ React112.createElement("button", { className: "modal-close", onClick: onClose }, "\xD7")), /* @__PURE__ */ React112.createElement("div", { className: "modal-body" }, /* @__PURE__ */ React112.createElement("div", { className: "translate-columns" }, /* @__PURE__ */ React112.createElement("div", { className: "translate-col" }, /* @__PURE__ */ React112.createElement("div", { className: "translate-filter" }, /* @__PURE__ */ React112.createElement(
10166
10263
  "input",
10167
10264
  {
10168
10265
  type: "text",
@@ -10171,16 +10268,16 @@ var TranslateModal = ({ editor, onClose, onTranslate, initialSource, initialTarg
10171
10268
  onChange: (e) => setSourceFilter(e.target.value),
10172
10269
  className: "translate-filter-input"
10173
10270
  }
10174
- )), /* @__PURE__ */ React111.createElement("div", { className: "translate-list" }, filteredSource.map((lang) => /* @__PURE__ */ React111.createElement(
10271
+ )), /* @__PURE__ */ React112.createElement("div", { className: "translate-list" }, filteredSource.map((lang) => /* @__PURE__ */ React112.createElement(
10175
10272
  "button",
10176
10273
  {
10177
10274
  key: lang.code,
10178
10275
  className: `translate-item ${sourceLang === lang.code ? "active" : ""}`,
10179
10276
  onClick: () => setSourceLang(lang.code)
10180
10277
  },
10181
- /* @__PURE__ */ React111.createElement("span", { className: "translate-code" }, lang.code),
10182
- /* @__PURE__ */ React111.createElement("span", { className: "translate-name" }, lang.name)
10183
- )))), /* @__PURE__ */ React111.createElement("div", { className: "translate-swap" }, /* @__PURE__ */ React111.createElement(Tooltip, { title: "Swap languages", placement: "top" }, /* @__PURE__ */ React111.createElement("button", { className: "translate-swap-btn", onClick: handleSwap }, "\u21C4"))), /* @__PURE__ */ React111.createElement("div", { className: "translate-col" }, /* @__PURE__ */ React111.createElement("div", { className: "translate-filter" }, /* @__PURE__ */ React111.createElement(
10278
+ /* @__PURE__ */ React112.createElement("span", { className: "translate-code" }, lang.code),
10279
+ /* @__PURE__ */ React112.createElement("span", { className: "translate-name" }, lang.name)
10280
+ )))), /* @__PURE__ */ React112.createElement("div", { className: "translate-swap" }, /* @__PURE__ */ React112.createElement(Tooltip, { title: "Swap languages", placement: "top" }, /* @__PURE__ */ React112.createElement("button", { className: "translate-swap-btn", onClick: handleSwap }, "\u21C4"))), /* @__PURE__ */ React112.createElement("div", { className: "translate-col" }, /* @__PURE__ */ React112.createElement("div", { className: "translate-filter" }, /* @__PURE__ */ React112.createElement(
10184
10281
  "input",
10185
10282
  {
10186
10283
  type: "text",
@@ -10189,16 +10286,16 @@ var TranslateModal = ({ editor, onClose, onTranslate, initialSource, initialTarg
10189
10286
  onChange: (e) => setTargetFilter(e.target.value),
10190
10287
  className: "translate-filter-input"
10191
10288
  }
10192
- )), /* @__PURE__ */ React111.createElement("div", { className: "translate-list" }, filteredTarget.map((lang) => /* @__PURE__ */ React111.createElement(
10289
+ )), /* @__PURE__ */ React112.createElement("div", { className: "translate-list" }, filteredTarget.map((lang) => /* @__PURE__ */ React112.createElement(
10193
10290
  "button",
10194
10291
  {
10195
10292
  key: lang.code,
10196
10293
  className: `translate-item ${targetLang === lang.code ? "active" : ""}`,
10197
10294
  onClick: () => setTargetLang(lang.code)
10198
10295
  },
10199
- /* @__PURE__ */ React111.createElement("span", { className: "translate-code" }, lang.code),
10200
- /* @__PURE__ */ React111.createElement("span", { className: "translate-name" }, lang.name)
10201
- ))))), error && /* @__PURE__ */ React111.createElement("div", { className: "translate-error" }, error)), /* @__PURE__ */ React111.createElement("div", { className: "modal-footer" }, /* @__PURE__ */ React111.createElement("div", { className: "modal-footer-left" }, /* @__PURE__ */ React111.createElement("button", { className: "modal-btn-cancel", onClick: onClose }, "Cancel")), /* @__PURE__ */ React111.createElement("button", { className: "modal-btn-apply", onClick: handleSave, disabled: translating }, translating ? "Translating..." : "Save")))),
10296
+ /* @__PURE__ */ React112.createElement("span", { className: "translate-code" }, lang.code),
10297
+ /* @__PURE__ */ React112.createElement("span", { className: "translate-name" }, lang.name)
10298
+ ))))), error && /* @__PURE__ */ React112.createElement("div", { className: "translate-error" }, error)), /* @__PURE__ */ React112.createElement("div", { className: "modal-footer" }, /* @__PURE__ */ React112.createElement("div", { className: "modal-footer-left" }, /* @__PURE__ */ React112.createElement("button", { className: "modal-btn-cancel", onClick: onClose }, "Cancel")), /* @__PURE__ */ React112.createElement("button", { className: "modal-btn-apply", onClick: handleSave, disabled: translating }, translating ? "Translating..." : "Save")))),
10202
10299
  document.body
10203
10300
  );
10204
10301
  };
@@ -10849,38 +10946,38 @@ var CustomTaskItem = TaskItem.extend({
10849
10946
  });
10850
10947
 
10851
10948
  // lib/RufousTextEditor/icons.tsx
10852
- import * as React112 from "react";
10949
+ import * as React113 from "react";
10853
10950
  var s = { width: 20, height: 20, viewBox: "0 0 24 24", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg" };
10854
- var IconUndo = () => /* @__PURE__ */ React112.createElement("svg", { ...s }, /* @__PURE__ */ React112.createElement("path", { d: "M12.5 8C9.85 8 7.45 9 5.6 10.6L2 7v9h9l-3.62-3.62C8.93 11.01 10.63 10.2 12.5 10.2c3.03 0 5.6 1.93 6.55 4.63l2.15-.72C19.93 10.68 16.5 8 12.5 8z" }));
10855
- var IconRedo = () => /* @__PURE__ */ React112.createElement("svg", { ...s }, /* @__PURE__ */ React112.createElement("path", { d: "M18.4 10.6C16.55 9 14.15 8 11.5 8c-4 0-7.43 2.68-8.7 6.11l2.15.72c.95-2.7 3.52-4.63 6.55-4.63 1.87 0 3.57.81 5.12 2.18L13 16h9V7l-3.6 3.6z" }));
10856
- var IconBold = () => /* @__PURE__ */ React112.createElement("svg", { ...s }, /* @__PURE__ */ React112.createElement("path", { d: "M15.6 10.79c.97-.67 1.65-1.77 1.65-2.79 0-2.26-1.75-4-4-4H7v14h7.04c2.09 0 3.71-1.7 3.71-3.79 0-1.52-.86-2.82-2.15-3.42zM10 6.5h3c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5h-3v-3zm3.5 9H10v-3h3.5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5z" }));
10857
- var IconItalic = () => /* @__PURE__ */ React112.createElement("svg", { ...s }, /* @__PURE__ */ React112.createElement("path", { d: "M10 4v3h2.21l-3.42 8H6v3h8v-3h-2.21l3.42-8H18V4z" }));
10858
- var IconLink = () => /* @__PURE__ */ React112.createElement("svg", { ...s }, /* @__PURE__ */ React112.createElement("path", { d: "M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z" }));
10859
- var IconStrike = () => /* @__PURE__ */ React112.createElement("svg", { ...s }, /* @__PURE__ */ React112.createElement("path", { d: "M7.24 11h2.01c-.13-.42-.2-.88-.2-1.37 0-.89.32-1.58.96-2.08.64-.49 1.46-.74 2.47-.74.99 0 1.81.24 2.46.71.64.47.97 1.1.97 1.88h2.04c0-1.27-.55-2.33-1.64-3.18C15.21 5.37 13.83 4.95 12.2 4.95c-1.69 0-3.09.43-4.2 1.3C6.9 7.1 6.35 8.23 6.35 9.63c0 .47.06.92.18 1.37H3v2h18v-2H7.24zM12.2 17.05c-1.03 0-1.89-.28-2.56-.84-.67-.56-1-1.27-1-2.13h-2.1c0 1.36.58 2.5 1.75 3.44 1.16.93 2.56 1.4 4.19 1.4 1.69 0 3.09-.43 4.2-1.3 1.1-.86 1.65-1.99 1.65-3.38h-2.1c0 .85-.33 1.56-1 2.13-.66.56-1.52.84-2.56.84l-.47-.16z" }));
10860
- var IconHeading = () => /* @__PURE__ */ React112.createElement("svg", { ...s }, /* @__PURE__ */ React112.createElement("path", { d: "M5 4v3h5.5v12h3V7H19V4z" }));
10861
- var IconFontSize = () => /* @__PURE__ */ React112.createElement("svg", { ...s }, /* @__PURE__ */ React112.createElement("path", { d: "M9 4v3h5v12h2V7h5V4H9zm-6 8h3v7h2v-7h3v-2H3v2z" }));
10862
- var IconColor = () => /* @__PURE__ */ React112.createElement("svg", { ...s }, /* @__PURE__ */ React112.createElement("path", { d: "M11 2L5.5 16h2.25l1.12-3h6.25l1.12 3h2.25L13 2h-2zm-1.38 9L12 4.67 14.38 11H9.62z" }), /* @__PURE__ */ React112.createElement("path", { d: "M3 20h18v3H3z", opacity: "0.8" }));
10863
- var IconFont = () => /* @__PURE__ */ React112.createElement("svg", { ...s }, /* @__PURE__ */ React112.createElement("path", { d: "M9.93 13.5h4.14L12 7.98 9.93 13.5zM20 2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-4.05 16.5l-1.14-3H9.17l-1.12 3H5.96l5.11-13h1.86l5.11 13h-2.09z" }));
10864
- var IconLineHeight = () => /* @__PURE__ */ React112.createElement("svg", { ...s }, /* @__PURE__ */ React112.createElement("path", { d: "M6 7h2.5L5 3.5 1.5 7H4v10H1.5L5 20.5 8.5 17H6V7zm16-3h-8v2h8V4zm0 4h-8v2h8V8zm0 4h-8v2h8v-2zm0 4h-8v2h8v-2z" }));
10865
- var IconBulletList = () => /* @__PURE__ */ React112.createElement("svg", { ...s }, /* @__PURE__ */ React112.createElement("path", { d: "M4 10.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5zm0-6c-.83 0-1.5.67-1.5 1.5S3.17 7.5 4 7.5 5.5 6.83 5.5 6 4.83 4.5 4 4.5zm0 12c-.83 0-1.5.68-1.5 1.5s.68 1.5 1.5 1.5 1.5-.68 1.5-1.5-.67-1.5-1.5-1.5zM7 19h14v-2H7v2zm0-6h14v-2H7v2zm0-8v2h14V5H7z" }));
10866
- var IconOrderedList = () => /* @__PURE__ */ React112.createElement("svg", { ...s }, /* @__PURE__ */ React112.createElement("path", { d: "M2 17h2v.5H3v1h1v.5H2v1h3v-4H2v1zm1-9h1V4H2v1h1v3zm-1 3h1.8L2 13.1v.9h3v-1H3.2L5 10.9V10H2v1zm5-6v2h14V5H7zm0 14h14v-2H7v2zm0-6h14v-2H7v2z" }));
10867
- var IconAlignLeft = () => /* @__PURE__ */ React112.createElement("svg", { ...s }, /* @__PURE__ */ React112.createElement("path", { d: "M15 15H3v2h12v-2zm0-8H3v2h12V7zM3 13h18v-2H3v2zM3 21h18v-2H3v2zM3 3v2h18V3H3z" }));
10868
- var IconAlignCenter = () => /* @__PURE__ */ React112.createElement("svg", { ...s }, /* @__PURE__ */ React112.createElement("path", { d: "M7 15v2h10v-2H7zm-4 6h18v-2H3v2zm0-8h18v-2H3v2zm4-6v2h10V7H7zM3 3v2h18V3H3z" }));
10869
- var IconAlignRight = () => /* @__PURE__ */ React112.createElement("svg", { ...s }, /* @__PURE__ */ React112.createElement("path", { d: "M3 21h18v-2H3v2zm6-4h12v-2H9v2zm-6-4h18v-2H3v2zm6-4h12V7H9v2zM3 3v2h18V3H3z" }));
10870
- var IconAlignJustify = () => /* @__PURE__ */ React112.createElement("svg", { ...s }, /* @__PURE__ */ React112.createElement("path", { d: "M3 21h18v-2H3v2zm0-4h18v-2H3v2zm0-4h18v-2H3v2zm0-4h18V7H3v2zM3 3v2h18V3H3z" }));
10871
- var IconIndentIncrease = () => /* @__PURE__ */ React112.createElement("svg", { ...s }, /* @__PURE__ */ React112.createElement("path", { d: "M3 21h18v-2H3v2zM3 8v8l4-4-4-4zm8 9h10v-2H11v2zM3 3v2h18V3H3zm8 6h10V7H11v2zm0 4h10v-2H11v2z" }));
10872
- var IconIndentDecrease = () => /* @__PURE__ */ React112.createElement("svg", { ...s }, /* @__PURE__ */ React112.createElement("path", { d: "M11 17h10v-2H11v2zm-8-5l4 4V8l-4 4zm0 9h18v-2H3v2zM3 3v2h18V3H3zm8 6h10V7H11v2zm0 4h10v-2H11v2z" }));
10873
- var IconTable = () => /* @__PURE__ */ React112.createElement("svg", { ...s }, /* @__PURE__ */ React112.createElement("path", { d: "M20 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h15c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM5 19V5h4v14H5zm6 0V5h4v14h-4zm6 0V5h3v14h-3z", fillRule: "evenodd" }));
10874
- var IconImage = () => /* @__PURE__ */ React112.createElement("svg", { ...s }, /* @__PURE__ */ React112.createElement("path", { d: "M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z" }));
10875
- var IconVideo = () => /* @__PURE__ */ React112.createElement("svg", { ...s }, /* @__PURE__ */ React112.createElement("path", { d: "M4 6.47L5.76 10H20v8H4V6.47M22 4h-4l2 4h-3l-2-4h-2l2 4h-3l-2-4H8l2 4H7L5 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4z" }));
10876
- var IconCut = () => /* @__PURE__ */ React112.createElement("svg", { ...s }, /* @__PURE__ */ React112.createElement("path", { d: "M9.64 7.64c.23-.5.36-1.05.36-1.64 0-2.21-1.79-4-4-4S2 3.79 2 6s1.79 4 4 4c.59 0 1.14-.13 1.64-.36L10 12l-2.36 2.36C7.14 14.13 6.59 14 6 14c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4c0-.59-.13-1.14-.36-1.64L12 14l7 7h3v-1L9.64 7.64zM6 8c-1.1 0-2-.89-2-2s.9-2 2-2 2 .89 2 2-.9 2-2 2zm0 12c-1.1 0-2-.89-2-2s.9-2 2-2 2 .89 2 2-.9 2-2 2zm6-7.5c-.28 0-.5-.22-.5-.5s.22-.5.5-.5.5.22.5.5-.22.5-.5.5zM19 3l-6 6 2 2 7-7V3h-3z" }));
10877
- var IconCopy = () => /* @__PURE__ */ React112.createElement("svg", { ...s }, /* @__PURE__ */ React112.createElement("path", { d: "M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z" }));
10878
- var IconCode = () => /* @__PURE__ */ React112.createElement("svg", { ...s }, /* @__PURE__ */ React112.createElement("path", { d: "M9.4 16.6L4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0l4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z" }));
10879
- var IconFullscreen = () => /* @__PURE__ */ React112.createElement("svg", { ...s }, /* @__PURE__ */ React112.createElement("path", { d: "M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z" }));
10880
- var IconTranslate = () => /* @__PURE__ */ React112.createElement("svg", { ...s }, /* @__PURE__ */ React112.createElement("path", { d: "M12.87 15.07l-2.54-2.51.03-.03A17.52 17.52 0 0014.07 6H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2.02c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z" }));
10881
- var IconTaskList = () => /* @__PURE__ */ React112.createElement("svg", { ...s }, /* @__PURE__ */ React112.createElement("path", { d: "M22 8c0-.55-.45-1-1-1h-7c-.55 0-1 .45-1 1s.45 1 1 1h7c.55 0 1-.45 1-1zm0 8c0-.55-.45-1-1-1h-7c-.55 0-1 .45-1 1s.45 1 1 1h7c.55 0 1-.45 1-1zM5.54 11L2 7.46l1.41-1.41 2.12 2.12 4.24-4.24 1.41 1.41L5.54 11zm0 8L2 15.46l1.41-1.41 2.12 2.12 4.24-4.24 1.41 1.41L5.54 19z" }));
10882
- var IconCheck = () => /* @__PURE__ */ React112.createElement("svg", { ...s }, /* @__PURE__ */ React112.createElement("path", { d: "M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z" }));
10883
- var IconPaste = () => /* @__PURE__ */ React112.createElement("svg", { ...s }, /* @__PURE__ */ React112.createElement("path", { d: "M19 2h-4.18C14.4.84 13.3 0 12 0c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm7 18H5V4h2v3h10V4h2v16z" }));
10951
+ var IconUndo = () => /* @__PURE__ */ React113.createElement("svg", { ...s }, /* @__PURE__ */ React113.createElement("path", { d: "M12.5 8C9.85 8 7.45 9 5.6 10.6L2 7v9h9l-3.62-3.62C8.93 11.01 10.63 10.2 12.5 10.2c3.03 0 5.6 1.93 6.55 4.63l2.15-.72C19.93 10.68 16.5 8 12.5 8z" }));
10952
+ var IconRedo = () => /* @__PURE__ */ React113.createElement("svg", { ...s }, /* @__PURE__ */ React113.createElement("path", { d: "M18.4 10.6C16.55 9 14.15 8 11.5 8c-4 0-7.43 2.68-8.7 6.11l2.15.72c.95-2.7 3.52-4.63 6.55-4.63 1.87 0 3.57.81 5.12 2.18L13 16h9V7l-3.6 3.6z" }));
10953
+ var IconBold = () => /* @__PURE__ */ React113.createElement("svg", { ...s }, /* @__PURE__ */ React113.createElement("path", { d: "M15.6 10.79c.97-.67 1.65-1.77 1.65-2.79 0-2.26-1.75-4-4-4H7v14h7.04c2.09 0 3.71-1.7 3.71-3.79 0-1.52-.86-2.82-2.15-3.42zM10 6.5h3c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5h-3v-3zm3.5 9H10v-3h3.5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5z" }));
10954
+ var IconItalic = () => /* @__PURE__ */ React113.createElement("svg", { ...s }, /* @__PURE__ */ React113.createElement("path", { d: "M10 4v3h2.21l-3.42 8H6v3h8v-3h-2.21l3.42-8H18V4z" }));
10955
+ var IconLink = () => /* @__PURE__ */ React113.createElement("svg", { ...s }, /* @__PURE__ */ React113.createElement("path", { d: "M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z" }));
10956
+ var IconStrike = () => /* @__PURE__ */ React113.createElement("svg", { ...s }, /* @__PURE__ */ React113.createElement("path", { d: "M7.24 11h2.01c-.13-.42-.2-.88-.2-1.37 0-.89.32-1.58.96-2.08.64-.49 1.46-.74 2.47-.74.99 0 1.81.24 2.46.71.64.47.97 1.1.97 1.88h2.04c0-1.27-.55-2.33-1.64-3.18C15.21 5.37 13.83 4.95 12.2 4.95c-1.69 0-3.09.43-4.2 1.3C6.9 7.1 6.35 8.23 6.35 9.63c0 .47.06.92.18 1.37H3v2h18v-2H7.24zM12.2 17.05c-1.03 0-1.89-.28-2.56-.84-.67-.56-1-1.27-1-2.13h-2.1c0 1.36.58 2.5 1.75 3.44 1.16.93 2.56 1.4 4.19 1.4 1.69 0 3.09-.43 4.2-1.3 1.1-.86 1.65-1.99 1.65-3.38h-2.1c0 .85-.33 1.56-1 2.13-.66.56-1.52.84-2.56.84l-.47-.16z" }));
10957
+ var IconHeading = () => /* @__PURE__ */ React113.createElement("svg", { ...s }, /* @__PURE__ */ React113.createElement("path", { d: "M5 4v3h5.5v12h3V7H19V4z" }));
10958
+ var IconFontSize = () => /* @__PURE__ */ React113.createElement("svg", { ...s }, /* @__PURE__ */ React113.createElement("path", { d: "M9 4v3h5v12h2V7h5V4H9zm-6 8h3v7h2v-7h3v-2H3v2z" }));
10959
+ var IconColor = () => /* @__PURE__ */ React113.createElement("svg", { ...s }, /* @__PURE__ */ React113.createElement("path", { d: "M11 2L5.5 16h2.25l1.12-3h6.25l1.12 3h2.25L13 2h-2zm-1.38 9L12 4.67 14.38 11H9.62z" }), /* @__PURE__ */ React113.createElement("path", { d: "M3 20h18v3H3z", opacity: "0.8" }));
10960
+ var IconFont = () => /* @__PURE__ */ React113.createElement("svg", { ...s }, /* @__PURE__ */ React113.createElement("path", { d: "M9.93 13.5h4.14L12 7.98 9.93 13.5zM20 2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-4.05 16.5l-1.14-3H9.17l-1.12 3H5.96l5.11-13h1.86l5.11 13h-2.09z" }));
10961
+ var IconLineHeight = () => /* @__PURE__ */ React113.createElement("svg", { ...s }, /* @__PURE__ */ React113.createElement("path", { d: "M6 7h2.5L5 3.5 1.5 7H4v10H1.5L5 20.5 8.5 17H6V7zm16-3h-8v2h8V4zm0 4h-8v2h8V8zm0 4h-8v2h8v-2zm0 4h-8v2h8v-2z" }));
10962
+ var IconBulletList = () => /* @__PURE__ */ React113.createElement("svg", { ...s }, /* @__PURE__ */ React113.createElement("path", { d: "M4 10.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5zm0-6c-.83 0-1.5.67-1.5 1.5S3.17 7.5 4 7.5 5.5 6.83 5.5 6 4.83 4.5 4 4.5zm0 12c-.83 0-1.5.68-1.5 1.5s.68 1.5 1.5 1.5 1.5-.68 1.5-1.5-.67-1.5-1.5-1.5zM7 19h14v-2H7v2zm0-6h14v-2H7v2zm0-8v2h14V5H7z" }));
10963
+ var IconOrderedList = () => /* @__PURE__ */ React113.createElement("svg", { ...s }, /* @__PURE__ */ React113.createElement("path", { d: "M2 17h2v.5H3v1h1v.5H2v1h3v-4H2v1zm1-9h1V4H2v1h1v3zm-1 3h1.8L2 13.1v.9h3v-1H3.2L5 10.9V10H2v1zm5-6v2h14V5H7zm0 14h14v-2H7v2zm0-6h14v-2H7v2z" }));
10964
+ var IconAlignLeft = () => /* @__PURE__ */ React113.createElement("svg", { ...s }, /* @__PURE__ */ React113.createElement("path", { d: "M15 15H3v2h12v-2zm0-8H3v2h12V7zM3 13h18v-2H3v2zM3 21h18v-2H3v2zM3 3v2h18V3H3z" }));
10965
+ var IconAlignCenter = () => /* @__PURE__ */ React113.createElement("svg", { ...s }, /* @__PURE__ */ React113.createElement("path", { d: "M7 15v2h10v-2H7zm-4 6h18v-2H3v2zm0-8h18v-2H3v2zm4-6v2h10V7H7zM3 3v2h18V3H3z" }));
10966
+ var IconAlignRight = () => /* @__PURE__ */ React113.createElement("svg", { ...s }, /* @__PURE__ */ React113.createElement("path", { d: "M3 21h18v-2H3v2zm6-4h12v-2H9v2zm-6-4h18v-2H3v2zm6-4h12V7H9v2zM3 3v2h18V3H3z" }));
10967
+ var IconAlignJustify = () => /* @__PURE__ */ React113.createElement("svg", { ...s }, /* @__PURE__ */ React113.createElement("path", { d: "M3 21h18v-2H3v2zm0-4h18v-2H3v2zm0-4h18v-2H3v2zm0-4h18V7H3v2zM3 3v2h18V3H3z" }));
10968
+ var IconIndentIncrease = () => /* @__PURE__ */ React113.createElement("svg", { ...s }, /* @__PURE__ */ React113.createElement("path", { d: "M3 21h18v-2H3v2zM3 8v8l4-4-4-4zm8 9h10v-2H11v2zM3 3v2h18V3H3zm8 6h10V7H11v2zm0 4h10v-2H11v2z" }));
10969
+ var IconIndentDecrease = () => /* @__PURE__ */ React113.createElement("svg", { ...s }, /* @__PURE__ */ React113.createElement("path", { d: "M11 17h10v-2H11v2zm-8-5l4 4V8l-4 4zm0 9h18v-2H3v2zM3 3v2h18V3H3zm8 6h10V7H11v2zm0 4h10v-2H11v2z" }));
10970
+ var IconTable = () => /* @__PURE__ */ React113.createElement("svg", { ...s }, /* @__PURE__ */ React113.createElement("path", { d: "M20 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h15c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM5 19V5h4v14H5zm6 0V5h4v14h-4zm6 0V5h3v14h-3z", fillRule: "evenodd" }));
10971
+ var IconImage = () => /* @__PURE__ */ React113.createElement("svg", { ...s }, /* @__PURE__ */ React113.createElement("path", { d: "M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z" }));
10972
+ var IconVideo = () => /* @__PURE__ */ React113.createElement("svg", { ...s }, /* @__PURE__ */ React113.createElement("path", { d: "M4 6.47L5.76 10H20v8H4V6.47M22 4h-4l2 4h-3l-2-4h-2l2 4h-3l-2-4H8l2 4H7L5 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4z" }));
10973
+ var IconCut = () => /* @__PURE__ */ React113.createElement("svg", { ...s }, /* @__PURE__ */ React113.createElement("path", { d: "M9.64 7.64c.23-.5.36-1.05.36-1.64 0-2.21-1.79-4-4-4S2 3.79 2 6s1.79 4 4 4c.59 0 1.14-.13 1.64-.36L10 12l-2.36 2.36C7.14 14.13 6.59 14 6 14c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4c0-.59-.13-1.14-.36-1.64L12 14l7 7h3v-1L9.64 7.64zM6 8c-1.1 0-2-.89-2-2s.9-2 2-2 2 .89 2 2-.9 2-2 2zm0 12c-1.1 0-2-.89-2-2s.9-2 2-2 2 .89 2 2-.9 2-2 2zm6-7.5c-.28 0-.5-.22-.5-.5s.22-.5.5-.5.5.22.5.5-.22.5-.5.5zM19 3l-6 6 2 2 7-7V3h-3z" }));
10974
+ var IconCopy = () => /* @__PURE__ */ React113.createElement("svg", { ...s }, /* @__PURE__ */ React113.createElement("path", { d: "M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z" }));
10975
+ var IconCode = () => /* @__PURE__ */ React113.createElement("svg", { ...s }, /* @__PURE__ */ React113.createElement("path", { d: "M9.4 16.6L4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0l4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z" }));
10976
+ var IconFullscreen = () => /* @__PURE__ */ React113.createElement("svg", { ...s }, /* @__PURE__ */ React113.createElement("path", { d: "M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z" }));
10977
+ var IconTranslate = () => /* @__PURE__ */ React113.createElement("svg", { ...s }, /* @__PURE__ */ React113.createElement("path", { d: "M12.87 15.07l-2.54-2.51.03-.03A17.52 17.52 0 0014.07 6H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2.02c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z" }));
10978
+ var IconTaskList = () => /* @__PURE__ */ React113.createElement("svg", { ...s }, /* @__PURE__ */ React113.createElement("path", { d: "M22 8c0-.55-.45-1-1-1h-7c-.55 0-1 .45-1 1s.45 1 1 1h7c.55 0 1-.45 1-1zm0 8c0-.55-.45-1-1-1h-7c-.55 0-1 .45-1 1s.45 1 1 1h7c.55 0 1-.45 1-1zM5.54 11L2 7.46l1.41-1.41 2.12 2.12 4.24-4.24 1.41 1.41L5.54 11zm0 8L2 15.46l1.41-1.41 2.12 2.12 4.24-4.24 1.41 1.41L5.54 19z" }));
10979
+ var IconCheck = () => /* @__PURE__ */ React113.createElement("svg", { ...s }, /* @__PURE__ */ React113.createElement("path", { d: "M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z" }));
10980
+ var IconPaste = () => /* @__PURE__ */ React113.createElement("svg", { ...s }, /* @__PURE__ */ React113.createElement("path", { d: "M19 2h-4.18C14.4.84 13.3 0 12 0c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm7 18H5V4h2v3h10V4h2v16z" }));
10884
10981
 
10885
10982
  // lib/RufousTextEditor/Toolbar.tsx
10886
10983
  var COLOR_PALETTE = [
@@ -11062,16 +11159,16 @@ var Dropdown = ({ trigger, children, className = "", keepOpen = false }) => {
11062
11159
  };
11063
11160
  position();
11064
11161
  }, [open]);
11065
- return /* @__PURE__ */ React113.createElement("div", { className: `dropdown ${className}`, ref }, /* @__PURE__ */ React113.createElement(Tooltip, { title: trigger.title || "", placement: "top" }, /* @__PURE__ */ React113.createElement(
11162
+ return /* @__PURE__ */ React114.createElement("div", { className: `dropdown ${className}`, ref }, /* @__PURE__ */ React114.createElement(Tooltip, { title: trigger.title || "", placement: "top" }, /* @__PURE__ */ React114.createElement(
11066
11163
  "button",
11067
11164
  {
11068
11165
  className: `toolbar-btn ${trigger.className || ""}`,
11069
11166
  onClick: () => setOpen(!open)
11070
11167
  },
11071
11168
  trigger.label,
11072
- /* @__PURE__ */ React113.createElement("span", { className: "dropdown-arrow" }, "\u25BE")
11169
+ /* @__PURE__ */ React114.createElement("span", { className: "dropdown-arrow" }, "\u25BE")
11073
11170
  )), open && createPortal4(
11074
- /* @__PURE__ */ React113.createElement("div", { className: "rf-rte-wrapper rf-rte-dropdown-portal" }, /* @__PURE__ */ React113.createElement("div", { ref: menuRef, className: "dropdown-menu dropdown-menu-fixed", onClick: keepOpen ? void 0 : () => setOpen(false) }, typeof children === "function" ? children(() => setOpen(false)) : children)),
11171
+ /* @__PURE__ */ React114.createElement("div", { className: "rf-rte-wrapper rf-rte-dropdown-portal" }, /* @__PURE__ */ React114.createElement("div", { ref: menuRef, className: "dropdown-menu dropdown-menu-fixed", onClick: keepOpen ? void 0 : () => setOpen(false) }, typeof children === "function" ? children(() => setOpen(false)) : children)),
11075
11172
  document.body
11076
11173
  ));
11077
11174
  };
@@ -11109,14 +11206,14 @@ var InsertPanel = ({ editor, onClose, mode = "video" }) => {
11109
11206
  }
11110
11207
  onClose();
11111
11208
  };
11112
- return /* @__PURE__ */ React113.createElement("div", { className: "insert-panel", onClick: (e) => e.stopPropagation() }, /* @__PURE__ */ React113.createElement("div", { className: "insert-panel-tabs" }, /* @__PURE__ */ React113.createElement(
11209
+ return /* @__PURE__ */ React114.createElement("div", { className: "insert-panel", onClick: (e) => e.stopPropagation() }, /* @__PURE__ */ React114.createElement("div", { className: "insert-panel-tabs" }, /* @__PURE__ */ React114.createElement(
11113
11210
  "button",
11114
11211
  {
11115
11212
  className: `insert-tab ${activeTab === "link" ? "active" : ""}`,
11116
11213
  onClick: () => setActiveTab("link")
11117
11214
  },
11118
11215
  "\u{1F517} Link"
11119
- ), /* @__PURE__ */ React113.createElement(
11216
+ ), /* @__PURE__ */ React114.createElement(
11120
11217
  "button",
11121
11218
  {
11122
11219
  className: `insert-tab ${activeTab === "code" ? "active" : ""}`,
@@ -11124,7 +11221,7 @@ var InsertPanel = ({ editor, onClose, mode = "video" }) => {
11124
11221
  },
11125
11222
  "</>",
11126
11223
  " Code"
11127
- )), /* @__PURE__ */ React113.createElement("label", { className: "insert-panel-label" }, activeTab === "link" ? "URL" : "Embed Code"), activeTab === "link" ? /* @__PURE__ */ React113.createElement(
11224
+ )), /* @__PURE__ */ React114.createElement("label", { className: "insert-panel-label" }, activeTab === "link" ? "URL" : "Embed Code"), activeTab === "link" ? /* @__PURE__ */ React114.createElement(
11128
11225
  "input",
11129
11226
  {
11130
11227
  type: "text",
@@ -11135,7 +11232,7 @@ var InsertPanel = ({ editor, onClose, mode = "video" }) => {
11135
11232
  onKeyDown: (e) => e.key === "Enter" && handleInsert(),
11136
11233
  autoFocus: true
11137
11234
  }
11138
- ) : /* @__PURE__ */ React113.createElement(
11235
+ ) : /* @__PURE__ */ React114.createElement(
11139
11236
  "textarea",
11140
11237
  {
11141
11238
  className: "insert-panel-textarea",
@@ -11144,7 +11241,7 @@ var InsertPanel = ({ editor, onClose, mode = "video" }) => {
11144
11241
  onChange: (e) => setUrl(e.target.value),
11145
11242
  rows: 3
11146
11243
  }
11147
- ), /* @__PURE__ */ React113.createElement("button", { className: "insert-panel-btn", onClick: handleInsert }, "Insert"));
11244
+ ), /* @__PURE__ */ React114.createElement("button", { className: "insert-panel-btn", onClick: handleInsert }, "Insert"));
11148
11245
  };
11149
11246
  var ImagePanel = ({ editor, onClose, onImageUpload }) => {
11150
11247
  const [activeTab, setActiveTab] = useState31("upload");
@@ -11188,21 +11285,21 @@ var ImagePanel = ({ editor, onClose, onImageUpload }) => {
11188
11285
  editor.chain().focus().setImage({ src: url }).run();
11189
11286
  onClose();
11190
11287
  };
11191
- return /* @__PURE__ */ React113.createElement("div", { className: "insert-panel", onClick: (e) => e.stopPropagation() }, /* @__PURE__ */ React113.createElement("div", { className: "insert-panel-tabs" }, /* @__PURE__ */ React113.createElement(
11288
+ return /* @__PURE__ */ React114.createElement("div", { className: "insert-panel", onClick: (e) => e.stopPropagation() }, /* @__PURE__ */ React114.createElement("div", { className: "insert-panel-tabs" }, /* @__PURE__ */ React114.createElement(
11192
11289
  "button",
11193
11290
  {
11194
11291
  className: `insert-tab ${activeTab === "upload" ? "active" : ""}`,
11195
11292
  onClick: () => setActiveTab("upload")
11196
11293
  },
11197
11294
  "\u2B06 Upload"
11198
- ), /* @__PURE__ */ React113.createElement(
11295
+ ), /* @__PURE__ */ React114.createElement(
11199
11296
  "button",
11200
11297
  {
11201
11298
  className: `insert-tab ${activeTab === "url" ? "active" : ""}`,
11202
11299
  onClick: () => setActiveTab("url")
11203
11300
  },
11204
11301
  "\u{1F517} URL"
11205
- )), activeTab === "upload" ? /* @__PURE__ */ React113.createElement(React113.Fragment, null, /* @__PURE__ */ React113.createElement(
11302
+ )), activeTab === "upload" ? /* @__PURE__ */ React114.createElement(React114.Fragment, null, /* @__PURE__ */ React114.createElement(
11206
11303
  "div",
11207
11304
  {
11208
11305
  className: `drop-zone ${isDragging ? "dragging" : ""}`,
@@ -11214,9 +11311,9 @@ var ImagePanel = ({ editor, onClose, onImageUpload }) => {
11214
11311
  onDrop: handleDrop,
11215
11312
  onClick: () => fileInputRef.current?.click()
11216
11313
  },
11217
- /* @__PURE__ */ React113.createElement("span", { className: "drop-zone-text-bold" }, "Drop image"),
11218
- /* @__PURE__ */ React113.createElement("span", { className: "drop-zone-text-sub" }, "or click")
11219
- ), /* @__PURE__ */ React113.createElement(
11314
+ /* @__PURE__ */ React114.createElement("span", { className: "drop-zone-text-bold" }, "Drop image"),
11315
+ /* @__PURE__ */ React114.createElement("span", { className: "drop-zone-text-sub" }, "or click")
11316
+ ), /* @__PURE__ */ React114.createElement(
11220
11317
  "input",
11221
11318
  {
11222
11319
  ref: fileInputRef,
@@ -11225,7 +11322,7 @@ var ImagePanel = ({ editor, onClose, onImageUpload }) => {
11225
11322
  style: { display: "none" },
11226
11323
  onChange: handleFileSelect
11227
11324
  }
11228
- )) : /* @__PURE__ */ React113.createElement(React113.Fragment, null, /* @__PURE__ */ React113.createElement("label", { className: "insert-panel-label" }, "URL"), /* @__PURE__ */ React113.createElement(
11325
+ )) : /* @__PURE__ */ React114.createElement(React114.Fragment, null, /* @__PURE__ */ React114.createElement("label", { className: "insert-panel-label" }, "URL"), /* @__PURE__ */ React114.createElement(
11229
11326
  "input",
11230
11327
  {
11231
11328
  type: "text",
@@ -11236,7 +11333,7 @@ var ImagePanel = ({ editor, onClose, onImageUpload }) => {
11236
11333
  onKeyDown: (e) => e.key === "Enter" && handleUrlInsert(),
11237
11334
  autoFocus: true
11238
11335
  }
11239
- ), /* @__PURE__ */ React113.createElement("button", { className: "insert-panel-btn", onClick: handleUrlInsert }, "Insert")));
11336
+ ), /* @__PURE__ */ React114.createElement("button", { className: "insert-panel-btn", onClick: handleUrlInsert }, "Insert")));
11240
11337
  };
11241
11338
  var MAX_GRID = 10;
11242
11339
  var TableGridSelector = ({ editor, onClose }) => {
@@ -11247,7 +11344,7 @@ var TableGridSelector = ({ editor, onClose }) => {
11247
11344
  editor.chain().focus().insertTable({ rows: hoverRow, cols: hoverCol, withHeaderRow: true }).run();
11248
11345
  onClose();
11249
11346
  };
11250
- return /* @__PURE__ */ React113.createElement("div", { className: "table-grid-panel", onClick: (e) => e.stopPropagation() }, /* @__PURE__ */ React113.createElement(
11347
+ return /* @__PURE__ */ React114.createElement("div", { className: "table-grid-panel", onClick: (e) => e.stopPropagation() }, /* @__PURE__ */ React114.createElement(
11251
11348
  "div",
11252
11349
  {
11253
11350
  className: "table-grid",
@@ -11256,7 +11353,7 @@ var TableGridSelector = ({ editor, onClose }) => {
11256
11353
  setHoverCol(0);
11257
11354
  }
11258
11355
  },
11259
- Array.from({ length: MAX_GRID }, (_, r) => /* @__PURE__ */ React113.createElement("div", { key: r, className: "table-grid-row" }, Array.from({ length: MAX_GRID }, (_2, c) => /* @__PURE__ */ React113.createElement(
11356
+ Array.from({ length: MAX_GRID }, (_, r) => /* @__PURE__ */ React114.createElement("div", { key: r, className: "table-grid-row" }, Array.from({ length: MAX_GRID }, (_2, c) => /* @__PURE__ */ React114.createElement(
11260
11357
  "div",
11261
11358
  {
11262
11359
  key: c,
@@ -11268,7 +11365,7 @@ var TableGridSelector = ({ editor, onClose }) => {
11268
11365
  onClick: handleInsert
11269
11366
  }
11270
11367
  ))))
11271
- ), /* @__PURE__ */ React113.createElement("div", { className: "table-grid-footer" }, /* @__PURE__ */ React113.createElement("span", { className: "table-grid-size" }, hoverRow > 0 && hoverCol > 0 ? `${hoverRow}\xD7${hoverCol}` : "Select size"), /* @__PURE__ */ React113.createElement(
11368
+ ), /* @__PURE__ */ React114.createElement("div", { className: "table-grid-footer" }, /* @__PURE__ */ React114.createElement("span", { className: "table-grid-size" }, hoverRow > 0 && hoverCol > 0 ? `${hoverRow}\xD7${hoverCol}` : "Select size"), /* @__PURE__ */ React114.createElement(
11272
11369
  "button",
11273
11370
  {
11274
11371
  className: "table-grid-submit",
@@ -11302,28 +11399,28 @@ var ColorPickerPanel = ({ editor, onClose }) => {
11302
11399
  }
11303
11400
  onClose();
11304
11401
  };
11305
- return /* @__PURE__ */ React113.createElement("div", { className: "color-picker-panel", onClick: (e) => e.stopPropagation() }, /* @__PURE__ */ React113.createElement("div", { className: "color-picker-tabs" }, /* @__PURE__ */ React113.createElement(
11402
+ return /* @__PURE__ */ React114.createElement("div", { className: "color-picker-panel", onClick: (e) => e.stopPropagation() }, /* @__PURE__ */ React114.createElement("div", { className: "color-picker-tabs" }, /* @__PURE__ */ React114.createElement(
11306
11403
  "button",
11307
11404
  {
11308
11405
  className: `color-picker-tab ${tab === "background" ? "active" : ""}`,
11309
11406
  onClick: () => setTab("background")
11310
11407
  },
11311
11408
  "Background"
11312
- ), /* @__PURE__ */ React113.createElement(
11409
+ ), /* @__PURE__ */ React114.createElement(
11313
11410
  "button",
11314
11411
  {
11315
11412
  className: `color-picker-tab ${tab === "text" ? "active" : ""}`,
11316
11413
  onClick: () => setTab("text")
11317
11414
  },
11318
11415
  "Text"
11319
- )), /* @__PURE__ */ React113.createElement("div", { className: "color-picker-grid" }, COLOR_PALETTE.map((color, i) => /* @__PURE__ */ React113.createElement(Tooltip, { key: i, title: color, placement: "top" }, /* @__PURE__ */ React113.createElement(
11416
+ )), /* @__PURE__ */ React114.createElement("div", { className: "color-picker-grid" }, COLOR_PALETTE.map((color, i) => /* @__PURE__ */ React114.createElement(Tooltip, { key: i, title: color, placement: "top" }, /* @__PURE__ */ React114.createElement(
11320
11417
  "button",
11321
11418
  {
11322
11419
  className: `color-picker-swatch ${color === "#ffffff" ? "white-swatch" : ""}${activeColor && activeColor.toLowerCase() === color.toLowerCase() ? " swatch-active" : ""}`,
11323
11420
  style: { background: color },
11324
11421
  onClick: () => applyColor(color)
11325
11422
  }
11326
- )))), /* @__PURE__ */ React113.createElement("div", { className: "color-picker-footer" }, /* @__PURE__ */ React113.createElement("div", { className: "color-picker-preview", style: { background: activeColor || "#000" } }), /* @__PURE__ */ React113.createElement(Tooltip, { title: "Remove color", placement: "top" }, /* @__PURE__ */ React113.createElement("button", { className: "color-picker-remove", onClick: removeColor }, "\u2713"))));
11423
+ )))), /* @__PURE__ */ React114.createElement("div", { className: "color-picker-footer" }, /* @__PURE__ */ React114.createElement("div", { className: "color-picker-preview", style: { background: activeColor || "#000" } }), /* @__PURE__ */ React114.createElement(Tooltip, { title: "Remove color", placement: "top" }, /* @__PURE__ */ React114.createElement("button", { className: "color-picker-remove", onClick: removeColor }, "\u2713"))));
11327
11424
  };
11328
11425
  var Toolbar = ({ editor, setLink, onAICommand, onTranslate, onSpeechToText, onTextToSpeech, onClose, onImageUpload, visibleButtons, isFullscreen, onToggleFullscreen }) => {
11329
11426
  const [, setEditorState] = useState31(0);
@@ -11404,32 +11501,32 @@ var Toolbar = ({ editor, setLink, onAICommand, onTranslate, onSpeechToText, onTe
11404
11501
  setTimeout(() => setTranslateStatus(""), 2e3);
11405
11502
  }, [editor, translateSource, translateTarget, onTranslate]);
11406
11503
  if (!editor) return null;
11407
- return /* @__PURE__ */ React113.createElement("div", { className: "toolbar" }, /* @__PURE__ */ React113.createElement("div", { className: `toolbar-row ${onClose ? "with-close" : ""}` }, (show("undo") || show("redo")) && /* @__PURE__ */ React113.createElement("div", { className: "toolbar-group" }, show("undo") && /* @__PURE__ */ React113.createElement(Tooltip, { title: "Undo (Ctrl+Z)", placement: "top" }, /* @__PURE__ */ React113.createElement(
11504
+ return /* @__PURE__ */ React114.createElement("div", { className: "toolbar" }, /* @__PURE__ */ React114.createElement("div", { className: `toolbar-row ${onClose ? "with-close" : ""}` }, (show("undo") || show("redo")) && /* @__PURE__ */ React114.createElement("div", { className: "toolbar-group" }, show("undo") && /* @__PURE__ */ React114.createElement(Tooltip, { title: "Undo (Ctrl+Z)", placement: "top" }, /* @__PURE__ */ React114.createElement(
11408
11505
  "button",
11409
11506
  {
11410
11507
  className: "toolbar-btn",
11411
11508
  onClick: () => editor.chain().focus().undo().run(),
11412
11509
  disabled: !editor.can().undo()
11413
11510
  },
11414
- /* @__PURE__ */ React113.createElement(IconUndo, null)
11415
- )), show("redo") && /* @__PURE__ */ React113.createElement(Tooltip, { title: "Redo (Ctrl+Y)", placement: "top" }, /* @__PURE__ */ React113.createElement(
11511
+ /* @__PURE__ */ React114.createElement(IconUndo, null)
11512
+ )), show("redo") && /* @__PURE__ */ React114.createElement(Tooltip, { title: "Redo (Ctrl+Y)", placement: "top" }, /* @__PURE__ */ React114.createElement(
11416
11513
  "button",
11417
11514
  {
11418
11515
  className: "toolbar-btn",
11419
11516
  onClick: () => editor.chain().focus().redo().run(),
11420
11517
  disabled: !editor.can().redo()
11421
11518
  },
11422
- /* @__PURE__ */ React113.createElement(IconRedo, null)
11423
- ))), show("ai") && /* @__PURE__ */ React113.createElement("div", { className: "toolbar-group" }, /* @__PURE__ */ React113.createElement(AICommands_default, { editor, onAICommand })), /* @__PURE__ */ React113.createElement("div", { className: "toolbar-group" }, show("paragraph") && /* @__PURE__ */ React113.createElement(
11519
+ /* @__PURE__ */ React114.createElement(IconRedo, null)
11520
+ ))), show("ai") && /* @__PURE__ */ React114.createElement("div", { className: "toolbar-group" }, /* @__PURE__ */ React114.createElement(AICommands_default, { editor, onAICommand })), /* @__PURE__ */ React114.createElement("div", { className: "toolbar-group" }, show("paragraph") && /* @__PURE__ */ React114.createElement(
11424
11521
  Dropdown,
11425
11522
  {
11426
11523
  trigger: {
11427
- label: /* @__PURE__ */ React113.createElement(IconHeading, null),
11524
+ label: /* @__PURE__ */ React114.createElement(IconHeading, null),
11428
11525
  title: "Block type",
11429
11526
  className: editor.isActive("heading") ? "is-active" : ""
11430
11527
  }
11431
11528
  },
11432
- /* @__PURE__ */ React113.createElement(
11529
+ /* @__PURE__ */ React114.createElement(
11433
11530
  "button",
11434
11531
  {
11435
11532
  className: `dropdown-item ${!editor.isActive("heading") && !editor.isActive("blockquote") && !editor.isActive("codeBlock") ? "is-active" : ""}`,
@@ -11437,7 +11534,7 @@ var Toolbar = ({ editor, setLink, onAICommand, onTranslate, onSpeechToText, onTe
11437
11534
  },
11438
11535
  "\xB6 Paragraph"
11439
11536
  ),
11440
- /* @__PURE__ */ React113.createElement(
11537
+ /* @__PURE__ */ React114.createElement(
11441
11538
  "button",
11442
11539
  {
11443
11540
  className: `dropdown-item heading-1 ${editor.isActive("heading", { level: 1 }) ? "is-active" : ""}`,
@@ -11445,7 +11542,7 @@ var Toolbar = ({ editor, setLink, onAICommand, onTranslate, onSpeechToText, onTe
11445
11542
  },
11446
11543
  "Heading 1"
11447
11544
  ),
11448
- /* @__PURE__ */ React113.createElement(
11545
+ /* @__PURE__ */ React114.createElement(
11449
11546
  "button",
11450
11547
  {
11451
11548
  className: `dropdown-item heading-2 ${editor.isActive("heading", { level: 2 }) ? "is-active" : ""}`,
@@ -11453,7 +11550,7 @@ var Toolbar = ({ editor, setLink, onAICommand, onTranslate, onSpeechToText, onTe
11453
11550
  },
11454
11551
  "Heading 2"
11455
11552
  ),
11456
- /* @__PURE__ */ React113.createElement(
11553
+ /* @__PURE__ */ React114.createElement(
11457
11554
  "button",
11458
11555
  {
11459
11556
  className: `dropdown-item heading-3 ${editor.isActive("heading", { level: 3 }) ? "is-active" : ""}`,
@@ -11461,7 +11558,7 @@ var Toolbar = ({ editor, setLink, onAICommand, onTranslate, onSpeechToText, onTe
11461
11558
  },
11462
11559
  "Heading 3"
11463
11560
  ),
11464
- /* @__PURE__ */ React113.createElement(
11561
+ /* @__PURE__ */ React114.createElement(
11465
11562
  "button",
11466
11563
  {
11467
11564
  className: `dropdown-item heading-4 ${editor.isActive("heading", { level: 4 }) ? "is-active" : ""}`,
@@ -11469,7 +11566,7 @@ var Toolbar = ({ editor, setLink, onAICommand, onTranslate, onSpeechToText, onTe
11469
11566
  },
11470
11567
  "Heading 4"
11471
11568
  ),
11472
- /* @__PURE__ */ React113.createElement(
11569
+ /* @__PURE__ */ React114.createElement(
11473
11570
  "button",
11474
11571
  {
11475
11572
  className: `dropdown-item ${editor.isActive("blockquote") ? "is-active" : ""}`,
@@ -11477,7 +11574,7 @@ var Toolbar = ({ editor, setLink, onAICommand, onTranslate, onSpeechToText, onTe
11477
11574
  },
11478
11575
  "\u275E Blockquote"
11479
11576
  ),
11480
- /* @__PURE__ */ React113.createElement(
11577
+ /* @__PURE__ */ React114.createElement(
11481
11578
  "button",
11482
11579
  {
11483
11580
  className: `dropdown-item ${editor.isActive("codeBlock") ? "is-active" : ""}`,
@@ -11486,19 +11583,19 @@ var Toolbar = ({ editor, setLink, onAICommand, onTranslate, onSpeechToText, onTe
11486
11583
  "{ }",
11487
11584
  " Code Block"
11488
11585
  ),
11489
- /* @__PURE__ */ React113.createElement("button", { className: "dropdown-item", onClick: () => editor.chain().focus().setHorizontalRule().run() }, "\u2014 Horizontal Rule")
11490
- ), show("fontsize") && /* @__PURE__ */ React113.createElement(
11586
+ /* @__PURE__ */ React114.createElement("button", { className: "dropdown-item", onClick: () => editor.chain().focus().setHorizontalRule().run() }, "\u2014 Horizontal Rule")
11587
+ ), show("fontsize") && /* @__PURE__ */ React114.createElement(
11491
11588
  Dropdown,
11492
11589
  {
11493
11590
  trigger: {
11494
- label: /* @__PURE__ */ React113.createElement(IconFontSize, null),
11591
+ label: /* @__PURE__ */ React114.createElement(IconFontSize, null),
11495
11592
  title: "Font size"
11496
11593
  }
11497
11594
  },
11498
11595
  [8, 9, 10, 11, 12, 14, 16, 18, 20, 24, 28, 32, 36, 42, 48, 56, 64, 72, 80, 96].map((size) => {
11499
11596
  const sizeStr = `${size}px`;
11500
11597
  const isActive = editor.getAttributes("textStyle").fontSize === sizeStr;
11501
- return /* @__PURE__ */ React113.createElement(
11598
+ return /* @__PURE__ */ React114.createElement(
11502
11599
  "button",
11503
11600
  {
11504
11601
  key: size,
@@ -11514,17 +11611,17 @@ var Toolbar = ({ editor, setLink, onAICommand, onTranslate, onSpeechToText, onTe
11514
11611
  sizeStr
11515
11612
  );
11516
11613
  })
11517
- ), show("font") && /* @__PURE__ */ React113.createElement(
11614
+ ), show("font") && /* @__PURE__ */ React114.createElement(
11518
11615
  Dropdown,
11519
11616
  {
11520
11617
  trigger: {
11521
- label: /* @__PURE__ */ React113.createElement(IconFont, null),
11618
+ label: /* @__PURE__ */ React114.createElement(IconFont, null),
11522
11619
  title: "Font family"
11523
11620
  }
11524
11621
  },
11525
11622
  FONT_FAMILIES.map((font) => {
11526
11623
  const isActive = editor.getAttributes("textStyle").fontFamily === font;
11527
- return /* @__PURE__ */ React113.createElement(
11624
+ return /* @__PURE__ */ React114.createElement(
11528
11625
  "button",
11529
11626
  {
11530
11627
  key: font,
@@ -11541,40 +11638,40 @@ var Toolbar = ({ editor, setLink, onAICommand, onTranslate, onSpeechToText, onTe
11541
11638
  font
11542
11639
  );
11543
11640
  })
11544
- ), show("color") && /* @__PURE__ */ React113.createElement(
11641
+ ), show("color") && /* @__PURE__ */ React114.createElement(
11545
11642
  Dropdown,
11546
11643
  {
11547
11644
  trigger: {
11548
- label: /* @__PURE__ */ React113.createElement("span", { style: { display: "flex", alignItems: "center" } }, /* @__PURE__ */ React113.createElement(IconColor, null)),
11645
+ label: /* @__PURE__ */ React114.createElement("span", { style: { display: "flex", alignItems: "center" } }, /* @__PURE__ */ React114.createElement(IconColor, null)),
11549
11646
  title: "Colors"
11550
11647
  },
11551
11648
  keepOpen: true
11552
11649
  },
11553
- (close) => /* @__PURE__ */ React113.createElement(ColorPickerPanel, { editor, onClose: close })
11554
- ), show("bold") && /* @__PURE__ */ React113.createElement(Tooltip, { title: "Bold (Ctrl+B)", placement: "top" }, /* @__PURE__ */ React113.createElement(
11650
+ (close) => /* @__PURE__ */ React114.createElement(ColorPickerPanel, { editor, onClose: close })
11651
+ ), show("bold") && /* @__PURE__ */ React114.createElement(Tooltip, { title: "Bold (Ctrl+B)", placement: "top" }, /* @__PURE__ */ React114.createElement(
11555
11652
  "button",
11556
11653
  {
11557
11654
  className: `toolbar-btn ${editor.isActive("bold") ? "is-active" : ""}`,
11558
11655
  onClick: () => editor.chain().focus().toggleBold().run()
11559
11656
  },
11560
- /* @__PURE__ */ React113.createElement(IconBold, null)
11561
- )), show("italic") && /* @__PURE__ */ React113.createElement(Tooltip, { title: "Italic (Ctrl+I)", placement: "top" }, /* @__PURE__ */ React113.createElement(
11657
+ /* @__PURE__ */ React114.createElement(IconBold, null)
11658
+ )), show("italic") && /* @__PURE__ */ React114.createElement(Tooltip, { title: "Italic (Ctrl+I)", placement: "top" }, /* @__PURE__ */ React114.createElement(
11562
11659
  "button",
11563
11660
  {
11564
11661
  className: `toolbar-btn ${editor.isActive("italic") ? "is-active" : ""}`,
11565
11662
  onClick: () => editor.chain().focus().toggleItalic().run()
11566
11663
  },
11567
- /* @__PURE__ */ React113.createElement(IconItalic, null)
11568
- )), show("strike") && /* @__PURE__ */ React113.createElement(
11664
+ /* @__PURE__ */ React114.createElement(IconItalic, null)
11665
+ )), show("strike") && /* @__PURE__ */ React114.createElement(
11569
11666
  Dropdown,
11570
11667
  {
11571
- trigger: { label: /* @__PURE__ */ React113.createElement(IconStrike, null), title: "Text decoration", className: editor.isActive("strike") ? "is-active" : "" }
11668
+ trigger: { label: /* @__PURE__ */ React114.createElement(IconStrike, null), title: "Text decoration", className: editor.isActive("strike") ? "is-active" : "" }
11572
11669
  },
11573
- /* @__PURE__ */ React113.createElement("button", { className: "dropdown-item", onClick: () => editor.chain().focus().toggleStrike().run() }, /* @__PURE__ */ React113.createElement("s", null, "Strikethrough")),
11574
- /* @__PURE__ */ React113.createElement("button", { className: "dropdown-item", onClick: () => editor.chain().focus().toggleUnderline().run() }, /* @__PURE__ */ React113.createElement("u", null, "Underline")),
11575
- /* @__PURE__ */ React113.createElement("button", { className: "dropdown-item", onClick: () => editor.chain().focus().toggleSuperscript().run() }, "X", /* @__PURE__ */ React113.createElement("sup", null, "2"), " Superscript"),
11576
- /* @__PURE__ */ React113.createElement("button", { className: "dropdown-item", onClick: () => editor.chain().focus().toggleSubscript().run() }, "X", /* @__PURE__ */ React113.createElement("sub", null, "2"), " Subscript"),
11577
- /* @__PURE__ */ React113.createElement("button", { className: "dropdown-item", onMouseDown: (e) => {
11670
+ /* @__PURE__ */ React114.createElement("button", { className: "dropdown-item", onClick: () => editor.chain().focus().toggleStrike().run() }, /* @__PURE__ */ React114.createElement("s", null, "Strikethrough")),
11671
+ /* @__PURE__ */ React114.createElement("button", { className: "dropdown-item", onClick: () => editor.chain().focus().toggleUnderline().run() }, /* @__PURE__ */ React114.createElement("u", null, "Underline")),
11672
+ /* @__PURE__ */ React114.createElement("button", { className: "dropdown-item", onClick: () => editor.chain().focus().toggleSuperscript().run() }, "X", /* @__PURE__ */ React114.createElement("sup", null, "2"), " Superscript"),
11673
+ /* @__PURE__ */ React114.createElement("button", { className: "dropdown-item", onClick: () => editor.chain().focus().toggleSubscript().run() }, "X", /* @__PURE__ */ React114.createElement("sub", null, "2"), " Subscript"),
11674
+ /* @__PURE__ */ React114.createElement("button", { className: "dropdown-item", onMouseDown: (e) => {
11578
11675
  e.preventDefault();
11579
11676
  const chain = editor.chain().focus();
11580
11677
  if (!editor.state.selection.empty) {
@@ -11590,25 +11687,25 @@ var Toolbar = ({ editor, setLink, onAICommand, onTranslate, onSpeechToText, onTe
11590
11687
  c.run();
11591
11688
  }
11592
11689
  } }, "\u2715 Clear formatting")
11593
- ), show("link") && /* @__PURE__ */ React113.createElement(Tooltip, { title: "Insert Link", placement: "top" }, /* @__PURE__ */ React113.createElement(
11690
+ ), show("link") && /* @__PURE__ */ React114.createElement(Tooltip, { title: "Insert Link", placement: "top" }, /* @__PURE__ */ React114.createElement(
11594
11691
  "button",
11595
11692
  {
11596
11693
  className: `toolbar-btn ${editor.isActive("link") ? "is-active" : ""}`,
11597
11694
  onClick: setLink
11598
11695
  },
11599
- /* @__PURE__ */ React113.createElement(IconLink, null)
11600
- )), show("lineheight") && /* @__PURE__ */ React113.createElement(
11696
+ /* @__PURE__ */ React114.createElement(IconLink, null)
11697
+ )), show("lineheight") && /* @__PURE__ */ React114.createElement(
11601
11698
  Dropdown,
11602
11699
  {
11603
11700
  trigger: {
11604
- label: /* @__PURE__ */ React113.createElement(IconLineHeight, null),
11701
+ label: /* @__PURE__ */ React114.createElement(IconLineHeight, null),
11605
11702
  title: "Line height"
11606
11703
  }
11607
11704
  },
11608
11705
  ["1.0", "1.1", "1.2", "1.3", "1.4", "1.5", "1.6", "1.7", "1.8", "2.0", "2.5", "3.0"].map((lh) => {
11609
11706
  const currentLH = editor.getAttributes("paragraph").lineHeight || editor.getAttributes("heading").lineHeight;
11610
11707
  const isActive = currentLH === lh;
11611
- return /* @__PURE__ */ React113.createElement(
11708
+ return /* @__PURE__ */ React114.createElement(
11612
11709
  "button",
11613
11710
  {
11614
11711
  key: lh,
@@ -11624,19 +11721,19 @@ var Toolbar = ({ editor, setLink, onAICommand, onTranslate, onSpeechToText, onTe
11624
11721
  lh
11625
11722
  );
11626
11723
  })
11627
- )), (show("ul") || show("ol")) && /* @__PURE__ */ React113.createElement("div", { className: "toolbar-group" }, show("ul") && /* @__PURE__ */ React113.createElement("div", { className: "list-split-btn" }, /* @__PURE__ */ React113.createElement(Tooltip, { title: editor.isActive("bulletList") ? "Disable Bullet List" : "Enable Bullet List", placement: "top" }, /* @__PURE__ */ React113.createElement(
11724
+ )), (show("ul") || show("ol")) && /* @__PURE__ */ React114.createElement("div", { className: "toolbar-group" }, show("ul") && /* @__PURE__ */ React114.createElement("div", { className: "list-split-btn" }, /* @__PURE__ */ React114.createElement(Tooltip, { title: editor.isActive("bulletList") ? "Disable Bullet List" : "Enable Bullet List", placement: "top" }, /* @__PURE__ */ React114.createElement(
11628
11725
  "button",
11629
11726
  {
11630
11727
  className: `toolbar-btn ${editor.isActive("bulletList") ? "is-active" : ""}`,
11631
11728
  onClick: () => editor.chain().focus().toggleBulletList().run()
11632
11729
  },
11633
- /* @__PURE__ */ React113.createElement(IconBulletList, null)
11634
- )), /* @__PURE__ */ React113.createElement(Dropdown, { trigger: { label: "", title: "List style", className: "list-arrow-btn" }, keepOpen: true }, [
11730
+ /* @__PURE__ */ React114.createElement(IconBulletList, null)
11731
+ )), /* @__PURE__ */ React114.createElement(Dropdown, { trigger: { label: "", title: "List style", className: "list-arrow-btn" }, keepOpen: true }, [
11635
11732
  { label: "Default", style: null, icon: "\u2022" },
11636
11733
  { label: "Circle", style: "circle", icon: "\u25CB" },
11637
11734
  { label: "Dot", style: "disc", icon: "\u2219" },
11638
11735
  { label: "Square", style: "square", icon: "\u25A0" }
11639
- ].map((item) => /* @__PURE__ */ React113.createElement(
11736
+ ].map((item) => /* @__PURE__ */ React114.createElement(
11640
11737
  "button",
11641
11738
  {
11642
11739
  key: item.label,
@@ -11661,24 +11758,24 @@ var Toolbar = ({ editor, setLink, onAICommand, onTranslate, onSpeechToText, onTe
11661
11758
  }).run();
11662
11759
  }
11663
11760
  },
11664
- /* @__PURE__ */ React113.createElement("span", { className: "bullet-style-icon" }, item.icon),
11761
+ /* @__PURE__ */ React114.createElement("span", { className: "bullet-style-icon" }, item.icon),
11665
11762
  " ",
11666
11763
  item.label
11667
- )))), show("ol") && /* @__PURE__ */ React113.createElement("div", { className: "list-split-btn" }, /* @__PURE__ */ React113.createElement(Tooltip, { title: editor.isActive("orderedList") ? "Disable Ordered List" : "Enable Ordered List", placement: "top" }, /* @__PURE__ */ React113.createElement(
11764
+ )))), show("ol") && /* @__PURE__ */ React114.createElement("div", { className: "list-split-btn" }, /* @__PURE__ */ React114.createElement(Tooltip, { title: editor.isActive("orderedList") ? "Disable Ordered List" : "Enable Ordered List", placement: "top" }, /* @__PURE__ */ React114.createElement(
11668
11765
  "button",
11669
11766
  {
11670
11767
  className: `toolbar-btn ${editor.isActive("orderedList") ? "is-active" : ""}`,
11671
11768
  onClick: () => editor.chain().focus().toggleOrderedList().run()
11672
11769
  },
11673
- /* @__PURE__ */ React113.createElement(IconOrderedList, null)
11674
- )), /* @__PURE__ */ React113.createElement(Dropdown, { trigger: { label: "", title: "List style", className: "list-arrow-btn" }, keepOpen: true }, [
11770
+ /* @__PURE__ */ React114.createElement(IconOrderedList, null)
11771
+ )), /* @__PURE__ */ React114.createElement(Dropdown, { trigger: { label: "", title: "List style", className: "list-arrow-btn" }, keepOpen: true }, [
11675
11772
  { label: "Default", style: "decimal", icon: "1." },
11676
11773
  { label: "Lower Alpha", style: "lower-alpha", icon: "a." },
11677
11774
  { label: "Lower Greek", style: "lower-greek", icon: "\u03B1." },
11678
11775
  { label: "Lower Roman", style: "lower-roman", icon: "i." },
11679
11776
  { label: "Upper Alpha", style: "upper-alpha", icon: "A." },
11680
11777
  { label: "Upper Roman", style: "upper-roman", icon: "I." }
11681
- ].map((item) => /* @__PURE__ */ React113.createElement(
11778
+ ].map((item) => /* @__PURE__ */ React114.createElement(
11682
11779
  "button",
11683
11780
  {
11684
11781
  key: item.label,
@@ -11703,24 +11800,24 @@ var Toolbar = ({ editor, setLink, onAICommand, onTranslate, onSpeechToText, onTe
11703
11800
  }).run();
11704
11801
  }
11705
11802
  },
11706
- /* @__PURE__ */ React113.createElement("span", { className: "bullet-style-icon" }, item.icon),
11803
+ /* @__PURE__ */ React114.createElement("span", { className: "bullet-style-icon" }, item.icon),
11707
11804
  " ",
11708
11805
  item.label
11709
- ))))), (show("align") || show("indent") || show("outdent")) && /* @__PURE__ */ React113.createElement("div", { className: "toolbar-group" }, show("align") && /* @__PURE__ */ React113.createElement(
11806
+ ))))), (show("align") || show("indent") || show("outdent")) && /* @__PURE__ */ React114.createElement("div", { className: "toolbar-group" }, show("align") && /* @__PURE__ */ React114.createElement(
11710
11807
  Dropdown,
11711
11808
  {
11712
11809
  trigger: {
11713
- label: /* @__PURE__ */ React113.createElement(IconAlignLeft, null),
11810
+ label: /* @__PURE__ */ React114.createElement(IconAlignLeft, null),
11714
11811
  title: "Align",
11715
11812
  className: editor.isActive({ textAlign: "center" }) || editor.isActive({ textAlign: "right" }) || editor.isActive({ textAlign: "justify" }) ? "is-active" : ""
11716
11813
  }
11717
11814
  },
11718
11815
  [
11719
- { label: "Align Left", value: "left", icon: /* @__PURE__ */ React113.createElement(IconAlignLeft, null) },
11720
- { label: "Align Center", value: "center", icon: /* @__PURE__ */ React113.createElement(IconAlignCenter, null) },
11721
- { label: "Align Right", value: "right", icon: /* @__PURE__ */ React113.createElement(IconAlignRight, null) },
11722
- { label: "Align Justify", value: "justify", icon: /* @__PURE__ */ React113.createElement(IconAlignJustify, null) }
11723
- ].map((item) => /* @__PURE__ */ React113.createElement(
11816
+ { label: "Align Left", value: "left", icon: /* @__PURE__ */ React114.createElement(IconAlignLeft, null) },
11817
+ { label: "Align Center", value: "center", icon: /* @__PURE__ */ React114.createElement(IconAlignCenter, null) },
11818
+ { label: "Align Right", value: "right", icon: /* @__PURE__ */ React114.createElement(IconAlignRight, null) },
11819
+ { label: "Align Justify", value: "justify", icon: /* @__PURE__ */ React114.createElement(IconAlignJustify, null) }
11820
+ ].map((item) => /* @__PURE__ */ React114.createElement(
11724
11821
  "button",
11725
11822
  {
11726
11823
  key: item.value,
@@ -11731,7 +11828,7 @@ var Toolbar = ({ editor, setLink, onAICommand, onTranslate, onSpeechToText, onTe
11731
11828
  " ",
11732
11829
  item.label
11733
11830
  ))
11734
- ), show("indent") && /* @__PURE__ */ React113.createElement(Tooltip, { title: "Increase Indent", placement: "top" }, /* @__PURE__ */ React113.createElement(
11831
+ ), show("indent") && /* @__PURE__ */ React114.createElement(Tooltip, { title: "Increase Indent", placement: "top" }, /* @__PURE__ */ React114.createElement(
11735
11832
  "button",
11736
11833
  {
11737
11834
  className: "toolbar-btn",
@@ -11750,8 +11847,8 @@ var Toolbar = ({ editor, setLink, onAICommand, onTranslate, onSpeechToText, onTe
11750
11847
  }).run();
11751
11848
  }
11752
11849
  },
11753
- /* @__PURE__ */ React113.createElement(IconIndentIncrease, null)
11754
- )), show("outdent") && /* @__PURE__ */ React113.createElement(Tooltip, { title: "Decrease Indent", placement: "top" }, /* @__PURE__ */ React113.createElement(
11850
+ /* @__PURE__ */ React114.createElement(IconIndentIncrease, null)
11851
+ )), show("outdent") && /* @__PURE__ */ React114.createElement(Tooltip, { title: "Decrease Indent", placement: "top" }, /* @__PURE__ */ React114.createElement(
11755
11852
  "button",
11756
11853
  {
11757
11854
  className: "toolbar-btn",
@@ -11770,29 +11867,29 @@ var Toolbar = ({ editor, setLink, onAICommand, onTranslate, onSpeechToText, onTe
11770
11867
  }).run();
11771
11868
  }
11772
11869
  },
11773
- /* @__PURE__ */ React113.createElement(IconIndentDecrease, null)
11774
- ))), show("table") && /* @__PURE__ */ React113.createElement(Dropdown, { trigger: { label: /* @__PURE__ */ React113.createElement(IconTable, null), title: "Insert Table" }, keepOpen: true }, (close) => /* @__PURE__ */ React113.createElement(TableGridSelector, { editor, onClose: close })), show("image") && /* @__PURE__ */ React113.createElement(Dropdown, { trigger: { label: /* @__PURE__ */ React113.createElement(IconImage, null), title: "Insert Image" }, keepOpen: true }, (close) => /* @__PURE__ */ React113.createElement(ImagePanel, { editor, onClose: close, onImageUpload })), show("video") && /* @__PURE__ */ React113.createElement(Dropdown, { trigger: { label: /* @__PURE__ */ React113.createElement(IconVideo, null), title: "Insert Video" }, keepOpen: true }, (close) => /* @__PURE__ */ React113.createElement(InsertPanel, { editor, onClose: close, mode: "video" })), show("cut") && /* @__PURE__ */ React113.createElement(Tooltip, { title: "Cut (Ctrl+X)", placement: "top" }, /* @__PURE__ */ React113.createElement(
11870
+ /* @__PURE__ */ React114.createElement(IconIndentDecrease, null)
11871
+ ))), show("table") && /* @__PURE__ */ React114.createElement(Dropdown, { trigger: { label: /* @__PURE__ */ React114.createElement(IconTable, null), title: "Insert Table" }, keepOpen: true }, (close) => /* @__PURE__ */ React114.createElement(TableGridSelector, { editor, onClose: close })), show("image") && /* @__PURE__ */ React114.createElement(Dropdown, { trigger: { label: /* @__PURE__ */ React114.createElement(IconImage, null), title: "Insert Image" }, keepOpen: true }, (close) => /* @__PURE__ */ React114.createElement(ImagePanel, { editor, onClose: close, onImageUpload })), show("video") && /* @__PURE__ */ React114.createElement(Dropdown, { trigger: { label: /* @__PURE__ */ React114.createElement(IconVideo, null), title: "Insert Video" }, keepOpen: true }, (close) => /* @__PURE__ */ React114.createElement(InsertPanel, { editor, onClose: close, mode: "video" })), show("cut") && /* @__PURE__ */ React114.createElement(Tooltip, { title: "Cut (Ctrl+X)", placement: "top" }, /* @__PURE__ */ React114.createElement(
11775
11872
  "button",
11776
11873
  {
11777
11874
  className: "toolbar-btn",
11778
11875
  onClick: () => document.execCommand("cut")
11779
11876
  },
11780
- /* @__PURE__ */ React113.createElement(IconCut, null)
11781
- )), show("copy") && /* @__PURE__ */ React113.createElement(Tooltip, { title: "Copy selected text", placement: "top" }, /* @__PURE__ */ React113.createElement(
11877
+ /* @__PURE__ */ React114.createElement(IconCut, null)
11878
+ )), show("copy") && /* @__PURE__ */ React114.createElement(Tooltip, { title: "Copy selected text", placement: "top" }, /* @__PURE__ */ React114.createElement(
11782
11879
  "button",
11783
11880
  {
11784
11881
  className: "toolbar-btn",
11785
11882
  onClick: handleCopy
11786
11883
  },
11787
- copySuccess ? /* @__PURE__ */ React113.createElement(IconCheck, null) : /* @__PURE__ */ React113.createElement(IconCopy, null)
11788
- )), show("paste") && /* @__PURE__ */ React113.createElement(Tooltip, { title: "Paste (Ctrl+V)", placement: "top" }, /* @__PURE__ */ React113.createElement(
11884
+ copySuccess ? /* @__PURE__ */ React114.createElement(IconCheck, null) : /* @__PURE__ */ React114.createElement(IconCopy, null)
11885
+ )), show("paste") && /* @__PURE__ */ React114.createElement(Tooltip, { title: "Paste (Ctrl+V)", placement: "top" }, /* @__PURE__ */ React114.createElement(
11789
11886
  "button",
11790
11887
  {
11791
11888
  className: "toolbar-btn",
11792
11889
  onClick: handlePaste
11793
11890
  },
11794
- /* @__PURE__ */ React113.createElement(IconPaste, null)
11795
- )), show("specialchars") && /* @__PURE__ */ React113.createElement(Dropdown, { trigger: { label: "\u03A9", title: "Special characters", className: "special-characters-btn" } }, /* @__PURE__ */ React113.createElement("div", { className: "char-grid" }, SPECIAL_CHARS.map((char) => /* @__PURE__ */ React113.createElement(
11891
+ /* @__PURE__ */ React114.createElement(IconPaste, null)
11892
+ )), show("specialchars") && /* @__PURE__ */ React114.createElement(Dropdown, { trigger: { label: "\u03A9", title: "Special characters", className: "special-characters-btn" } }, /* @__PURE__ */ React114.createElement("div", { className: "char-grid" }, SPECIAL_CHARS.map((char) => /* @__PURE__ */ React114.createElement(
11796
11893
  "button",
11797
11894
  {
11798
11895
  key: char,
@@ -11800,12 +11897,12 @@ var Toolbar = ({ editor, setLink, onAICommand, onTranslate, onSpeechToText, onTe
11800
11897
  onClick: () => insertSpecialChar(char)
11801
11898
  },
11802
11899
  char
11803
- )))), show("code") && /* @__PURE__ */ React113.createElement(
11900
+ )))), show("code") && /* @__PURE__ */ React114.createElement(
11804
11901
  Dropdown,
11805
11902
  {
11806
- trigger: { label: /* @__PURE__ */ React113.createElement(IconCode, null), title: "Code", className: editor.isActive("code") || editor.isActive("codeBlock") ? "is-active" : "" }
11903
+ trigger: { label: /* @__PURE__ */ React114.createElement(IconCode, null), title: "Code", className: editor.isActive("code") || editor.isActive("codeBlock") ? "is-active" : "" }
11807
11904
  },
11808
- /* @__PURE__ */ React113.createElement("button", { className: "dropdown-item", onClick: () => {
11905
+ /* @__PURE__ */ React114.createElement("button", { className: "dropdown-item", onClick: () => {
11809
11906
  if (editor.isActive("codeBlock")) {
11810
11907
  const text = (() => {
11811
11908
  const { $from } = editor.state.selection;
@@ -11823,22 +11920,22 @@ var Toolbar = ({ editor, setLink, onAICommand, onTranslate, onSpeechToText, onTe
11823
11920
  editor.chain().focus().toggleCode().run();
11824
11921
  }
11825
11922
  } }, "</>", " Inline Code"),
11826
- /* @__PURE__ */ React113.createElement("button", { className: "dropdown-item", onClick: () => editor.chain().focus().toggleCodeBlock().run() }, "{ }", " Code Block")
11827
- ), show("fullscreen") && /* @__PURE__ */ React113.createElement(Tooltip, { title: "Toggle Fullscreen", placement: "top" }, /* @__PURE__ */ React113.createElement(
11923
+ /* @__PURE__ */ React114.createElement("button", { className: "dropdown-item", onClick: () => editor.chain().focus().toggleCodeBlock().run() }, "{ }", " Code Block")
11924
+ ), show("fullscreen") && /* @__PURE__ */ React114.createElement(Tooltip, { title: "Toggle Fullscreen", placement: "top" }, /* @__PURE__ */ React114.createElement(
11828
11925
  "button",
11829
11926
  {
11830
11927
  className: `toolbar-btn ${isFullscreen ? "is-active" : ""}`,
11831
11928
  onClick: onToggleFullscreen
11832
11929
  },
11833
- /* @__PURE__ */ React113.createElement(IconFullscreen, null)
11834
- )), show("tts") && /* @__PURE__ */ React113.createElement(TextToSpeech_default, { ref: ttsRef, editor, onTextToSpeech }), show("stt") && /* @__PURE__ */ React113.createElement(SpeechToText_default, { ref: sttRef, editor, onSpeechToText }), show("translate") && /* @__PURE__ */ React113.createElement("div", { className: "translate-split-btn" }, /* @__PURE__ */ React113.createElement(Tooltip, { title: "Translate selected text", placement: "top" }, /* @__PURE__ */ React113.createElement(
11930
+ /* @__PURE__ */ React114.createElement(IconFullscreen, null)
11931
+ )), show("tts") && /* @__PURE__ */ React114.createElement(TextToSpeech_default, { ref: ttsRef, editor, onTextToSpeech }), show("stt") && /* @__PURE__ */ React114.createElement(SpeechToText_default, { ref: sttRef, editor, onSpeechToText }), show("translate") && /* @__PURE__ */ React114.createElement("div", { className: "translate-split-btn" }, /* @__PURE__ */ React114.createElement(Tooltip, { title: "Translate selected text", placement: "top" }, /* @__PURE__ */ React114.createElement(
11835
11932
  "button",
11836
11933
  {
11837
11934
  className: "toolbar-btn",
11838
11935
  onClick: handleQuickTranslate
11839
11936
  },
11840
- /* @__PURE__ */ React113.createElement(IconTranslate, null)
11841
- )), /* @__PURE__ */ React113.createElement(Dropdown, { trigger: { label: "", title: "Translate options", className: "translate-arrow-btn" } }, /* @__PURE__ */ React113.createElement("button", { className: "dropdown-item", onClick: () => setShowTranslateModal(true) }, "Options")), translateStatus && /* @__PURE__ */ React113.createElement("span", { className: `translate-toast-popup ${translateStatus === "Please select the text" || translateStatus === "Translation failed" ? "error" : ""}` }, translateStatus)), show("todo") && /* @__PURE__ */ React113.createElement("div", { className: "todo-split-btn" }, /* @__PURE__ */ React113.createElement(Tooltip, { title: todoEnabled ? "Disable Task List" : "Enable Task List", placement: "top" }, /* @__PURE__ */ React113.createElement(
11937
+ /* @__PURE__ */ React114.createElement(IconTranslate, null)
11938
+ )), /* @__PURE__ */ React114.createElement(Dropdown, { trigger: { label: "", title: "Translate options", className: "translate-arrow-btn" } }, /* @__PURE__ */ React114.createElement("button", { className: "dropdown-item", onClick: () => setShowTranslateModal(true) }, "Options")), translateStatus && /* @__PURE__ */ React114.createElement("span", { className: `translate-toast-popup ${translateStatus === "Please select the text" || translateStatus === "Translation failed" ? "error" : ""}` }, translateStatus)), show("todo") && /* @__PURE__ */ React114.createElement("div", { className: "todo-split-btn" }, /* @__PURE__ */ React114.createElement(Tooltip, { title: todoEnabled ? "Disable Task List" : "Enable Task List", placement: "top" }, /* @__PURE__ */ React114.createElement(
11842
11939
  "button",
11843
11940
  {
11844
11941
  className: `toolbar-btn ${todoEnabled ? "is-active" : ""}`,
@@ -11881,11 +11978,11 @@ var Toolbar = ({ editor, setLink, onAICommand, onTranslate, onSpeechToText, onTe
11881
11978
  }
11882
11979
  }
11883
11980
  },
11884
- /* @__PURE__ */ React113.createElement(IconTaskList, null)
11885
- )), /* @__PURE__ */ React113.createElement(Dropdown, { trigger: { label: "", title: "Task status", className: "todo-arrow-btn" }, keepOpen: true }, ["todo", "working", "blocked", "resolved"].map((status) => {
11981
+ /* @__PURE__ */ React114.createElement(IconTaskList, null)
11982
+ )), /* @__PURE__ */ React114.createElement(Dropdown, { trigger: { label: "", title: "Task status", className: "todo-arrow-btn" }, keepOpen: true }, ["todo", "working", "blocked", "resolved"].map((status) => {
11886
11983
  const images = { todo: "https://storage.googleapis.com/rufous-com-bucket-1/static/images/todo-blank.svg", working: "https://storage.googleapis.com/rufous-com-bucket-1/static/images/working.svg", blocked: "https://storage.googleapis.com/rufous-com-bucket-1/static/images/blocked.svg", resolved: "https://storage.googleapis.com/rufous-com-bucket-1/static/images/closed.svg" };
11887
11984
  const labels = { todo: "Todo", working: "Working", blocked: "Blocked", resolved: "Resolved" };
11888
- return /* @__PURE__ */ React113.createElement("button", { key: status, className: "dropdown-item task-status-item", onClick: () => {
11985
+ return /* @__PURE__ */ React114.createElement("button", { key: status, className: "dropdown-item task-status-item", onClick: () => {
11889
11986
  const { state } = editor;
11890
11987
  const { schema } = state;
11891
11988
  const taskItemType = schema.nodes.taskItem;
@@ -11918,8 +12015,8 @@ var Toolbar = ({ editor, setLink, onAICommand, onTranslate, onSpeechToText, onTe
11918
12015
  }
11919
12016
  return true;
11920
12017
  }).run();
11921
- } }, /* @__PURE__ */ React113.createElement("span", { className: `task-icon task-${status}` }, /* @__PURE__ */ React113.createElement("img", { src: images[status], alt: status })), " ", labels[status]);
11922
- })))), onClose && /* @__PURE__ */ React113.createElement("div", { className: "toolbar-row-right" }, /* @__PURE__ */ React113.createElement(Tooltip, { title: "Close", placement: "top" }, /* @__PURE__ */ React113.createElement(
12018
+ } }, /* @__PURE__ */ React114.createElement("span", { className: `task-icon task-${status}` }, /* @__PURE__ */ React114.createElement("img", { src: images[status], alt: status })), " ", labels[status]);
12019
+ })))), onClose && /* @__PURE__ */ React114.createElement("div", { className: "toolbar-row-right" }, /* @__PURE__ */ React114.createElement(Tooltip, { title: "Close", placement: "top" }, /* @__PURE__ */ React114.createElement(
11923
12020
  "button",
11924
12021
  {
11925
12022
  className: "toolbar-btn btn-cross",
@@ -11935,8 +12032,8 @@ var Toolbar = ({ editor, setLink, onAICommand, onTranslate, onSpeechToText, onTe
11935
12032
  onClose();
11936
12033
  }
11937
12034
  },
11938
- /* @__PURE__ */ React113.createElement(closeIcon_default, { color: "#a81c08" })
11939
- ))), showTranslateModal && /* @__PURE__ */ React113.createElement(
12035
+ /* @__PURE__ */ React114.createElement(closeIcon_default, { color: "#a81c08" })
12036
+ ))), showTranslateModal && /* @__PURE__ */ React114.createElement(
11940
12037
  TranslateModal_default,
11941
12038
  {
11942
12039
  editor,
@@ -11954,7 +12051,7 @@ var Toolbar = ({ editor, setLink, onAICommand, onTranslate, onSpeechToText, onTe
11954
12051
  var Toolbar_default = Toolbar;
11955
12052
 
11956
12053
  // lib/RufousTextEditor/ImageToolbar.tsx
11957
- import React114, { useState as useState32, useEffect as useEffect26, useRef as useRef29 } from "react";
12054
+ import React115, { useState as useState32, useEffect as useEffect26, useRef as useRef29 } from "react";
11958
12055
  import { createPortal as createPortal5 } from "react-dom";
11959
12056
  var ALIGNMENTS = [
11960
12057
  { value: "left", label: "Left", icon: "\u2630" },
@@ -12012,7 +12109,7 @@ var ImagePropertiesModal = ({ editor, node, onClose }) => {
12012
12109
  editor.chain().focus().deleteSelection().run();
12013
12110
  onClose();
12014
12111
  };
12015
- return /* @__PURE__ */ React114.createElement("div", { className: "modal-overlay", onClick: onClose }, /* @__PURE__ */ React114.createElement("div", { className: "modal-content", onClick: (e) => e.stopPropagation() }, /* @__PURE__ */ React114.createElement("div", { className: "modal-header" }, /* @__PURE__ */ React114.createElement("h3", null, "Image properties"), /* @__PURE__ */ React114.createElement("button", { className: "modal-close", onClick: onClose }, "\xD7")), /* @__PURE__ */ React114.createElement("div", { className: "modal-body" }, /* @__PURE__ */ React114.createElement("div", { className: "modal-layout" }, /* @__PURE__ */ React114.createElement("div", { className: "modal-preview-col" }, src && /* @__PURE__ */ React114.createElement("div", { className: "modal-preview" }, /* @__PURE__ */ React114.createElement("img", { src, alt: alt || "Preview" })), /* @__PURE__ */ React114.createElement("div", { className: "modal-dimensions" }, /* @__PURE__ */ React114.createElement(
12112
+ return /* @__PURE__ */ React115.createElement("div", { className: "modal-overlay", onClick: onClose }, /* @__PURE__ */ React115.createElement("div", { className: "modal-content", onClick: (e) => e.stopPropagation() }, /* @__PURE__ */ React115.createElement("div", { className: "modal-header" }, /* @__PURE__ */ React115.createElement("h3", null, "Image properties"), /* @__PURE__ */ React115.createElement("button", { className: "modal-close", onClick: onClose }, "\xD7")), /* @__PURE__ */ React115.createElement("div", { className: "modal-body" }, /* @__PURE__ */ React115.createElement("div", { className: "modal-layout" }, /* @__PURE__ */ React115.createElement("div", { className: "modal-preview-col" }, src && /* @__PURE__ */ React115.createElement("div", { className: "modal-preview" }, /* @__PURE__ */ React115.createElement("img", { src, alt: alt || "Preview" })), /* @__PURE__ */ React115.createElement("div", { className: "modal-dimensions" }, /* @__PURE__ */ React115.createElement(
12016
12113
  "input",
12017
12114
  {
12018
12115
  type: "number",
@@ -12020,14 +12117,14 @@ var ImagePropertiesModal = ({ editor, node, onClose }) => {
12020
12117
  value: width,
12021
12118
  onChange: (e) => handleWidthChange(e.target.value)
12022
12119
  }
12023
- ), /* @__PURE__ */ React114.createElement(Tooltip, { title: lockRatio ? "Unlock aspect ratio" : "Lock aspect ratio", placement: "top" }, /* @__PURE__ */ React114.createElement(
12120
+ ), /* @__PURE__ */ React115.createElement(Tooltip, { title: lockRatio ? "Unlock aspect ratio" : "Lock aspect ratio", placement: "top" }, /* @__PURE__ */ React115.createElement(
12024
12121
  "button",
12025
12122
  {
12026
12123
  className: `lock-btn ${lockRatio ? "locked" : ""}`,
12027
12124
  onClick: () => setLockRatio(!lockRatio)
12028
12125
  },
12029
12126
  lockRatio ? "\u{1F512}" : "\u{1F513}"
12030
- )), /* @__PURE__ */ React114.createElement(
12127
+ )), /* @__PURE__ */ React115.createElement(
12031
12128
  "input",
12032
12129
  {
12033
12130
  type: "number",
@@ -12035,21 +12132,21 @@ var ImagePropertiesModal = ({ editor, node, onClose }) => {
12035
12132
  value: height,
12036
12133
  onChange: (e) => handleHeightChange(e.target.value)
12037
12134
  }
12038
- ))), /* @__PURE__ */ React114.createElement("div", { className: "modal-fields-col" }, /* @__PURE__ */ React114.createElement("div", { className: "modal-tabs" }, /* @__PURE__ */ React114.createElement(
12135
+ ))), /* @__PURE__ */ React115.createElement("div", { className: "modal-fields-col" }, /* @__PURE__ */ React115.createElement("div", { className: "modal-tabs" }, /* @__PURE__ */ React115.createElement(
12039
12136
  "button",
12040
12137
  {
12041
12138
  className: `modal-tab ${activeTab === "image" ? "active" : ""}`,
12042
12139
  onClick: () => setActiveTab("image")
12043
12140
  },
12044
12141
  "Image"
12045
- ), /* @__PURE__ */ React114.createElement(
12142
+ ), /* @__PURE__ */ React115.createElement(
12046
12143
  "button",
12047
12144
  {
12048
12145
  className: `modal-tab ${activeTab === "advanced" ? "active" : ""}`,
12049
12146
  onClick: () => setActiveTab("advanced")
12050
12147
  },
12051
12148
  "Advanced"
12052
- )), activeTab === "image" ? /* @__PURE__ */ React114.createElement(React114.Fragment, null, /* @__PURE__ */ React114.createElement("label", { className: "modal-label" }, "Src"), /* @__PURE__ */ React114.createElement(
12149
+ )), activeTab === "image" ? /* @__PURE__ */ React115.createElement(React115.Fragment, null, /* @__PURE__ */ React115.createElement("label", { className: "modal-label" }, "Src"), /* @__PURE__ */ React115.createElement(
12053
12150
  "input",
12054
12151
  {
12055
12152
  type: "text",
@@ -12057,7 +12154,7 @@ var ImagePropertiesModal = ({ editor, node, onClose }) => {
12057
12154
  value: src,
12058
12155
  onChange: (e) => setSrc(e.target.value)
12059
12156
  }
12060
- ), /* @__PURE__ */ React114.createElement("label", { className: "modal-label" }, "Title"), /* @__PURE__ */ React114.createElement(
12157
+ ), /* @__PURE__ */ React115.createElement("label", { className: "modal-label" }, "Title"), /* @__PURE__ */ React115.createElement(
12061
12158
  "input",
12062
12159
  {
12063
12160
  type: "text",
@@ -12065,7 +12162,7 @@ var ImagePropertiesModal = ({ editor, node, onClose }) => {
12065
12162
  value: title,
12066
12163
  onChange: (e) => setTitle(e.target.value)
12067
12164
  }
12068
- ), /* @__PURE__ */ React114.createElement("label", { className: "modal-label" }, "Alternative"), /* @__PURE__ */ React114.createElement(
12165
+ ), /* @__PURE__ */ React115.createElement("label", { className: "modal-label" }, "Alternative"), /* @__PURE__ */ React115.createElement(
12069
12166
  "input",
12070
12167
  {
12071
12168
  type: "text",
@@ -12073,7 +12170,7 @@ var ImagePropertiesModal = ({ editor, node, onClose }) => {
12073
12170
  value: alt,
12074
12171
  onChange: (e) => setAlt(e.target.value)
12075
12172
  }
12076
- ), /* @__PURE__ */ React114.createElement("label", { className: "modal-label" }, "Link"), /* @__PURE__ */ React114.createElement(
12173
+ ), /* @__PURE__ */ React115.createElement("label", { className: "modal-label" }, "Link"), /* @__PURE__ */ React115.createElement(
12077
12174
  "input",
12078
12175
  {
12079
12176
  type: "text",
@@ -12081,14 +12178,14 @@ var ImagePropertiesModal = ({ editor, node, onClose }) => {
12081
12178
  value: link,
12082
12179
  onChange: (e) => setLink(e.target.value)
12083
12180
  }
12084
- ), /* @__PURE__ */ React114.createElement("label", { className: "modal-checkbox" }, /* @__PURE__ */ React114.createElement(
12181
+ ), /* @__PURE__ */ React115.createElement("label", { className: "modal-checkbox" }, /* @__PURE__ */ React115.createElement(
12085
12182
  "input",
12086
12183
  {
12087
12184
  type: "checkbox",
12088
12185
  checked: openInNewTab,
12089
12186
  onChange: (e) => setOpenInNewTab(e.target.checked)
12090
12187
  }
12091
- ), "Open link in new tab")) : /* @__PURE__ */ React114.createElement(React114.Fragment, null, /* @__PURE__ */ React114.createElement("label", { className: "modal-label" }, "CSS Class"), /* @__PURE__ */ React114.createElement("input", { type: "text", className: "modal-input", placeholder: "e.g. rounded shadow" }), /* @__PURE__ */ React114.createElement("label", { className: "modal-label" }, "Inline Style"), /* @__PURE__ */ React114.createElement("input", { type: "text", className: "modal-input", placeholder: "e.g. border: 1px solid #ccc" }))))), /* @__PURE__ */ React114.createElement("div", { className: "modal-footer" }, /* @__PURE__ */ React114.createElement("div", { className: "modal-footer-left" }, /* @__PURE__ */ React114.createElement("button", { className: "modal-btn-cancel", onClick: onClose }, "Cancel"), /* @__PURE__ */ React114.createElement("button", { className: "modal-btn-delete", onClick: handleDelete }, "Delete")), /* @__PURE__ */ React114.createElement("button", { className: "modal-btn-apply", onClick: handleApply }, "Apply"))));
12188
+ ), "Open link in new tab")) : /* @__PURE__ */ React115.createElement(React115.Fragment, null, /* @__PURE__ */ React115.createElement("label", { className: "modal-label" }, "CSS Class"), /* @__PURE__ */ React115.createElement("input", { type: "text", className: "modal-input", placeholder: "e.g. rounded shadow" }), /* @__PURE__ */ React115.createElement("label", { className: "modal-label" }, "Inline Style"), /* @__PURE__ */ React115.createElement("input", { type: "text", className: "modal-input", placeholder: "e.g. border: 1px solid #ccc" }))))), /* @__PURE__ */ React115.createElement("div", { className: "modal-footer" }, /* @__PURE__ */ React115.createElement("div", { className: "modal-footer-left" }, /* @__PURE__ */ React115.createElement("button", { className: "modal-btn-cancel", onClick: onClose }, "Cancel"), /* @__PURE__ */ React115.createElement("button", { className: "modal-btn-delete", onClick: handleDelete }, "Delete")), /* @__PURE__ */ React115.createElement("button", { className: "modal-btn-apply", onClick: handleApply }, "Apply"))));
12092
12189
  };
12093
12190
  var ImageToolbar = ({ editor }) => {
12094
12191
  const [showModal, setShowModal] = useState32(false);
@@ -12127,7 +12224,7 @@ var ImageToolbar = ({ editor }) => {
12127
12224
  const node = editor?.state.selection.node;
12128
12225
  const isImage = node && node.type.name === "image";
12129
12226
  if (!editor || !isImage || !pos) return showModal ? createPortal5(
12130
- /* @__PURE__ */ React114.createElement(ImagePropertiesModal, { editor, node, onClose: () => setShowModal(false) }),
12227
+ /* @__PURE__ */ React115.createElement(ImagePropertiesModal, { editor, node, onClose: () => setShowModal(false) }),
12131
12228
  document.body
12132
12229
  ) : null;
12133
12230
  const handleDelete = () => {
@@ -12204,7 +12301,7 @@ var ImageToolbar = ({ editor }) => {
12204
12301
  setShowVAlign(false);
12205
12302
  };
12206
12303
  return createPortal5(
12207
- /* @__PURE__ */ React114.createElement(React114.Fragment, null, /* @__PURE__ */ React114.createElement(
12304
+ /* @__PURE__ */ React115.createElement(React115.Fragment, null, /* @__PURE__ */ React115.createElement(
12208
12305
  "div",
12209
12306
  {
12210
12307
  className: "image-toolbar",
@@ -12212,14 +12309,14 @@ var ImageToolbar = ({ editor }) => {
12212
12309
  style: { position: "absolute", top: pos.top, left: pos.left, zIndex: 1e3 },
12213
12310
  onMouseDown: (e) => e.preventDefault()
12214
12311
  },
12215
- /* @__PURE__ */ React114.createElement(Tooltip, { title: "Delete", placement: "top" }, /* @__PURE__ */ React114.createElement("button", { className: "img-tool-btn", onClick: handleDelete }, "\u{1F5D1}")),
12216
- /* @__PURE__ */ React114.createElement(Tooltip, { title: "Edit properties", placement: "top" }, /* @__PURE__ */ React114.createElement("button", { className: "img-tool-btn", onClick: () => setShowModal(true) }, "\u270E")),
12217
- /* @__PURE__ */ React114.createElement("div", { className: "img-tool-copy-wrapper" }, /* @__PURE__ */ React114.createElement(Tooltip, { title: "Copy image", placement: "top" }, /* @__PURE__ */ React114.createElement("button", { className: "img-tool-btn", onClick: handleCopy }, copyStatus ? "\u2713" : "\u{1F4CB}")), copyStatus && /* @__PURE__ */ React114.createElement("span", { className: "img-copy-toast" }, copyStatus)),
12218
- /* @__PURE__ */ React114.createElement("div", { className: "img-tool-dropdown" }, /* @__PURE__ */ React114.createElement(Tooltip, { title: "Horizontal alignment", placement: "top" }, /* @__PURE__ */ React114.createElement("button", { className: "img-tool-btn", onClick: () => {
12312
+ /* @__PURE__ */ React115.createElement(Tooltip, { title: "Delete", placement: "top" }, /* @__PURE__ */ React115.createElement("button", { className: "img-tool-btn", onClick: handleDelete }, "\u{1F5D1}")),
12313
+ /* @__PURE__ */ React115.createElement(Tooltip, { title: "Edit properties", placement: "top" }, /* @__PURE__ */ React115.createElement("button", { className: "img-tool-btn", onClick: () => setShowModal(true) }, "\u270E")),
12314
+ /* @__PURE__ */ React115.createElement("div", { className: "img-tool-copy-wrapper" }, /* @__PURE__ */ React115.createElement(Tooltip, { title: "Copy image", placement: "top" }, /* @__PURE__ */ React115.createElement("button", { className: "img-tool-btn", onClick: handleCopy }, copyStatus ? "\u2713" : "\u{1F4CB}")), copyStatus && /* @__PURE__ */ React115.createElement("span", { className: "img-copy-toast" }, copyStatus)),
12315
+ /* @__PURE__ */ React115.createElement("div", { className: "img-tool-dropdown" }, /* @__PURE__ */ React115.createElement(Tooltip, { title: "Horizontal alignment", placement: "top" }, /* @__PURE__ */ React115.createElement("button", { className: "img-tool-btn", onClick: () => {
12219
12316
  setShowAlign(!showAlign);
12220
12317
  setShowVAlign(false);
12221
- } }, "\u2630 ", /* @__PURE__ */ React114.createElement("span", { className: "dropdown-arrow" }, "\u25BE"))), showAlign && /* @__PURE__ */ React114.createElement("div", { className: "img-tool-menu" }, ALIGNMENTS.map((a) => /* @__PURE__ */ React114.createElement("button", { key: a.value, className: "dropdown-item", onClick: () => setAlignmentVal(a.value) }, a.icon, " ", a.label))))
12222
- ), showModal && /* @__PURE__ */ React114.createElement(
12318
+ } }, "\u2630 ", /* @__PURE__ */ React115.createElement("span", { className: "dropdown-arrow" }, "\u25BE"))), showAlign && /* @__PURE__ */ React115.createElement("div", { className: "img-tool-menu" }, ALIGNMENTS.map((a) => /* @__PURE__ */ React115.createElement("button", { key: a.value, className: "dropdown-item", onClick: () => setAlignmentVal(a.value) }, a.icon, " ", a.label))))
12319
+ ), showModal && /* @__PURE__ */ React115.createElement(
12223
12320
  ImagePropertiesModal,
12224
12321
  {
12225
12322
  editor,
@@ -12233,7 +12330,7 @@ var ImageToolbar = ({ editor }) => {
12233
12330
  var ImageToolbar_default = ImageToolbar;
12234
12331
 
12235
12332
  // lib/RufousTextEditor/VideoToolbar.tsx
12236
- import React115, { useState as useState33, useEffect as useEffect27, useRef as useRef30 } from "react";
12333
+ import React116, { useState as useState33, useEffect as useEffect27, useRef as useRef30 } from "react";
12237
12334
  import { createPortal as createPortal6 } from "react-dom";
12238
12335
  var ALIGNMENTS2 = [
12239
12336
  { value: "left", label: "Left", icon: "\u2630" },
@@ -12278,7 +12375,7 @@ var VideoPropertiesModal = ({ editor, node, nodeType, onClose }) => {
12278
12375
  onClose();
12279
12376
  };
12280
12377
  const isYoutube = nodeType === "youtube";
12281
- return /* @__PURE__ */ React115.createElement("div", { className: "modal-overlay", onClick: onClose }, /* @__PURE__ */ React115.createElement("div", { className: "modal-content", onClick: (e) => e.stopPropagation() }, /* @__PURE__ */ React115.createElement("div", { className: "modal-header" }, /* @__PURE__ */ React115.createElement("h3", null, "Video properties"), /* @__PURE__ */ React115.createElement("button", { className: "modal-close", onClick: onClose }, "\xD7")), /* @__PURE__ */ React115.createElement("div", { className: "modal-body" }, /* @__PURE__ */ React115.createElement("div", { className: "modal-layout" }, /* @__PURE__ */ React115.createElement("div", { className: "modal-preview-col" }, src && /* @__PURE__ */ React115.createElement("div", { className: "modal-preview", style: { background: "#000" } }, isYoutube ? /* @__PURE__ */ React115.createElement(
12378
+ return /* @__PURE__ */ React116.createElement("div", { className: "modal-overlay", onClick: onClose }, /* @__PURE__ */ React116.createElement("div", { className: "modal-content", onClick: (e) => e.stopPropagation() }, /* @__PURE__ */ React116.createElement("div", { className: "modal-header" }, /* @__PURE__ */ React116.createElement("h3", null, "Video properties"), /* @__PURE__ */ React116.createElement("button", { className: "modal-close", onClick: onClose }, "\xD7")), /* @__PURE__ */ React116.createElement("div", { className: "modal-body" }, /* @__PURE__ */ React116.createElement("div", { className: "modal-layout" }, /* @__PURE__ */ React116.createElement("div", { className: "modal-preview-col" }, src && /* @__PURE__ */ React116.createElement("div", { className: "modal-preview", style: { background: "#000" } }, isYoutube ? /* @__PURE__ */ React116.createElement(
12282
12379
  "iframe",
12283
12380
  {
12284
12381
  src,
@@ -12286,14 +12383,14 @@ var VideoPropertiesModal = ({ editor, node, nodeType, onClose }) => {
12286
12383
  style: { width: "100%", aspectRatio: "16/9", border: "none", display: "block" },
12287
12384
  allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
12288
12385
  }
12289
- ) : /* @__PURE__ */ React115.createElement(
12386
+ ) : /* @__PURE__ */ React116.createElement(
12290
12387
  "video",
12291
12388
  {
12292
12389
  src,
12293
12390
  controls: true,
12294
12391
  style: { width: "100%", aspectRatio: "16/9", display: "block" }
12295
12392
  }
12296
- )), /* @__PURE__ */ React115.createElement("div", { className: "modal-dimensions" }, /* @__PURE__ */ React115.createElement(
12393
+ )), /* @__PURE__ */ React116.createElement("div", { className: "modal-dimensions" }, /* @__PURE__ */ React116.createElement(
12297
12394
  "input",
12298
12395
  {
12299
12396
  type: "number",
@@ -12301,14 +12398,14 @@ var VideoPropertiesModal = ({ editor, node, nodeType, onClose }) => {
12301
12398
  value: width,
12302
12399
  onChange: (e) => handleWidthChange(e.target.value)
12303
12400
  }
12304
- ), /* @__PURE__ */ React115.createElement(Tooltip, { title: lockRatio ? "Unlock aspect ratio" : "Lock aspect ratio", placement: "top" }, /* @__PURE__ */ React115.createElement(
12401
+ ), /* @__PURE__ */ React116.createElement(Tooltip, { title: lockRatio ? "Unlock aspect ratio" : "Lock aspect ratio", placement: "top" }, /* @__PURE__ */ React116.createElement(
12305
12402
  "button",
12306
12403
  {
12307
12404
  className: `lock-btn ${lockRatio ? "locked" : ""}`,
12308
12405
  onClick: () => setLockRatio(!lockRatio)
12309
12406
  },
12310
12407
  lockRatio ? "\u{1F512}" : "\u{1F513}"
12311
- )), /* @__PURE__ */ React115.createElement(
12408
+ )), /* @__PURE__ */ React116.createElement(
12312
12409
  "input",
12313
12410
  {
12314
12411
  type: "number",
@@ -12316,7 +12413,7 @@ var VideoPropertiesModal = ({ editor, node, nodeType, onClose }) => {
12316
12413
  value: height,
12317
12414
  onChange: (e) => handleHeightChange(e.target.value)
12318
12415
  }
12319
- ))), /* @__PURE__ */ React115.createElement("div", { className: "modal-fields-col" }, /* @__PURE__ */ React115.createElement("label", { className: "modal-label" }, "Video URL"), /* @__PURE__ */ React115.createElement(
12416
+ ))), /* @__PURE__ */ React116.createElement("div", { className: "modal-fields-col" }, /* @__PURE__ */ React116.createElement("label", { className: "modal-label" }, "Video URL"), /* @__PURE__ */ React116.createElement(
12320
12417
  "input",
12321
12418
  {
12322
12419
  type: "text",
@@ -12324,7 +12421,7 @@ var VideoPropertiesModal = ({ editor, node, nodeType, onClose }) => {
12324
12421
  value: src,
12325
12422
  onChange: (e) => setSrc(e.target.value)
12326
12423
  }
12327
- ), /* @__PURE__ */ React115.createElement("label", { className: "modal-label" }, "Width"), /* @__PURE__ */ React115.createElement(
12424
+ ), /* @__PURE__ */ React116.createElement("label", { className: "modal-label" }, "Width"), /* @__PURE__ */ React116.createElement(
12328
12425
  "input",
12329
12426
  {
12330
12427
  type: "number",
@@ -12332,7 +12429,7 @@ var VideoPropertiesModal = ({ editor, node, nodeType, onClose }) => {
12332
12429
  value: width,
12333
12430
  onChange: (e) => handleWidthChange(e.target.value)
12334
12431
  }
12335
- ), /* @__PURE__ */ React115.createElement("label", { className: "modal-label" }, "Height"), /* @__PURE__ */ React115.createElement(
12432
+ ), /* @__PURE__ */ React116.createElement("label", { className: "modal-label" }, "Height"), /* @__PURE__ */ React116.createElement(
12336
12433
  "input",
12337
12434
  {
12338
12435
  type: "number",
@@ -12340,7 +12437,7 @@ var VideoPropertiesModal = ({ editor, node, nodeType, onClose }) => {
12340
12437
  value: height,
12341
12438
  onChange: (e) => handleHeightChange(e.target.value)
12342
12439
  }
12343
- )))), /* @__PURE__ */ React115.createElement("div", { className: "modal-footer" }, /* @__PURE__ */ React115.createElement("div", { className: "modal-footer-left" }, /* @__PURE__ */ React115.createElement("button", { className: "modal-btn-cancel", onClick: onClose }, "Cancel"), /* @__PURE__ */ React115.createElement("button", { className: "modal-btn-delete", onClick: handleDelete }, "Delete")), /* @__PURE__ */ React115.createElement("button", { className: "modal-btn-apply", onClick: handleApply }, "Apply"))));
12440
+ )))), /* @__PURE__ */ React116.createElement("div", { className: "modal-footer" }, /* @__PURE__ */ React116.createElement("div", { className: "modal-footer-left" }, /* @__PURE__ */ React116.createElement("button", { className: "modal-btn-cancel", onClick: onClose }, "Cancel"), /* @__PURE__ */ React116.createElement("button", { className: "modal-btn-delete", onClick: handleDelete }, "Delete")), /* @__PURE__ */ React116.createElement("button", { className: "modal-btn-apply", onClick: handleApply }, "Apply"))));
12344
12441
  };
12345
12442
  var VideoToolbar = ({ editor }) => {
12346
12443
  const [showModal, setShowModal] = useState33(false);
@@ -12380,7 +12477,7 @@ var VideoToolbar = ({ editor }) => {
12380
12477
  const isVideo = node && VIDEO_TYPES.includes(node.type.name);
12381
12478
  const nodeType = node?.type.name;
12382
12479
  if (!editor || !isVideo || !pos) return showModal ? createPortal6(
12383
- /* @__PURE__ */ React115.createElement(VideoPropertiesModal, { editor, node, nodeType, onClose: () => setShowModal(false) }),
12480
+ /* @__PURE__ */ React116.createElement(VideoPropertiesModal, { editor, node, nodeType, onClose: () => setShowModal(false) }),
12384
12481
  document.body
12385
12482
  ) : null;
12386
12483
  const handleDelete = () => {
@@ -12427,7 +12524,7 @@ var VideoToolbar = ({ editor }) => {
12427
12524
  );
12428
12525
  };
12429
12526
  return createPortal6(
12430
- /* @__PURE__ */ React115.createElement(React115.Fragment, null, /* @__PURE__ */ React115.createElement(
12527
+ /* @__PURE__ */ React116.createElement(React116.Fragment, null, /* @__PURE__ */ React116.createElement(
12431
12528
  "div",
12432
12529
  {
12433
12530
  className: "image-toolbar",
@@ -12435,30 +12532,30 @@ var VideoToolbar = ({ editor }) => {
12435
12532
  style: { position: "absolute", top: pos.top, left: pos.left, zIndex: 1e3 },
12436
12533
  onMouseDown: (e) => e.preventDefault()
12437
12534
  },
12438
- /* @__PURE__ */ React115.createElement(Tooltip, { title: "Delete", placement: "top" }, /* @__PURE__ */ React115.createElement("button", { className: "img-tool-btn", onClick: handleDelete }, "\u{1F5D1}")),
12439
- /* @__PURE__ */ React115.createElement(Tooltip, { title: "Edit properties", placement: "top" }, /* @__PURE__ */ React115.createElement("button", { className: "img-tool-btn", onClick: () => setShowModal(true) }, "\u270E")),
12440
- /* @__PURE__ */ React115.createElement("div", { className: "img-tool-copy-wrapper" }, /* @__PURE__ */ React115.createElement(Tooltip, { title: "Copy URL", placement: "top" }, /* @__PURE__ */ React115.createElement("button", { className: "img-tool-btn", onClick: handleCopy }, copyStatus ? "\u2713" : "\u{1F4CB}")), copyStatus && /* @__PURE__ */ React115.createElement("span", { className: "img-copy-toast" }, copyStatus)),
12441
- /* @__PURE__ */ React115.createElement("div", { className: "img-tool-dropdown" }, /* @__PURE__ */ React115.createElement(Tooltip, { title: "Size presets", placement: "top" }, /* @__PURE__ */ React115.createElement("button", { className: "img-tool-btn", onClick: () => {
12535
+ /* @__PURE__ */ React116.createElement(Tooltip, { title: "Delete", placement: "top" }, /* @__PURE__ */ React116.createElement("button", { className: "img-tool-btn", onClick: handleDelete }, "\u{1F5D1}")),
12536
+ /* @__PURE__ */ React116.createElement(Tooltip, { title: "Edit properties", placement: "top" }, /* @__PURE__ */ React116.createElement("button", { className: "img-tool-btn", onClick: () => setShowModal(true) }, "\u270E")),
12537
+ /* @__PURE__ */ React116.createElement("div", { className: "img-tool-copy-wrapper" }, /* @__PURE__ */ React116.createElement(Tooltip, { title: "Copy URL", placement: "top" }, /* @__PURE__ */ React116.createElement("button", { className: "img-tool-btn", onClick: handleCopy }, copyStatus ? "\u2713" : "\u{1F4CB}")), copyStatus && /* @__PURE__ */ React116.createElement("span", { className: "img-copy-toast" }, copyStatus)),
12538
+ /* @__PURE__ */ React116.createElement("div", { className: "img-tool-dropdown" }, /* @__PURE__ */ React116.createElement(Tooltip, { title: "Size presets", placement: "top" }, /* @__PURE__ */ React116.createElement("button", { className: "img-tool-btn", onClick: () => {
12442
12539
  setShowSize(!showSize);
12443
12540
  setShowAlign(false);
12444
- } }, /* @__PURE__ */ React115.createElement("span", { style: { fontSize: "11px" } }, node.attrs.width || 640, "x", node.attrs.height || 360), /* @__PURE__ */ React115.createElement("span", { className: "dropdown-arrow" }, "\u25BE"))), showSize && /* @__PURE__ */ React115.createElement("div", { className: "img-tool-menu" }, /* @__PURE__ */ React115.createElement("button", { className: "dropdown-item", onClick: () => {
12541
+ } }, /* @__PURE__ */ React116.createElement("span", { style: { fontSize: "11px" } }, node.attrs.width || 640, "x", node.attrs.height || 360), /* @__PURE__ */ React116.createElement("span", { className: "dropdown-arrow" }, "\u25BE"))), showSize && /* @__PURE__ */ React116.createElement("div", { className: "img-tool-menu" }, /* @__PURE__ */ React116.createElement("button", { className: "dropdown-item", onClick: () => {
12445
12542
  handleResize("small");
12446
12543
  setShowSize(false);
12447
- } }, "Small (320x180)"), /* @__PURE__ */ React115.createElement("button", { className: "dropdown-item", onClick: () => {
12544
+ } }, "Small (320x180)"), /* @__PURE__ */ React116.createElement("button", { className: "dropdown-item", onClick: () => {
12448
12545
  handleResize("medium");
12449
12546
  setShowSize(false);
12450
- } }, "Medium (480x270)"), /* @__PURE__ */ React115.createElement("button", { className: "dropdown-item", onClick: () => {
12547
+ } }, "Medium (480x270)"), /* @__PURE__ */ React116.createElement("button", { className: "dropdown-item", onClick: () => {
12451
12548
  handleResize("large");
12452
12549
  setShowSize(false);
12453
- } }, "Large (640x360)"), /* @__PURE__ */ React115.createElement("button", { className: "dropdown-item", onClick: () => {
12550
+ } }, "Large (640x360)"), /* @__PURE__ */ React116.createElement("button", { className: "dropdown-item", onClick: () => {
12454
12551
  handleResize("full");
12455
12552
  setShowSize(false);
12456
12553
  } }, "Full (854x480)"))),
12457
- /* @__PURE__ */ React115.createElement("div", { className: "img-tool-dropdown" }, /* @__PURE__ */ React115.createElement(Tooltip, { title: "Horizontal alignment", placement: "top" }, /* @__PURE__ */ React115.createElement("button", { className: "img-tool-btn", onClick: () => {
12554
+ /* @__PURE__ */ React116.createElement("div", { className: "img-tool-dropdown" }, /* @__PURE__ */ React116.createElement(Tooltip, { title: "Horizontal alignment", placement: "top" }, /* @__PURE__ */ React116.createElement("button", { className: "img-tool-btn", onClick: () => {
12458
12555
  setShowAlign(!showAlign);
12459
12556
  setShowSize(false);
12460
- } }, "\u2630 ", /* @__PURE__ */ React115.createElement("span", { className: "dropdown-arrow" }, "\u25BE"))), showAlign && /* @__PURE__ */ React115.createElement("div", { className: "img-tool-menu" }, ALIGNMENTS2.map((a) => /* @__PURE__ */ React115.createElement("button", { key: a.value, className: "dropdown-item", onClick: () => setAlignmentVal(a.value) }, a.icon, " ", a.label))))
12461
- ), showModal && /* @__PURE__ */ React115.createElement(
12557
+ } }, "\u2630 ", /* @__PURE__ */ React116.createElement("span", { className: "dropdown-arrow" }, "\u25BE"))), showAlign && /* @__PURE__ */ React116.createElement("div", { className: "img-tool-menu" }, ALIGNMENTS2.map((a) => /* @__PURE__ */ React116.createElement("button", { key: a.value, className: "dropdown-item", onClick: () => setAlignmentVal(a.value) }, a.icon, " ", a.label))))
12558
+ ), showModal && /* @__PURE__ */ React116.createElement(
12462
12559
  VideoPropertiesModal,
12463
12560
  {
12464
12561
  editor,
@@ -12473,18 +12570,18 @@ var VideoToolbar = ({ editor }) => {
12473
12570
  var VideoToolbar_default = VideoToolbar;
12474
12571
 
12475
12572
  // lib/RufousTextEditor/TableToolbar.tsx
12476
- import React116, { useState as useState34, useEffect as useEffect28, useRef as useRef31 } from "react";
12573
+ import React117, { useState as useState34, useEffect as useEffect28, useRef as useRef31 } from "react";
12477
12574
  import { createPortal as createPortal7 } from "react-dom";
12478
- var IconAddRowBefore = () => /* @__PURE__ */ React116.createElement("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "currentColor" }, /* @__PURE__ */ React116.createElement("path", { d: "M20 3H4c-.55 0-1 .45-1 1v16c0 .55.45 1 1 1h16c.55 0 1-.45 1-1V4c0-.55-.45-1-1-1zm-1 8H5V5h14v6zm0 8H5v-6h14v6z" }), /* @__PURE__ */ React116.createElement("path", { d: "M9 6h2v1.5h1.5v2H11V11H9V9.5H7.5v-2H9z" }));
12479
- var IconAddRowAfter = () => /* @__PURE__ */ React116.createElement("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "currentColor" }, /* @__PURE__ */ React116.createElement("path", { d: "M20 3H4c-.55 0-1 .45-1 1v16c0 .55.45 1 1 1h16c.55 0 1-.45 1-1V4c0-.55-.45-1-1-1zm-1 8H5V5h14v6zm0 8H5v-6h14v6z" }), /* @__PURE__ */ React116.createElement("path", { d: "M9 14h2v1.5h1.5v2H11V19H9v-1.5H7.5v-2H9z" }));
12480
- var IconAddColBefore = () => /* @__PURE__ */ React116.createElement("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "currentColor" }, /* @__PURE__ */ React116.createElement("path", { d: "M20 3H4c-.55 0-1 .45-1 1v16c0 .55.45 1 1 1h16c.55 0 1-.45 1-1V4c0-.55-.45-1-1-1zm-9 16H5V5h6v14zm8 0h-6V5h6v14z" }), /* @__PURE__ */ React116.createElement("path", { d: "M6 10h1.5v2H6v1.5H4v-2h1.5V10H4V8h2z", transform: "translate(2,1)" }));
12481
- var IconAddColAfter = () => /* @__PURE__ */ React116.createElement("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "currentColor" }, /* @__PURE__ */ React116.createElement("path", { d: "M20 3H4c-.55 0-1 .45-1 1v16c0 .55.45 1 1 1h16c.55 0 1-.45 1-1V4c0-.55-.45-1-1-1zm-9 16H5V5h6v14zm8 0h-6V5h6v14z" }), /* @__PURE__ */ React116.createElement("path", { d: "M15 9h2v1.5h1.5v2H17V14h-2v-1.5h-1.5v-2H15z" }));
12482
- var IconDeleteRow = () => /* @__PURE__ */ React116.createElement("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "currentColor" }, /* @__PURE__ */ React116.createElement("path", { d: "M20 3H4c-.55 0-1 .45-1 1v16c0 .55.45 1 1 1h16c.55 0 1-.45 1-1V4c0-.55-.45-1-1-1zm-1 8H5V5h14v6zm0 8H5v-6h14v6z" }), /* @__PURE__ */ React116.createElement("path", { d: "M8 14.5h8v2H8z" }));
12483
- var IconDeleteCol = () => /* @__PURE__ */ React116.createElement("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "currentColor" }, /* @__PURE__ */ React116.createElement("path", { d: "M20 3H4c-.55 0-1 .45-1 1v16c0 .55.45 1 1 1h16c.55 0 1-.45 1-1V4c0-.55-.45-1-1-1zm-9 16H5V5h6v14zm8 0h-6V5h6v14z" }), /* @__PURE__ */ React116.createElement("path", { d: "M14 9.5v6h2v-6z" }));
12484
- var IconDeleteTable = () => /* @__PURE__ */ React116.createElement("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "currentColor" }, /* @__PURE__ */ React116.createElement("path", { d: "M20 3H4c-.55 0-1 .45-1 1v16c0 .55.45 1 1 1h16c.55 0 1-.45 1-1V4c0-.55-.45-1-1-1zm-1 16H5V5h14v14z" }), /* @__PURE__ */ React116.createElement("path", { d: "M9.17 10l-1.41 1.41L10.59 14l-2.83 2.83 1.41 1.41L12 15.41l2.83 2.83 1.41-1.41L13.41 14l2.83-2.83-1.41-1.41L12 12.59z" }));
12485
- var IconMergeCells = () => /* @__PURE__ */ React116.createElement("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "currentColor" }, /* @__PURE__ */ React116.createElement("path", { d: "M3 3h18v18H3V3zm2 2v5h6V5H5zm8 0v5h6V5h-6zM5 13v6h14v-6H5z" }), /* @__PURE__ */ React116.createElement("path", { d: "M8 15h8v2H8z" }));
12486
- var IconSplitCell = () => /* @__PURE__ */ React116.createElement("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "currentColor" }, /* @__PURE__ */ React116.createElement("path", { d: "M3 3h18v18H3V3zm2 2v5h6V5H5zm8 0v5h6V5h-6zM5 13v6h6v-6H5zm8 0v6h6v-6h-6z" }));
12487
- var IconToggleHeader = () => /* @__PURE__ */ React116.createElement("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "currentColor" }, /* @__PURE__ */ React116.createElement("path", { d: "M3 3h18v18H3V3zm2 2v4h14V5H5zm0 6v8h14v-8H5z" }), /* @__PURE__ */ React116.createElement("rect", { x: "5", y: "5", width: "14", height: "4", opacity: "0.4" }));
12575
+ var IconAddRowBefore = () => /* @__PURE__ */ React117.createElement("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "currentColor" }, /* @__PURE__ */ React117.createElement("path", { d: "M20 3H4c-.55 0-1 .45-1 1v16c0 .55.45 1 1 1h16c.55 0 1-.45 1-1V4c0-.55-.45-1-1-1zm-1 8H5V5h14v6zm0 8H5v-6h14v6z" }), /* @__PURE__ */ React117.createElement("path", { d: "M9 6h2v1.5h1.5v2H11V11H9V9.5H7.5v-2H9z" }));
12576
+ var IconAddRowAfter = () => /* @__PURE__ */ React117.createElement("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "currentColor" }, /* @__PURE__ */ React117.createElement("path", { d: "M20 3H4c-.55 0-1 .45-1 1v16c0 .55.45 1 1 1h16c.55 0 1-.45 1-1V4c0-.55-.45-1-1-1zm-1 8H5V5h14v6zm0 8H5v-6h14v6z" }), /* @__PURE__ */ React117.createElement("path", { d: "M9 14h2v1.5h1.5v2H11V19H9v-1.5H7.5v-2H9z" }));
12577
+ var IconAddColBefore = () => /* @__PURE__ */ React117.createElement("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "currentColor" }, /* @__PURE__ */ React117.createElement("path", { d: "M20 3H4c-.55 0-1 .45-1 1v16c0 .55.45 1 1 1h16c.55 0 1-.45 1-1V4c0-.55-.45-1-1-1zm-9 16H5V5h6v14zm8 0h-6V5h6v14z" }), /* @__PURE__ */ React117.createElement("path", { d: "M6 10h1.5v2H6v1.5H4v-2h1.5V10H4V8h2z", transform: "translate(2,1)" }));
12578
+ var IconAddColAfter = () => /* @__PURE__ */ React117.createElement("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "currentColor" }, /* @__PURE__ */ React117.createElement("path", { d: "M20 3H4c-.55 0-1 .45-1 1v16c0 .55.45 1 1 1h16c.55 0 1-.45 1-1V4c0-.55-.45-1-1-1zm-9 16H5V5h6v14zm8 0h-6V5h6v14z" }), /* @__PURE__ */ React117.createElement("path", { d: "M15 9h2v1.5h1.5v2H17V14h-2v-1.5h-1.5v-2H15z" }));
12579
+ var IconDeleteRow = () => /* @__PURE__ */ React117.createElement("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "currentColor" }, /* @__PURE__ */ React117.createElement("path", { d: "M20 3H4c-.55 0-1 .45-1 1v16c0 .55.45 1 1 1h16c.55 0 1-.45 1-1V4c0-.55-.45-1-1-1zm-1 8H5V5h14v6zm0 8H5v-6h14v6z" }), /* @__PURE__ */ React117.createElement("path", { d: "M8 14.5h8v2H8z" }));
12580
+ var IconDeleteCol = () => /* @__PURE__ */ React117.createElement("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "currentColor" }, /* @__PURE__ */ React117.createElement("path", { d: "M20 3H4c-.55 0-1 .45-1 1v16c0 .55.45 1 1 1h16c.55 0 1-.45 1-1V4c0-.55-.45-1-1-1zm-9 16H5V5h6v14zm8 0h-6V5h6v14z" }), /* @__PURE__ */ React117.createElement("path", { d: "M14 9.5v6h2v-6z" }));
12581
+ var IconDeleteTable = () => /* @__PURE__ */ React117.createElement("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "currentColor" }, /* @__PURE__ */ React117.createElement("path", { d: "M20 3H4c-.55 0-1 .45-1 1v16c0 .55.45 1 1 1h16c.55 0 1-.45 1-1V4c0-.55-.45-1-1-1zm-1 16H5V5h14v14z" }), /* @__PURE__ */ React117.createElement("path", { d: "M9.17 10l-1.41 1.41L10.59 14l-2.83 2.83 1.41 1.41L12 15.41l2.83 2.83 1.41-1.41L13.41 14l2.83-2.83-1.41-1.41L12 12.59z" }));
12582
+ var IconMergeCells = () => /* @__PURE__ */ React117.createElement("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "currentColor" }, /* @__PURE__ */ React117.createElement("path", { d: "M3 3h18v18H3V3zm2 2v5h6V5H5zm8 0v5h6V5h-6zM5 13v6h14v-6H5z" }), /* @__PURE__ */ React117.createElement("path", { d: "M8 15h8v2H8z" }));
12583
+ var IconSplitCell = () => /* @__PURE__ */ React117.createElement("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "currentColor" }, /* @__PURE__ */ React117.createElement("path", { d: "M3 3h18v18H3V3zm2 2v5h6V5H5zm8 0v5h6V5h-6zM5 13v6h6v-6H5zm8 0v6h6v-6h-6z" }));
12584
+ var IconToggleHeader = () => /* @__PURE__ */ React117.createElement("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "currentColor" }, /* @__PURE__ */ React117.createElement("path", { d: "M3 3h18v18H3V3zm2 2v4h14V5H5zm0 6v8h14v-8H5z" }), /* @__PURE__ */ React117.createElement("rect", { x: "5", y: "5", width: "14", height: "4", opacity: "0.4" }));
12488
12585
  var TableToolbar = ({ editor }) => {
12489
12586
  const [pos, setPos] = useState34(null);
12490
12587
  const toolbarRef = useRef31(null);
@@ -12532,7 +12629,7 @@ var TableToolbar = ({ editor }) => {
12532
12629
  const canSplit = editor.can().splitCell();
12533
12630
  const prevent = (e) => e.preventDefault();
12534
12631
  return createPortal7(
12535
- /* @__PURE__ */ React116.createElement(
12632
+ /* @__PURE__ */ React117.createElement(
12536
12633
  "div",
12537
12634
  {
12538
12635
  ref: toolbarRef,
@@ -12540,19 +12637,19 @@ var TableToolbar = ({ editor }) => {
12540
12637
  style: { top: pos.top, left: pos.left },
12541
12638
  onMouseDown: prevent
12542
12639
  },
12543
- /* @__PURE__ */ React116.createElement(Tooltip, { title: "Insert row above", placement: "top" }, /* @__PURE__ */ React116.createElement("button", { className: "rf-table-toolbar-btn", onClick: () => editor.chain().focus().addRowBefore().run() }, /* @__PURE__ */ React116.createElement(IconAddRowBefore, null))),
12544
- /* @__PURE__ */ React116.createElement(Tooltip, { title: "Insert row below", placement: "top" }, /* @__PURE__ */ React116.createElement("button", { className: "rf-table-toolbar-btn", onClick: () => editor.chain().focus().addRowAfter().run() }, /* @__PURE__ */ React116.createElement(IconAddRowAfter, null))),
12545
- /* @__PURE__ */ React116.createElement(Tooltip, { title: "Delete row", placement: "top" }, /* @__PURE__ */ React116.createElement("button", { className: "rf-table-toolbar-btn rf-table-toolbar-btn-danger", onClick: () => editor.chain().focus().deleteRow().run() }, /* @__PURE__ */ React116.createElement(IconDeleteRow, null))),
12546
- /* @__PURE__ */ React116.createElement("span", { className: "rf-table-toolbar-sep" }),
12547
- /* @__PURE__ */ React116.createElement(Tooltip, { title: "Insert column left", placement: "top" }, /* @__PURE__ */ React116.createElement("button", { className: "rf-table-toolbar-btn", onClick: () => editor.chain().focus().addColumnBefore().run() }, /* @__PURE__ */ React116.createElement(IconAddColBefore, null))),
12548
- /* @__PURE__ */ React116.createElement(Tooltip, { title: "Insert column right", placement: "top" }, /* @__PURE__ */ React116.createElement("button", { className: "rf-table-toolbar-btn", onClick: () => editor.chain().focus().addColumnAfter().run() }, /* @__PURE__ */ React116.createElement(IconAddColAfter, null))),
12549
- /* @__PURE__ */ React116.createElement(Tooltip, { title: "Delete column", placement: "top" }, /* @__PURE__ */ React116.createElement("button", { className: "rf-table-toolbar-btn rf-table-toolbar-btn-danger", onClick: () => editor.chain().focus().deleteColumn().run() }, /* @__PURE__ */ React116.createElement(IconDeleteCol, null))),
12550
- /* @__PURE__ */ React116.createElement("span", { className: "rf-table-toolbar-sep" }),
12551
- /* @__PURE__ */ React116.createElement(Tooltip, { title: "Merge cells", placement: "top" }, /* @__PURE__ */ React116.createElement("button", { className: "rf-table-toolbar-btn", onClick: () => editor.chain().focus().mergeCells().run(), disabled: !canMerge }, /* @__PURE__ */ React116.createElement(IconMergeCells, null))),
12552
- /* @__PURE__ */ React116.createElement(Tooltip, { title: "Split cell", placement: "top" }, /* @__PURE__ */ React116.createElement("button", { className: "rf-table-toolbar-btn", onClick: () => editor.chain().focus().splitCell().run(), disabled: !canSplit }, /* @__PURE__ */ React116.createElement(IconSplitCell, null))),
12553
- /* @__PURE__ */ React116.createElement("span", { className: "rf-table-toolbar-sep" }),
12554
- /* @__PURE__ */ React116.createElement(Tooltip, { title: "Toggle header row", placement: "top" }, /* @__PURE__ */ React116.createElement("button", { className: `rf-table-toolbar-btn ${editor.isActive("tableHeader") ? "active" : ""}`, onClick: () => editor.chain().focus().toggleHeaderRow().run() }, /* @__PURE__ */ React116.createElement(IconToggleHeader, null))),
12555
- /* @__PURE__ */ React116.createElement(Tooltip, { title: "Delete table", placement: "top" }, /* @__PURE__ */ React116.createElement("button", { className: "rf-table-toolbar-btn rf-table-toolbar-btn-danger", onClick: () => editor.chain().focus().deleteTable().run() }, /* @__PURE__ */ React116.createElement(IconDeleteTable, null)))
12640
+ /* @__PURE__ */ React117.createElement(Tooltip, { title: "Insert row above", placement: "top" }, /* @__PURE__ */ React117.createElement("button", { className: "rf-table-toolbar-btn", onClick: () => editor.chain().focus().addRowBefore().run() }, /* @__PURE__ */ React117.createElement(IconAddRowBefore, null))),
12641
+ /* @__PURE__ */ React117.createElement(Tooltip, { title: "Insert row below", placement: "top" }, /* @__PURE__ */ React117.createElement("button", { className: "rf-table-toolbar-btn", onClick: () => editor.chain().focus().addRowAfter().run() }, /* @__PURE__ */ React117.createElement(IconAddRowAfter, null))),
12642
+ /* @__PURE__ */ React117.createElement(Tooltip, { title: "Delete row", placement: "top" }, /* @__PURE__ */ React117.createElement("button", { className: "rf-table-toolbar-btn rf-table-toolbar-btn-danger", onClick: () => editor.chain().focus().deleteRow().run() }, /* @__PURE__ */ React117.createElement(IconDeleteRow, null))),
12643
+ /* @__PURE__ */ React117.createElement("span", { className: "rf-table-toolbar-sep" }),
12644
+ /* @__PURE__ */ React117.createElement(Tooltip, { title: "Insert column left", placement: "top" }, /* @__PURE__ */ React117.createElement("button", { className: "rf-table-toolbar-btn", onClick: () => editor.chain().focus().addColumnBefore().run() }, /* @__PURE__ */ React117.createElement(IconAddColBefore, null))),
12645
+ /* @__PURE__ */ React117.createElement(Tooltip, { title: "Insert column right", placement: "top" }, /* @__PURE__ */ React117.createElement("button", { className: "rf-table-toolbar-btn", onClick: () => editor.chain().focus().addColumnAfter().run() }, /* @__PURE__ */ React117.createElement(IconAddColAfter, null))),
12646
+ /* @__PURE__ */ React117.createElement(Tooltip, { title: "Delete column", placement: "top" }, /* @__PURE__ */ React117.createElement("button", { className: "rf-table-toolbar-btn rf-table-toolbar-btn-danger", onClick: () => editor.chain().focus().deleteColumn().run() }, /* @__PURE__ */ React117.createElement(IconDeleteCol, null))),
12647
+ /* @__PURE__ */ React117.createElement("span", { className: "rf-table-toolbar-sep" }),
12648
+ /* @__PURE__ */ React117.createElement(Tooltip, { title: "Merge cells", placement: "top" }, /* @__PURE__ */ React117.createElement("button", { className: "rf-table-toolbar-btn", onClick: () => editor.chain().focus().mergeCells().run(), disabled: !canMerge }, /* @__PURE__ */ React117.createElement(IconMergeCells, null))),
12649
+ /* @__PURE__ */ React117.createElement(Tooltip, { title: "Split cell", placement: "top" }, /* @__PURE__ */ React117.createElement("button", { className: "rf-table-toolbar-btn", onClick: () => editor.chain().focus().splitCell().run(), disabled: !canSplit }, /* @__PURE__ */ React117.createElement(IconSplitCell, null))),
12650
+ /* @__PURE__ */ React117.createElement("span", { className: "rf-table-toolbar-sep" }),
12651
+ /* @__PURE__ */ React117.createElement(Tooltip, { title: "Toggle header row", placement: "top" }, /* @__PURE__ */ React117.createElement("button", { className: `rf-table-toolbar-btn ${editor.isActive("tableHeader") ? "active" : ""}`, onClick: () => editor.chain().focus().toggleHeaderRow().run() }, /* @__PURE__ */ React117.createElement(IconToggleHeader, null))),
12652
+ /* @__PURE__ */ React117.createElement(Tooltip, { title: "Delete table", placement: "top" }, /* @__PURE__ */ React117.createElement("button", { className: "rf-table-toolbar-btn rf-table-toolbar-btn-danger", onClick: () => editor.chain().focus().deleteTable().run() }, /* @__PURE__ */ React117.createElement(IconDeleteTable, null)))
12556
12653
  ),
12557
12654
  document.body
12558
12655
  );
@@ -12999,7 +13096,7 @@ var RufousTextEditor = ({
12999
13096
  const providerValue = useMemo4(() => ({ editor }), [editor]);
13000
13097
  const [isFullscreen, setIsFullscreen] = useState35(false);
13001
13098
  const toggleFullscreen = useCallback15(() => setIsFullscreen((prev) => !prev), []);
13002
- const wrapperJsx = /* @__PURE__ */ React117.createElement(
13099
+ const wrapperJsx = /* @__PURE__ */ React118.createElement(
13003
13100
  "div",
13004
13101
  {
13005
13102
  ref: wrapperRef,
@@ -13010,7 +13107,7 @@ var RufousTextEditor = ({
13010
13107
  ...height ? { height: typeof height === "number" ? `${height}px` : height } : {}
13011
13108
  }
13012
13109
  },
13013
- /* @__PURE__ */ React117.createElement(EditorContext.Provider, { value: providerValue }, /* @__PURE__ */ React117.createElement(
13110
+ /* @__PURE__ */ React118.createElement(EditorContext.Provider, { value: providerValue }, /* @__PURE__ */ React118.createElement(
13014
13111
  Toolbar_default,
13015
13112
  {
13016
13113
  editor,
@@ -13025,7 +13122,7 @@ var RufousTextEditor = ({
13025
13122
  isFullscreen,
13026
13123
  onToggleFullscreen: toggleFullscreen
13027
13124
  }
13028
- ), /* @__PURE__ */ React117.createElement(EditorContent, { editor, className: "editor-content-wrapper" }), /* @__PURE__ */ React117.createElement(ImageToolbar_default, { editor }), /* @__PURE__ */ React117.createElement(VideoToolbar_default, { editor }), /* @__PURE__ */ React117.createElement(TableToolbar_default, { editor }), editor && /* @__PURE__ */ React117.createElement(
13125
+ ), /* @__PURE__ */ React118.createElement(EditorContent, { editor, className: "editor-content-wrapper" }), /* @__PURE__ */ React118.createElement(ImageToolbar_default, { editor }), /* @__PURE__ */ React118.createElement(VideoToolbar_default, { editor }), /* @__PURE__ */ React118.createElement(TableToolbar_default, { editor }), editor && /* @__PURE__ */ React118.createElement(
13029
13126
  BubbleMenu,
13030
13127
  {
13031
13128
  editor,
@@ -13043,31 +13140,31 @@ var RufousTextEditor = ({
13043
13140
  }
13044
13141
  }
13045
13142
  },
13046
- /* @__PURE__ */ React117.createElement(
13143
+ /* @__PURE__ */ React118.createElement(
13047
13144
  "button",
13048
13145
  {
13049
13146
  onClick: () => editor?.chain().focus().toggleBold().run(),
13050
13147
  className: editor?.isActive("bold") ? "is-active" : ""
13051
13148
  },
13052
- /* @__PURE__ */ React117.createElement("strong", null, "B")
13149
+ /* @__PURE__ */ React118.createElement("strong", null, "B")
13053
13150
  ),
13054
- /* @__PURE__ */ React117.createElement(
13151
+ /* @__PURE__ */ React118.createElement(
13055
13152
  "button",
13056
13153
  {
13057
13154
  onClick: () => editor?.chain().focus().toggleItalic().run(),
13058
13155
  className: editor?.isActive("italic") ? "is-active" : ""
13059
13156
  },
13060
- /* @__PURE__ */ React117.createElement("em", null, "I")
13157
+ /* @__PURE__ */ React118.createElement("em", null, "I")
13061
13158
  ),
13062
- /* @__PURE__ */ React117.createElement(
13159
+ /* @__PURE__ */ React118.createElement(
13063
13160
  "button",
13064
13161
  {
13065
13162
  onClick: () => editor?.chain().focus().toggleStrike().run(),
13066
13163
  className: editor?.isActive("strike") ? "is-active" : ""
13067
13164
  },
13068
- /* @__PURE__ */ React117.createElement("s", null, "S")
13165
+ /* @__PURE__ */ React118.createElement("s", null, "S")
13069
13166
  ),
13070
- /* @__PURE__ */ React117.createElement(
13167
+ /* @__PURE__ */ React118.createElement(
13071
13168
  "button",
13072
13169
  {
13073
13170
  onClick: () => editor?.chain().focus().toggleCode().run(),
@@ -13075,7 +13172,7 @@ var RufousTextEditor = ({
13075
13172
  },
13076
13173
  "</>"
13077
13174
  ),
13078
- /* @__PURE__ */ React117.createElement(
13175
+ /* @__PURE__ */ React118.createElement(
13079
13176
  "button",
13080
13177
  {
13081
13178
  onClick: setLink,
@@ -13083,7 +13180,7 @@ var RufousTextEditor = ({
13083
13180
  },
13084
13181
  "\u{1F517}"
13085
13182
  )
13086
- ), editor && /* @__PURE__ */ React117.createElement(
13183
+ ), editor && /* @__PURE__ */ React118.createElement(
13087
13184
  FloatingMenu,
13088
13185
  {
13089
13186
  editor,
@@ -13098,7 +13195,7 @@ var RufousTextEditor = ({
13098
13195
  }
13099
13196
  }
13100
13197
  },
13101
- /* @__PURE__ */ React117.createElement(
13198
+ /* @__PURE__ */ React118.createElement(
13102
13199
  "button",
13103
13200
  {
13104
13201
  onClick: () => editor?.chain().focus().toggleHeading({ level: 1 }).run(),
@@ -13106,7 +13203,7 @@ var RufousTextEditor = ({
13106
13203
  },
13107
13204
  "H1"
13108
13205
  ),
13109
- /* @__PURE__ */ React117.createElement(
13206
+ /* @__PURE__ */ React118.createElement(
13110
13207
  "button",
13111
13208
  {
13112
13209
  onClick: () => editor?.chain().focus().toggleHeading({ level: 2 }).run(),
@@ -13114,7 +13211,7 @@ var RufousTextEditor = ({
13114
13211
  },
13115
13212
  "H2"
13116
13213
  ),
13117
- /* @__PURE__ */ React117.createElement(
13214
+ /* @__PURE__ */ React118.createElement(
13118
13215
  "button",
13119
13216
  {
13120
13217
  onClick: () => editor?.chain().focus().toggleBulletList().run(),
@@ -13122,7 +13219,7 @@ var RufousTextEditor = ({
13122
13219
  },
13123
13220
  "\u2022 List"
13124
13221
  ),
13125
- /* @__PURE__ */ React117.createElement(
13222
+ /* @__PURE__ */ React118.createElement(
13126
13223
  "button",
13127
13224
  {
13128
13225
  onClick: () => editor?.chain().focus().toggleOrderedList().run(),
@@ -13130,7 +13227,7 @@ var RufousTextEditor = ({
13130
13227
  },
13131
13228
  "1. List"
13132
13229
  ),
13133
- /* @__PURE__ */ React117.createElement(
13230
+ /* @__PURE__ */ React118.createElement(
13134
13231
  "button",
13135
13232
  {
13136
13233
  onClick: () => editor?.chain().focus().toggleBlockquote().run(),
@@ -13138,8 +13235,8 @@ var RufousTextEditor = ({
13138
13235
  },
13139
13236
  "\u201C Quote"
13140
13237
  )
13141
- ), /* @__PURE__ */ React117.createElement("div", { className: "status-bar" }, /* @__PURE__ */ React117.createElement("div", { className: "status-bar-left" }, onSaveProp && /* @__PURE__ */ React117.createElement("button", { onClick: handleSave, className: "status-btn save-btn" }, "Save"), onExportProp && /* @__PURE__ */ React117.createElement("button", { onClick: handleExport, className: "status-btn export-btn" }, "Export")), /* @__PURE__ */ React117.createElement("div", { className: "status-bar-right" }, saveStatus && /* @__PURE__ */ React117.createElement("span", { className: "save-status" }, saveStatus), editor && /* @__PURE__ */ React117.createElement(React117.Fragment, null, /* @__PURE__ */ React117.createElement("span", { className: "word-count" }, "CHARS: ", editor.storage.characterCount?.characters?.() ?? editor.getText().length), /* @__PURE__ */ React117.createElement("span", { className: "word-count" }, "WORDS: ", editor.storage.characterCount?.words?.() ?? editor.getText().split(/\s+/).filter(Boolean).length)))), linkModalOpen && createPortal8(
13142
- /* @__PURE__ */ React117.createElement("div", { className: "link-modal-overlay", onClick: handleLinkCancel }, /* @__PURE__ */ React117.createElement("div", { className: "link-modal", onClick: (e) => e.stopPropagation() }, /* @__PURE__ */ React117.createElement("div", { className: "link-modal-body" }, /* @__PURE__ */ React117.createElement("div", { className: "link-modal-field" }, /* @__PURE__ */ React117.createElement("label", { className: "link-modal-label" }, "URL"), /* @__PURE__ */ React117.createElement(
13238
+ ), /* @__PURE__ */ React118.createElement("div", { className: "status-bar" }, /* @__PURE__ */ React118.createElement("div", { className: "status-bar-left" }, onSaveProp && /* @__PURE__ */ React118.createElement("button", { onClick: handleSave, className: "status-btn save-btn" }, "Save"), onExportProp && /* @__PURE__ */ React118.createElement("button", { onClick: handleExport, className: "status-btn export-btn" }, "Export")), /* @__PURE__ */ React118.createElement("div", { className: "status-bar-right" }, saveStatus && /* @__PURE__ */ React118.createElement("span", { className: "save-status" }, saveStatus), editor && /* @__PURE__ */ React118.createElement(React118.Fragment, null, /* @__PURE__ */ React118.createElement("span", { className: "word-count" }, "CHARS: ", editor.storage.characterCount?.characters?.() ?? editor.getText().length), /* @__PURE__ */ React118.createElement("span", { className: "word-count" }, "WORDS: ", editor.storage.characterCount?.words?.() ?? editor.getText().split(/\s+/).filter(Boolean).length)))), linkModalOpen && createPortal8(
13239
+ /* @__PURE__ */ React118.createElement("div", { className: "link-modal-overlay", onClick: handleLinkCancel }, /* @__PURE__ */ React118.createElement("div", { className: "link-modal", onClick: (e) => e.stopPropagation() }, /* @__PURE__ */ React118.createElement("div", { className: "link-modal-body" }, /* @__PURE__ */ React118.createElement("div", { className: "link-modal-field" }, /* @__PURE__ */ React118.createElement("label", { className: "link-modal-label" }, "URL"), /* @__PURE__ */ React118.createElement(
13143
13240
  "input",
13144
13241
  {
13145
13242
  type: "url",
@@ -13152,7 +13249,7 @@ var RufousTextEditor = ({
13152
13249
  placeholder: "https://example.com",
13153
13250
  autoFocus: true
13154
13251
  }
13155
- )), /* @__PURE__ */ React117.createElement("div", { className: "link-modal-field" }, /* @__PURE__ */ React117.createElement("label", { className: "link-modal-label" }, "Text"), /* @__PURE__ */ React117.createElement(
13252
+ )), /* @__PURE__ */ React118.createElement("div", { className: "link-modal-field" }, /* @__PURE__ */ React118.createElement("label", { className: "link-modal-label" }, "Text"), /* @__PURE__ */ React118.createElement(
13156
13253
  "input",
13157
13254
  {
13158
13255
  type: "text",
@@ -13164,24 +13261,24 @@ var RufousTextEditor = ({
13164
13261
  },
13165
13262
  placeholder: "Link text"
13166
13263
  }
13167
- )), /* @__PURE__ */ React117.createElement("div", { className: "link-modal-checkboxes" }, /* @__PURE__ */ React117.createElement("label", { className: "link-modal-checkbox" }, /* @__PURE__ */ React117.createElement(
13264
+ )), /* @__PURE__ */ React118.createElement("div", { className: "link-modal-checkboxes" }, /* @__PURE__ */ React118.createElement("label", { className: "link-modal-checkbox" }, /* @__PURE__ */ React118.createElement(
13168
13265
  "input",
13169
13266
  {
13170
13267
  type: "checkbox",
13171
13268
  checked: linkNewTab,
13172
13269
  onChange: (e) => setLinkNewTab(e.target.checked)
13173
13270
  }
13174
- ), "Open in new tab"), /* @__PURE__ */ React117.createElement("label", { className: "link-modal-checkbox" }, /* @__PURE__ */ React117.createElement(
13271
+ ), "Open in new tab"), /* @__PURE__ */ React118.createElement("label", { className: "link-modal-checkbox" }, /* @__PURE__ */ React118.createElement(
13175
13272
  "input",
13176
13273
  {
13177
13274
  type: "checkbox",
13178
13275
  checked: linkNoFollow,
13179
13276
  onChange: (e) => setLinkNoFollow(e.target.checked)
13180
13277
  }
13181
- ), "No follow"))), /* @__PURE__ */ React117.createElement("div", { className: "link-modal-footer" }, /* @__PURE__ */ React117.createElement("button", { className: "link-modal-btn-unlink", onClick: handleLinkRemove }, "Unlink"), /* @__PURE__ */ React117.createElement("button", { className: "link-modal-btn-apply", onClick: handleLinkSubmit }, "Update")))),
13278
+ ), "No follow"))), /* @__PURE__ */ React118.createElement("div", { className: "link-modal-footer" }, /* @__PURE__ */ React118.createElement("button", { className: "link-modal-btn-unlink", onClick: handleLinkRemove }, "Unlink"), /* @__PURE__ */ React118.createElement("button", { className: "link-modal-btn-apply", onClick: handleLinkSubmit }, "Update")))),
13182
13279
  document.body
13183
13280
  )),
13184
- helperText && /* @__PURE__ */ React117.createElement("div", { className: `rf-rte-helper-text ${error ? "rf-rte-helper-error" : ""}` }, helperText)
13281
+ helperText && /* @__PURE__ */ React118.createElement("div", { className: `rf-rte-helper-text ${error ? "rf-rte-helper-error" : ""}` }, helperText)
13185
13282
  );
13186
13283
  return isFullscreen ? createPortal8(wrapperJsx, document.body) : wrapperJsx;
13187
13284
  };
@@ -13192,7 +13289,7 @@ var RufousTextContent = ({ content, className, style, sx }) => {
13192
13289
  transformedContent = transformLegacyTodos(transformedContent);
13193
13290
  } catch {
13194
13291
  }
13195
- return /* @__PURE__ */ React117.createElement(
13292
+ return /* @__PURE__ */ React118.createElement(
13196
13293
  "div",
13197
13294
  {
13198
13295
  className: `rf-rte-content ${sxClass} ${className || ""}`,
@@ -13336,6 +13433,7 @@ export {
13336
13433
  unsubscribeIcon_default as UnsubscribeIcon,
13337
13434
  uploadIcon_default as UploadIcon,
13338
13435
  userAssignIcon_default as UserAssignIcon,
13436
+ UserSelectionField,
13339
13437
  viewIcon_default as ViewIcon,
13340
13438
  workItemIcon_default as WorkItemIcon,
13341
13439
  Zoom,