neuphlo-editor 2.1.1 → 2.2.0

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.
@@ -312,8 +312,6 @@ var ImageBlock = import_extension_image.Image.extend({
312
312
  addOptions() {
313
313
  return {
314
314
  ...this.parent?.(),
315
- uploadImage: void 0,
316
- browseAssets: void 0,
317
315
  inline: false
318
316
  };
319
317
  },
@@ -1361,10 +1359,11 @@ var VideoBlock = import_core5.Node.create({
1361
1359
  };
1362
1360
  },
1363
1361
  addNodeView() {
1362
+ console.log("[VideoBlock] addNodeView called, options:", Object.keys(this.options), "hasNodeView:", !!this.options.nodeView);
1364
1363
  if (this.options.nodeView) {
1365
1364
  return (0, import_react11.ReactNodeViewRenderer)(this.options.nodeView);
1366
1365
  }
1367
- return null;
1366
+ return void 0;
1368
1367
  }
1369
1368
  });
1370
1369
 
@@ -2486,6 +2485,7 @@ function ImageMenu({
2486
2485
  // src/react/menus/ImageBlock/ImageBlockView.tsx
2487
2486
  var import_react26 = require("@tiptap/react");
2488
2487
  var import_react27 = require("react");
2488
+ var import_icons_react9 = require("@tabler/icons-react");
2489
2489
 
2490
2490
  // src/react/menus/ImageBlock/ImageBlockMenu.tsx
2491
2491
  var import_state6 = require("@tiptap/pm/state");
@@ -2564,6 +2564,7 @@ var ImageBlockMenu = ({ editor, getPos, appendTo }) => {
2564
2564
  const { state } = ctx.editor;
2565
2565
  const { selection } = state;
2566
2566
  if (!ctx.editor.isEditable) return { isVisible: false, align: "center", width: 100 };
2567
+ if (!ctx.editor.isFocused) return { isVisible: false, align: "center", width: 100 };
2567
2568
  const isNodeSel = selection instanceof import_state6.NodeSelection;
2568
2569
  const isThisNode = isNodeSel && selection.from === getPos();
2569
2570
  const visible = isThisNode;
@@ -2757,6 +2758,31 @@ var ImageUploader = ({ onUpload, editor }) => {
2757
2758
  if (loading) {
2758
2759
  return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ImageBlockLoading, {});
2759
2760
  }
2761
+ if (browseAssets) {
2762
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2763
+ "div",
2764
+ {
2765
+ className: "nph-image-uploader nph-image-uploader--browse-only",
2766
+ contentEditable: false,
2767
+ onClick: () => browseAssets(onUpload),
2768
+ role: "button",
2769
+ tabIndex: 0,
2770
+ onKeyDown: (e) => {
2771
+ if (e.key === "Enter" || e.key === " ") {
2772
+ e.preventDefault();
2773
+ browseAssets(onUpload);
2774
+ }
2775
+ },
2776
+ children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "nph-image-uploader__browse-cta", children: [
2777
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "nph-image-uploader__browse-icon-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_icons_react8.IconPhoto, { size: 28 }) }),
2778
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "nph-image-uploader__browse-text", children: [
2779
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "nph-image-uploader__browse-title", children: "Choose from assets" }),
2780
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "nph-image-uploader__browse-subtitle", children: "Select an image from your library" })
2781
+ ] })
2782
+ ] })
2783
+ }
2784
+ );
2785
+ }
2760
2786
  return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
2761
2787
  "div",
2762
2788
  {
@@ -2769,34 +2795,19 @@ var ImageUploader = ({ onUpload, editor }) => {
2769
2795
  /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_icons_react8.IconPhoto, { size: 48, className: "nph-image-uploader__icon" }),
2770
2796
  /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "nph-image-uploader__content", children: [
2771
2797
  /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "nph-image-uploader__text", children: draggedInside ? "Drop image here" : "Drag and drop or" }),
2772
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "nph-image-uploader__actions", children: [
2773
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
2774
- "button",
2775
- {
2776
- type: "button",
2777
- disabled: draggedInside,
2778
- onClick: handleUploadClick,
2779
- className: "nph-btn nph-btn-ghost nph-btn-sm nph-image-uploader__button",
2780
- children: [
2781
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_icons_react8.IconUpload, { size: 16 }),
2782
- "Upload an image"
2783
- ]
2784
- }
2785
- ),
2786
- browseAssets && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
2787
- "button",
2788
- {
2789
- type: "button",
2790
- disabled: draggedInside,
2791
- onClick: () => browseAssets(onUpload),
2792
- className: "nph-btn nph-btn-ghost nph-btn-sm nph-image-uploader__button",
2793
- children: [
2794
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_icons_react8.IconPhoto, { size: 16 }),
2795
- "Browse assets"
2796
- ]
2797
- }
2798
- )
2799
- ] })
2798
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "nph-image-uploader__actions", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
2799
+ "button",
2800
+ {
2801
+ type: "button",
2802
+ disabled: draggedInside,
2803
+ onClick: handleUploadClick,
2804
+ className: "nph-btn nph-btn-ghost nph-btn-sm nph-image-uploader__button",
2805
+ children: [
2806
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_icons_react8.IconUpload, { size: 16 }),
2807
+ "Upload an image"
2808
+ ]
2809
+ }
2810
+ ) })
2800
2811
  ] }),
2801
2812
  /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2802
2813
  "input",
@@ -2884,6 +2895,7 @@ var import_jsx_runtime16 = require("react/jsx-runtime");
2884
2895
  var ImageBlockView = (props) => {
2885
2896
  const { editor, getPos, node, updateAttributes } = props;
2886
2897
  const imageWrapperRef = (0, import_react27.useRef)(null);
2898
+ const [imageError, setImageError] = (0, import_react27.useState)(false);
2887
2899
  const { src, width, align, alt, loading } = node.attrs;
2888
2900
  const handleUpload = (0, import_react27.useCallback)(
2889
2901
  (url) => {
@@ -2923,6 +2935,15 @@ var ImageBlockView = (props) => {
2923
2935
  if (loading) {
2924
2936
  return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react26.NodeViewWrapper, { style: getWrapperStyle(), children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { ref: imageWrapperRef, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ImageBlockLoading, {}) }) });
2925
2937
  }
2938
+ if (imageError) {
2939
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react26.NodeViewWrapper, { style: getWrapperStyle(), children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { contentEditable: false, ref: imageWrapperRef, style: getContentStyle(), children: [
2940
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "nph-image-block-error", onClick, children: [
2941
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_icons_react9.IconPhotoOff, { size: 32 }),
2942
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { children: "Image could not be loaded" })
2943
+ ] }),
2944
+ editor.isEditable && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ImageBlockMenu, { editor, getPos, appendTo: imageWrapperRef })
2945
+ ] }) });
2946
+ }
2926
2947
  return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react26.NodeViewWrapper, { style: getWrapperStyle(), children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { contentEditable: false, ref: imageWrapperRef, style: getContentStyle(), children: [
2927
2948
  editor.isEditable ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ImageResizeHandle, { onResize: handleResize, currentWidth: width, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
2928
2949
  "img",
@@ -2930,6 +2951,7 @@ var ImageBlockView = (props) => {
2930
2951
  src,
2931
2952
  alt: alt || "",
2932
2953
  onClick,
2954
+ onError: () => setImageError(true),
2933
2955
  className: "nph-image-block"
2934
2956
  }
2935
2957
  ) }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
@@ -2937,6 +2959,7 @@ var ImageBlockView = (props) => {
2937
2959
  {
2938
2960
  src,
2939
2961
  alt: alt || "",
2962
+ onError: () => setImageError(true),
2940
2963
  className: "nph-image-block"
2941
2964
  }
2942
2965
  ),
@@ -2953,7 +2976,7 @@ var import_react31 = require("react");
2953
2976
  var import_state7 = require("@tiptap/pm/state");
2954
2977
  var import_react28 = require("@tiptap/react");
2955
2978
  var import_react29 = require("react");
2956
- var import_icons_react9 = require("@tabler/icons-react");
2979
+ var import_icons_react10 = require("@tabler/icons-react");
2957
2980
  var import_jsx_runtime17 = require("react/jsx-runtime");
2958
2981
  var VideoBlockMenu = ({ editor, getPos }) => {
2959
2982
  const menuRef = (0, import_react29.useRef)(null);
@@ -3017,7 +3040,7 @@ var VideoBlockMenu = ({ editor, getPos }) => {
3017
3040
  title: "Align left",
3018
3041
  onMouseDown: (e) => e.preventDefault(),
3019
3042
  onClick: onAlignLeft,
3020
- children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_icons_react9.IconAlignLeft, { size: 16 })
3043
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_icons_react10.IconAlignLeft, { size: 16 })
3021
3044
  }
3022
3045
  ),
3023
3046
  /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
@@ -3028,7 +3051,7 @@ var VideoBlockMenu = ({ editor, getPos }) => {
3028
3051
  title: "Align center",
3029
3052
  onMouseDown: (e) => e.preventDefault(),
3030
3053
  onClick: onAlignCenter,
3031
- children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_icons_react9.IconAlignCenter, { size: 16 })
3054
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_icons_react10.IconAlignCenter, { size: 16 })
3032
3055
  }
3033
3056
  ),
3034
3057
  /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
@@ -3039,7 +3062,7 @@ var VideoBlockMenu = ({ editor, getPos }) => {
3039
3062
  title: "Align right",
3040
3063
  onMouseDown: (e) => e.preventDefault(),
3041
3064
  onClick: onAlignRight,
3042
- children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_icons_react9.IconAlignRight, { size: 16 })
3065
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_icons_react10.IconAlignRight, { size: 16 })
3043
3066
  }
3044
3067
  ),
3045
3068
  /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
@@ -3065,7 +3088,7 @@ var VideoBlockMenu = ({ editor, getPos }) => {
3065
3088
  title: "Remove video",
3066
3089
  onMouseDown: (e) => e.preventDefault(),
3067
3090
  onClick: onRemove,
3068
- children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_icons_react9.IconTrash, { size: 16 })
3091
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_icons_react10.IconTrash, { size: 16 })
3069
3092
  }
3070
3093
  )
3071
3094
  ]
@@ -3074,19 +3097,26 @@ var VideoBlockMenu = ({ editor, getPos }) => {
3074
3097
  };
3075
3098
 
3076
3099
  // src/react/menus/VideoBlock/VideoBlockView.tsx
3077
- var import_icons_react10 = require("@tabler/icons-react");
3100
+ var import_icons_react11 = require("@tabler/icons-react");
3078
3101
  var import_jsx_runtime18 = require("react/jsx-runtime");
3079
3102
  function toEmbedUrl(url) {
3103
+ if (url.includes("/embed/") || url.includes("player.vimeo.com") || url.includes("loom.com/embed")) {
3104
+ return url;
3105
+ }
3080
3106
  const ytMatch = url.match(
3081
- /(?:youtube\.com\/watch\?v=|youtu\.be\/)([\w-]+)/
3107
+ /(?:youtube\.com\/(?:watch\?v=|shorts\/)|youtu\.be\/)([\w-]+)/
3082
3108
  );
3083
3109
  if (ytMatch) {
3084
3110
  return `https://www.youtube.com/embed/${ytMatch[1]}`;
3085
3111
  }
3086
- const vimeoMatch = url.match(/vimeo\.com\/(\d+)/);
3112
+ const vimeoMatch = url.match(/vimeo\.com\/(?:channels\/[\w-]+\/)?(\d+)/);
3087
3113
  if (vimeoMatch) {
3088
3114
  return `https://player.vimeo.com/video/${vimeoMatch[1]}`;
3089
3115
  }
3116
+ const loomMatch = url.match(/loom\.com\/share\/([\w-]+)/);
3117
+ if (loomMatch) {
3118
+ return `https://www.loom.com/embed/${loomMatch[1]}`;
3119
+ }
3090
3120
  return url;
3091
3121
  }
3092
3122
  var VideoBlockView = (props) => {
@@ -3094,6 +3124,7 @@ var VideoBlockView = (props) => {
3094
3124
  const wrapperRef = (0, import_react31.useRef)(null);
3095
3125
  const { src, width, align } = node.attrs;
3096
3126
  const [inputUrl, setInputUrl] = (0, import_react31.useState)("");
3127
+ const [videoError, setVideoError] = (0, import_react31.useState)(false);
3097
3128
  const isSelected = (0, import_react30.useEditorState)({
3098
3129
  editor,
3099
3130
  selector: (ctx) => {
@@ -3121,8 +3152,8 @@ var VideoBlockView = (props) => {
3121
3152
  }, [getPos, editor.commands]);
3122
3153
  const getWrapperStyle = () => {
3123
3154
  const baseStyle = {
3124
- width: "fit-content",
3125
- maxWidth: width || "100%"
3155
+ width: width || "100%",
3156
+ maxWidth: "100%"
3126
3157
  };
3127
3158
  if (align === "left") {
3128
3159
  return { ...baseStyle, marginLeft: 0, marginRight: "auto" };
@@ -3135,7 +3166,7 @@ var VideoBlockView = (props) => {
3135
3166
  if (!src || src === "") {
3136
3167
  if (!editor.isEditable) return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react30.NodeViewWrapper, {});
3137
3168
  return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react30.NodeViewWrapper, { style: getWrapperStyle(), children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { ref: wrapperRef, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "nph-video-input", children: [
3138
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "nph-video-input__icon", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_icons_react10.IconVideo, { size: 24 }) }),
3169
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "nph-video-input__icon", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_icons_react11.IconVideo, { size: 24 }) }),
3139
3170
  /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "nph-video-input__content", children: [
3140
3171
  /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3141
3172
  "input",
@@ -3161,6 +3192,16 @@ var VideoBlockView = (props) => {
3161
3192
  ] })
3162
3193
  ] }) }) });
3163
3194
  }
3195
+ if (videoError) {
3196
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react30.NodeViewWrapper, { style: getWrapperStyle(), children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { contentEditable: false, ref: wrapperRef, style: { position: "relative" }, children: [
3197
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "nph-video-block-error", onClick, children: [
3198
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_icons_react11.IconVideoOff, { size: 32 }),
3199
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: "Video could not be loaded" }),
3200
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "nph-video-block-error__url", children: src })
3201
+ ] }),
3202
+ editor.isEditable && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(VideoBlockMenu, { editor, getPos })
3203
+ ] }) });
3204
+ }
3164
3205
  return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react30.NodeViewWrapper, { style: getWrapperStyle(), children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
3165
3206
  "div",
3166
3207
  {
@@ -3175,7 +3216,8 @@ var VideoBlockView = (props) => {
3175
3216
  src,
3176
3217
  className: "nph-video-block__iframe",
3177
3218
  allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",
3178
- allowFullScreen: true
3219
+ allowFullScreen: true,
3220
+ onError: () => setVideoError(true)
3179
3221
  }
3180
3222
  ),
3181
3223
  !isSelected && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
@@ -3193,7 +3235,7 @@ var VideoBlockView = (props) => {
3193
3235
  };
3194
3236
 
3195
3237
  // src/react/menus/DragHandle/BlockActionMenu.tsx
3196
- var import_icons_react11 = require("@tabler/icons-react");
3238
+ var import_icons_react12 = require("@tabler/icons-react");
3197
3239
  var import_react32 = require("react");
3198
3240
  var import_jsx_runtime19 = require("react/jsx-runtime");
3199
3241
  function BlockActionMenu({ editor, onClose }) {
@@ -3296,7 +3338,7 @@ function BlockActionMenu({ editor, onClose }) {
3296
3338
  onClick: handleDelete,
3297
3339
  onMouseDown: (e) => e.preventDefault(),
3298
3340
  children: [
3299
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_icons_react11.IconTrash, { size: 16 }),
3341
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_icons_react12.IconTrash, { size: 16 }),
3300
3342
  /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: "Delete" })
3301
3343
  ]
3302
3344
  }
@@ -3309,7 +3351,7 @@ function BlockActionMenu({ editor, onClose }) {
3309
3351
  onClick: handleDuplicate,
3310
3352
  onMouseDown: (e) => e.preventDefault(),
3311
3353
  children: [
3312
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_icons_react11.IconCopy, { size: 16 }),
3354
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_icons_react12.IconCopy, { size: 16 }),
3313
3355
  /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: "Duplicate" })
3314
3356
  ]
3315
3357
  }
@@ -3322,7 +3364,7 @@ function BlockActionMenu({ editor, onClose }) {
3322
3364
  onClick: handleCopyToClipboard,
3323
3365
  onMouseDown: (e) => e.preventDefault(),
3324
3366
  children: [
3325
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_icons_react11.IconClipboard, { size: 16 }),
3367
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_icons_react12.IconClipboard, { size: 16 }),
3326
3368
  /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: "Copy to clipboard" })
3327
3369
  ]
3328
3370
  }
@@ -3335,7 +3377,7 @@ function BlockActionMenu({ editor, onClose }) {
3335
3377
  onClick: handleMoveUp,
3336
3378
  onMouseDown: (e) => e.preventDefault(),
3337
3379
  children: [
3338
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_icons_react11.IconArrowUp, { size: 16 }),
3380
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_icons_react12.IconArrowUp, { size: 16 }),
3339
3381
  /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: "Move up" })
3340
3382
  ]
3341
3383
  }
@@ -3348,7 +3390,7 @@ function BlockActionMenu({ editor, onClose }) {
3348
3390
  onClick: handleMoveDown,
3349
3391
  onMouseDown: (e) => e.preventDefault(),
3350
3392
  children: [
3351
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_icons_react11.IconArrowDown, { size: 16 }),
3393
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_icons_react12.IconArrowDown, { size: 16 }),
3352
3394
  /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: "Move down" })
3353
3395
  ]
3354
3396
  }
@@ -3358,7 +3400,7 @@ function BlockActionMenu({ editor, onClose }) {
3358
3400
 
3359
3401
  // src/react/menus/TableMenu.tsx
3360
3402
  var import_react33 = require("@tiptap/react");
3361
- var import_icons_react12 = require("@tabler/icons-react");
3403
+ var import_icons_react13 = require("@tabler/icons-react");
3362
3404
  var import_react34 = require("react");
3363
3405
  var import_react_dom2 = require("react-dom");
3364
3406
  var import_jsx_runtime20 = require("react/jsx-runtime");
@@ -3643,7 +3685,7 @@ function TableMenu({ className: _className }) {
3643
3685
  const columnDropdownItems = [
3644
3686
  {
3645
3687
  label: "Toggle header column",
3646
- icon: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_icons_react12.IconTableColumn, { size: 16 }),
3688
+ icon: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_icons_react13.IconTableColumn, { size: 16 }),
3647
3689
  action: () => {
3648
3690
  editor.chain().focus().toggleHeaderColumn().run();
3649
3691
  setDropdown(null);
@@ -3651,7 +3693,7 @@ function TableMenu({ className: _className }) {
3651
3693
  },
3652
3694
  {
3653
3695
  label: "Insert column before",
3654
- icon: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_icons_react12.IconColumnInsertLeft, { size: 16 }),
3696
+ icon: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_icons_react13.IconColumnInsertLeft, { size: 16 }),
3655
3697
  action: () => {
3656
3698
  editor.chain().focus().addColumnBefore().run();
3657
3699
  setDropdown(null);
@@ -3660,7 +3702,7 @@ function TableMenu({ className: _className }) {
3660
3702
  },
3661
3703
  {
3662
3704
  label: "Insert column after",
3663
- icon: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_icons_react12.IconColumnInsertRight, { size: 16 }),
3705
+ icon: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_icons_react13.IconColumnInsertRight, { size: 16 }),
3664
3706
  action: () => {
3665
3707
  editor.chain().focus().addColumnAfter().run();
3666
3708
  setDropdown(null);
@@ -3668,7 +3710,7 @@ function TableMenu({ className: _className }) {
3668
3710
  },
3669
3711
  {
3670
3712
  label: "Merge cells",
3671
- icon: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_icons_react12.IconArrowMerge, { size: 16 }),
3713
+ icon: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_icons_react13.IconArrowMerge, { size: 16 }),
3672
3714
  action: () => {
3673
3715
  editor.chain().focus().mergeCells().run();
3674
3716
  setDropdown(null);
@@ -3677,7 +3719,7 @@ function TableMenu({ className: _className }) {
3677
3719
  },
3678
3720
  {
3679
3721
  label: "Split cell",
3680
- icon: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_icons_react12.IconArrowsSplit, { size: 16 }),
3722
+ icon: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_icons_react13.IconArrowsSplit, { size: 16 }),
3681
3723
  action: () => {
3682
3724
  editor.chain().focus().splitCell().run();
3683
3725
  setDropdown(null);
@@ -3685,7 +3727,7 @@ function TableMenu({ className: _className }) {
3685
3727
  },
3686
3728
  {
3687
3729
  label: "Delete column",
3688
- icon: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_icons_react12.IconColumnRemove, { size: 16 }),
3730
+ icon: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_icons_react13.IconColumnRemove, { size: 16 }),
3689
3731
  action: () => {
3690
3732
  editor.chain().focus().deleteColumn().run();
3691
3733
  setDropdown(null);
@@ -3697,7 +3739,7 @@ function TableMenu({ className: _className }) {
3697
3739
  const rowDropdownItems = [
3698
3740
  {
3699
3741
  label: "Toggle header row",
3700
- icon: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_icons_react12.IconTableRow, { size: 16 }),
3742
+ icon: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_icons_react13.IconTableRow, { size: 16 }),
3701
3743
  action: () => {
3702
3744
  editor.chain().focus().toggleHeaderRow().run();
3703
3745
  setDropdown(null);
@@ -3705,7 +3747,7 @@ function TableMenu({ className: _className }) {
3705
3747
  },
3706
3748
  {
3707
3749
  label: "Insert row above",
3708
- icon: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_icons_react12.IconRowInsertTop, { size: 16 }),
3750
+ icon: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_icons_react13.IconRowInsertTop, { size: 16 }),
3709
3751
  action: () => {
3710
3752
  editor.chain().focus().addRowBefore().run();
3711
3753
  setDropdown(null);
@@ -3714,7 +3756,7 @@ function TableMenu({ className: _className }) {
3714
3756
  },
3715
3757
  {
3716
3758
  label: "Insert row below",
3717
- icon: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_icons_react12.IconRowInsertBottom, { size: 16 }),
3759
+ icon: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_icons_react13.IconRowInsertBottom, { size: 16 }),
3718
3760
  action: () => {
3719
3761
  editor.chain().focus().addRowAfter().run();
3720
3762
  setDropdown(null);
@@ -3722,7 +3764,7 @@ function TableMenu({ className: _className }) {
3722
3764
  },
3723
3765
  {
3724
3766
  label: "Merge cells",
3725
- icon: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_icons_react12.IconArrowMerge, { size: 16 }),
3767
+ icon: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_icons_react13.IconArrowMerge, { size: 16 }),
3726
3768
  action: () => {
3727
3769
  editor.chain().focus().mergeCells().run();
3728
3770
  setDropdown(null);
@@ -3731,7 +3773,7 @@ function TableMenu({ className: _className }) {
3731
3773
  },
3732
3774
  {
3733
3775
  label: "Split cell",
3734
- icon: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_icons_react12.IconArrowsSplit, { size: 16 }),
3776
+ icon: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_icons_react13.IconArrowsSplit, { size: 16 }),
3735
3777
  action: () => {
3736
3778
  editor.chain().focus().splitCell().run();
3737
3779
  setDropdown(null);
@@ -3739,7 +3781,7 @@ function TableMenu({ className: _className }) {
3739
3781
  },
3740
3782
  {
3741
3783
  label: "Delete row",
3742
- icon: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_icons_react12.IconRowRemove, { size: 16 }),
3784
+ icon: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_icons_react13.IconRowRemove, { size: 16 }),
3743
3785
  action: () => {
3744
3786
  editor.chain().focus().deleteRow().run();
3745
3787
  setDropdown(null);
@@ -3767,7 +3809,7 @@ function TableMenu({ className: _className }) {
3767
3809
  onMouseDown: (e) => handleGripDragStart("column", i, e),
3768
3810
  onClick: (e) => handleColGripClick(i, e),
3769
3811
  "aria-label": `Column ${i + 1} options`,
3770
- children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_icons_react12.IconGripHorizontal, { size: 14 })
3812
+ children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_icons_react13.IconGripHorizontal, { size: 14 })
3771
3813
  },
3772
3814
  `col-${i}`
3773
3815
  )),
@@ -3787,7 +3829,7 @@ function TableMenu({ className: _className }) {
3787
3829
  onMouseDown: (e) => handleGripDragStart("row", i, e),
3788
3830
  onClick: (e) => handleRowGripClick(i, e),
3789
3831
  "aria-label": `Row ${i + 1} options`,
3790
- children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_icons_react12.IconGripVertical, { size: 14 })
3832
+ children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_icons_react13.IconGripVertical, { size: 14 })
3791
3833
  },
3792
3834
  `row-${i}`
3793
3835
  )),
@@ -3809,7 +3851,7 @@ function TableMenu({ className: _className }) {
3809
3851
  },
3810
3852
  "aria-label": "Delete table",
3811
3853
  children: [
3812
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_icons_react12.IconTableOff, { size: 14 }),
3854
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_icons_react13.IconTableOff, { size: 14 }),
3813
3855
  /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { style: { fontSize: 12 }, children: "Delete table" })
3814
3856
  ]
3815
3857
  }