@bigbinary/neeto-editor 1.47.127 → 1.47.130

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -18,7 +18,7 @@ var ramda = require('ramda');
18
18
  var ReactDOM = require('react-dom/server');
19
19
  var common = require('../chunk-BKvkHB8E.cjs.js');
20
20
  var jsxRuntime = require('react/jsx-runtime');
21
- var v2_Menu = require('../chunk-DkzRRlJ6.cjs.js');
21
+ var v2_Menu = require('../chunk-DRJy8PFC.cjs.js');
22
22
  var Megaphone = require('@bigbinary/neeto-icons/misc/Megaphone');
23
23
  var index = require('../chunk-NqciyXN3.cjs.js');
24
24
  var lucideReact = require('lucide-react');
@@ -814,16 +814,19 @@ var EditorContainer = useEditorStore.Extension.create({
814
814
  name: "editorContainer",
815
815
  addOptions: function addOptions() {
816
816
  return {
817
- containerRef: null
817
+ containerRef: null,
818
+ appendSuggestionsToBody: false
818
819
  };
819
820
  },
820
821
  addStorage: function addStorage() {
821
822
  return {
822
- containerRef: null
823
+ containerRef: null,
824
+ appendSuggestionsToBody: false
823
825
  };
824
826
  },
825
827
  onBeforeCreate: function onBeforeCreate() {
826
828
  this.storage.containerRef = this.options.containerRef;
829
+ this.storage.appendSuggestionsToBody = this.options.appendSuggestionsToBody;
827
830
  }
828
831
  });
829
832
 
@@ -857,10 +860,7 @@ var EmojiPicker = useEditorStore.Node3.create({
857
860
  popup = tippy__default.default("body", {
858
861
  theme: "light",
859
862
  getReferenceClientRect: props.clientRect,
860
- appendTo: function appendTo() {
861
- var _props$editor$storage, _props$editor;
862
- return (_props$editor$storage = (_props$editor = props.editor) === null || _props$editor === void 0 || (_props$editor = _props$editor.storage) === null || _props$editor === void 0 || (_props$editor = _props$editor.editorContainer) === null || _props$editor === void 0 || (_props$editor = _props$editor.containerRef) === null || _props$editor === void 0 ? void 0 : _props$editor.current) !== null && _props$editor$storage !== void 0 ? _props$editor$storage : document.body;
863
- },
863
+ appendTo: v2_Menu.getSuggestionAppendTo(props.editor),
864
864
  content: reactRenderer.element,
865
865
  showOnCreate: true,
866
866
  interactive: true,
@@ -1223,10 +1223,7 @@ var suggestionConfig = {
1223
1223
  popup = tippy__default.default("body", {
1224
1224
  theme: "light",
1225
1225
  getReferenceClientRect: props.clientRect,
1226
- appendTo: function appendTo() {
1227
- var _props$editor$storage, _props$editor;
1228
- return (_props$editor$storage = (_props$editor = props.editor) === null || _props$editor === void 0 || (_props$editor = _props$editor.storage) === null || _props$editor === void 0 || (_props$editor = _props$editor.editorContainer) === null || _props$editor === void 0 || (_props$editor = _props$editor.containerRef) === null || _props$editor === void 0 ? void 0 : _props$editor.current) !== null && _props$editor$storage !== void 0 ? _props$editor$storage : document.body;
1229
- },
1226
+ appendTo: v2_Menu.getSuggestionAppendTo(props.editor),
1230
1227
  content: reactRenderer.element,
1231
1228
  showOnCreate: true,
1232
1229
  interactive: true,
@@ -2206,10 +2203,7 @@ var suggestion$1 = {
2206
2203
  popup = tippy__default.default("body", {
2207
2204
  theme: "light neeto-editor-mentions-tooltip",
2208
2205
  getReferenceClientRect: props.clientRect,
2209
- appendTo: function appendTo() {
2210
- var _props$editor$storage, _props$editor;
2211
- return (_props$editor$storage = (_props$editor = props.editor) === null || _props$editor === void 0 || (_props$editor = _props$editor.storage) === null || _props$editor === void 0 || (_props$editor = _props$editor.editorContainer) === null || _props$editor === void 0 || (_props$editor = _props$editor.containerRef) === null || _props$editor === void 0 ? void 0 : _props$editor.current) !== null && _props$editor$storage !== void 0 ? _props$editor$storage : document.body;
2212
- },
2206
+ appendTo: v2_Menu.getSuggestionAppendTo(props.editor),
2213
2207
  content: reactRenderer.element,
2214
2208
  showOnCreate: true,
2215
2209
  interactive: true,
@@ -3060,10 +3054,7 @@ var SlashCommands = {
3060
3054
  });
3061
3055
  popup = tippy__default.default("body", {
3062
3056
  getReferenceClientRect: props.clientRect,
3063
- appendTo: function appendTo() {
3064
- var _props$editor$storage, _props$editor;
3065
- return (_props$editor$storage = (_props$editor = props.editor) === null || _props$editor === void 0 || (_props$editor = _props$editor.storage) === null || _props$editor === void 0 || (_props$editor = _props$editor.editorContainer) === null || _props$editor === void 0 || (_props$editor = _props$editor.containerRef) === null || _props$editor === void 0 ? void 0 : _props$editor.current) !== null && _props$editor$storage !== void 0 ? _props$editor$storage : document.body;
3066
- },
3057
+ appendTo: v2_Menu.getSuggestionAppendTo(props.editor),
3067
3058
  content: reactRenderer.element,
3068
3059
  showOnCreate: true,
3069
3060
  interactive: true,
@@ -3138,10 +3129,7 @@ var suggestion = {
3138
3129
  popup = tippy__default.default("body", {
3139
3130
  theme: "light neeto-editor-mentions-tooltip",
3140
3131
  getReferenceClientRect: props.clientRect,
3141
- appendTo: function appendTo() {
3142
- var _props$editor$storage, _props$editor;
3143
- return (_props$editor$storage = (_props$editor = props.editor) === null || _props$editor === void 0 || (_props$editor = _props$editor.storage) === null || _props$editor === void 0 || (_props$editor = _props$editor.editorContainer) === null || _props$editor === void 0 || (_props$editor = _props$editor.containerRef) === null || _props$editor === void 0 ? void 0 : _props$editor.current) !== null && _props$editor$storage !== void 0 ? _props$editor$storage : document.body;
3144
- },
3132
+ appendTo: v2_Menu.getSuggestionAppendTo(props.editor),
3145
3133
  content: reactRenderer.element,
3146
3134
  showOnCreate: true,
3147
3135
  interactive: true,
@@ -4029,9 +4017,11 @@ var useCustomExtensions = function useCustomExtensions(_ref) {
4029
4017
  enableReactNodeViewOptimization = _ref.enableReactNodeViewOptimization,
4030
4018
  collaborationProvider = _ref.collaborationProvider,
4031
4019
  setIsNeetoKbArticleActive = _ref.setIsNeetoKbArticleActive,
4032
- containerRef = _ref.containerRef;
4020
+ containerRef = _ref.containerRef,
4021
+ appendSuggestionsToBody = _ref.appendSuggestionsToBody;
4033
4022
  var customExtensions = [EditorContainer.configure({
4034
- containerRef: containerRef
4023
+ containerRef: containerRef,
4024
+ appendSuggestionsToBody: appendSuggestionsToBody
4035
4025
  }), fuzzySearch.CharacterCount, fuzzySearch.index_default$5, CodeBlock.configure({
4036
4026
  enableReactNodeViewOptimization: enableReactNodeViewOptimization
4037
4027
  }), CustomCommands, fuzzySearch.index_default$4, FigCaption, HighlightInternal, SelectionDecoration, fuzzySearch.Focus.configure({
@@ -5238,7 +5228,7 @@ var LinkPopOver = function LinkPopOver(_ref) {
5238
5228
  });
5239
5229
  };
5240
5230
 
5241
- var _excluded = ["addonCommands", "addons", "attachments", "attachmentsConfig", "autoFocus", "className", "contentClassName", "contentWrapperClassName", "errorWrapperClassName", "contentAttributes", "menuClassName", "attachmentsClassName", "isMenuIndependent", "defaults", "editorSecrets", "error", "extensions", "hideSlashCommands", "initialValue", "isCharacterCountActive", "keyboardShortcuts", "label", "mentions", "menuType", "placeholder", "required", "rows", "tooltips", "variables", "disableTrimOnBlur", "onChange", "onFocus", "onBlur", "onSubmit", "onChangeAttachments", "children", "openImageInNewTab", "openLinkInNewTab", "showAssetLibrary", "collaborationProvider", "enableReactNodeViewOptimization", "size", "otherAttachmentProps"];
5231
+ var _excluded = ["addonCommands", "addons", "attachments", "attachmentsConfig", "autoFocus", "className", "contentClassName", "contentWrapperClassName", "errorWrapperClassName", "contentAttributes", "menuClassName", "attachmentsClassName", "isMenuIndependent", "defaults", "editorSecrets", "error", "extensions", "hideSlashCommands", "appendSuggestionsToBody", "initialValue", "isCharacterCountActive", "keyboardShortcuts", "label", "mentions", "menuType", "placeholder", "required", "rows", "tooltips", "variables", "disableTrimOnBlur", "onChange", "onFocus", "onBlur", "onSubmit", "onChangeAttachments", "children", "openImageInNewTab", "openLinkInNewTab", "showAssetLibrary", "collaborationProvider", "enableReactNodeViewOptimization", "size", "otherAttachmentProps"];
5242
5232
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
5243
5233
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), true).forEach(function (r) { _defineProperty__default.default(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
5244
5234
  var Editor$1 = function Editor(_ref, ref) {
@@ -5273,6 +5263,8 @@ var Editor$1 = function Editor(_ref, ref) {
5273
5263
  extensions = _ref$extensions === void 0 ? [] : _ref$extensions,
5274
5264
  _ref$hideSlashCommand = _ref.hideSlashCommands,
5275
5265
  hideSlashCommands = _ref$hideSlashCommand === void 0 ? true : _ref$hideSlashCommand,
5266
+ _ref$appendSuggestion = _ref.appendSuggestionsToBody,
5267
+ appendSuggestionsToBody = _ref$appendSuggestion === void 0 ? false : _ref$appendSuggestion,
5276
5268
  _ref$initialValue = _ref.initialValue,
5277
5269
  initialValue = _ref$initialValue === void 0 ? "" : _ref$initialValue,
5278
5270
  _ref$isCharacterCount = _ref.isCharacterCountActive,
@@ -5393,7 +5385,8 @@ var Editor$1 = function Editor(_ref, ref) {
5393
5385
  enableReactNodeViewOptimization: enableReactNodeViewOptimization,
5394
5386
  collaborationProvider: collaborationProvider,
5395
5387
  setIsNeetoKbArticleActive: setNeetoKbArticleState,
5396
- containerRef: wrapperRef
5388
+ containerRef: wrapperRef,
5389
+ appendSuggestionsToBody: appendSuggestionsToBody
5397
5390
  });
5398
5391
  fuzzySearch.useEditorWarnings({
5399
5392
  initialValue: initialValue