@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.
@@ -168,6 +168,20 @@ var buildLevelsFromOptions = function buildLevelsFromOptions(options) {
168
168
  });
169
169
  };
170
170
 
171
+ // Suggestion popups (slash, mention, emoji) append to the editor container by
172
+ // default so they stay usable inside a Radix Dialog, whose focus trap excludes
173
+ // document.body. An editor docked at the viewport bottom (e.g. a chat composer)
174
+ // can opt into appending to body via the Editor `appendSuggestionsToBody` prop,
175
+ // so the popup escapes the container's clipping and stacking context and can
176
+ // flip upward into the available space.
177
+ var getSuggestionAppendTo = function getSuggestionAppendTo(editor) {
178
+ return function () {
179
+ var _editor$storage, _container$containerR, _container$containerR2;
180
+ var container = editor === null || editor === void 0 || (_editor$storage = editor.storage) === null || _editor$storage === void 0 ? void 0 : _editor$storage.editorContainer;
181
+ return container !== null && container !== void 0 && container.appendSuggestionsToBody ? document.body : (_container$containerR = container === null || container === void 0 || (_container$containerR2 = container.containerRef) === null || _container$containerR2 === void 0 ? void 0 : _container$containerR2.current) !== null && _container$containerR !== void 0 ? _container$containerR : document.body;
182
+ };
183
+ };
184
+
171
185
  var CALLOUT_TYPES = [{
172
186
  type: "default",
173
187
  label: i18n.t("neetoEditor.menu.calloutDefault"),
@@ -3479,6 +3493,7 @@ exports.buildLevelsFromOptions = buildLevelsFromOptions;
3479
3493
  exports.clipboardTextParser = clipboardTextParser;
3480
3494
  exports.getEditorStyles = getEditorStyles;
3481
3495
  exports.getLinkPopoverPosition = getLinkPopoverPosition;
3496
+ exports.getSuggestionAppendTo = getSuggestionAppendTo;
3482
3497
  exports.isEditorOverlaysActive = isEditorOverlaysActive;
3483
3498
  exports.isEmojiSuggestionsMenuActive = isEmojiSuggestionsMenuActive;
3484
3499
  exports.setInitialPosition = setInitialPosition;
@@ -3486,4 +3501,4 @@ exports.transformEditorContent = transformEditorContent;
3486
3501
  exports.transformPastedHTML = transformPastedHTML;
3487
3502
  exports.validateAndFormatUrl = validateAndFormatUrl;
3488
3503
  exports.validateUrl = validateUrl;
3489
- //# sourceMappingURL=chunk-DkzRRlJ6.cjs.js.map
3504
+ //# sourceMappingURL=chunk-DRJy8PFC.cjs.js.map