@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.
@@ -127,6 +127,20 @@ var buildLevelsFromOptions = function buildLevelsFromOptions(options) {
127
127
  });
128
128
  };
129
129
 
130
+ // Suggestion popups (slash, mention, emoji) append to the editor container by
131
+ // default so they stay usable inside a Radix Dialog, whose focus trap excludes
132
+ // document.body. An editor docked at the viewport bottom (e.g. a chat composer)
133
+ // can opt into appending to body via the Editor `appendSuggestionsToBody` prop,
134
+ // so the popup escapes the container's clipping and stacking context and can
135
+ // flip upward into the available space.
136
+ var getSuggestionAppendTo = function getSuggestionAppendTo(editor) {
137
+ return function () {
138
+ var _editor$storage, _container$containerR, _container$containerR2;
139
+ var container = editor === null || editor === void 0 || (_editor$storage = editor.storage) === null || _editor$storage === void 0 ? void 0 : _editor$storage.editorContainer;
140
+ 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;
141
+ };
142
+ };
143
+
130
144
  var CALLOUT_TYPES = [{
131
145
  type: "default",
132
146
  label: t$1("neetoEditor.menu.calloutDefault"),
@@ -3426,5 +3440,5 @@ var Menu = function Menu(props) {
3426
3440
  }));
3427
3441
  };
3428
3442
 
3429
- export { CALLOUT_TYPES as C, DEFAULT_EDITOR_OPTIONS as D, EmojiPickerMenu as E, LINK_VALIDATION_SCHEMA as L, Menu as M, isEmojiSuggestionsMenuActive as a, buildLevelsFromOptions as b, validateAndFormatUrl as c, getEditorStyles as d, MenuDynamicVariables as e, MediaUploader as f, getLinkPopoverPosition as g, LinkAddPopOver as h, isEditorOverlaysActive as i, transformPastedHTML as j, clipboardTextParser as k, setInitialPosition as s, transformEditorContent as t, validateUrl as v };
3430
- //# sourceMappingURL=chunk-C8O6gt0z.js.map
3443
+ export { CALLOUT_TYPES as C, DEFAULT_EDITOR_OPTIONS as D, EmojiPickerMenu as E, LINK_VALIDATION_SCHEMA as L, Menu as M, isEmojiSuggestionsMenuActive as a, buildLevelsFromOptions as b, getLinkPopoverPosition as c, validateAndFormatUrl as d, getEditorStyles as e, MenuDynamicVariables as f, getSuggestionAppendTo as g, MediaUploader as h, isEditorOverlaysActive as i, LinkAddPopOver as j, transformPastedHTML as k, clipboardTextParser as l, setInitialPosition as s, transformEditorContent as t, validateUrl as v };
3444
+ //# sourceMappingURL=chunk-BSdgi_3H.js.map