@bigbinary/neeto-editor 1.47.126 → 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.
- package/dist/Editor.js +32 -29
- package/dist/Editor.js.map +1 -1
- package/dist/{chunk-COgPAsPy.js → chunk-BSdgi_3H.js} +20 -5
- package/dist/chunk-BSdgi_3H.js.map +1 -0
- package/dist/cjs/Editor.cjs.js +32 -29
- package/dist/cjs/Editor.cjs.js.map +1 -1
- package/dist/cjs/{chunk-DoYRXWHQ.cjs.js → chunk-DRJy8PFC.cjs.js} +20 -4
- package/dist/cjs/chunk-DRJy8PFC.cjs.js.map +1 -0
- package/dist/cjs/v2/Editor.cjs.js +33 -30
- package/dist/cjs/v2/Editor.cjs.js.map +1 -1
- package/dist/cjs/v2/FormikEditor.cjs.js +1 -1
- package/dist/cjs/v2/Menu.cjs.js +1 -1
- package/dist/cjs/v2/index.cjs.js +1 -1
- package/dist/editor-stats.html +19 -1
- package/dist/v2/Editor.js +33 -30
- package/dist/v2/Editor.js.map +1 -1
- package/dist/v2/FormikEditor.js +1 -1
- package/dist/v2/Menu.js +1 -1
- package/dist/v2/index.js +1 -1
- package/package.json +1 -1
- package/types.d.ts +1 -0
- package/dist/chunk-COgPAsPy.js.map +0 -1
- package/dist/cjs/chunk-DoYRXWHQ.cjs.js.map +0 -1
|
@@ -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"),
|
|
@@ -1414,7 +1428,7 @@ var VideoEmbedForm = function VideoEmbedForm(_ref) {
|
|
|
1414
1428
|
var onSubmit = function onSubmit(_ref2) {
|
|
1415
1429
|
var url = _ref2.url;
|
|
1416
1430
|
var embedUrl = validateUrl(url);
|
|
1417
|
-
if (embedUrl) onEmbedVideo(embedUrl);else onAttachVideo(url);
|
|
1431
|
+
if (embedUrl) onEmbedVideo(url, embedUrl);else onAttachVideo(url);
|
|
1418
1432
|
onClose();
|
|
1419
1433
|
};
|
|
1420
1434
|
return /*#__PURE__*/jsx("div", {
|
|
@@ -1553,10 +1567,11 @@ var MediaUploader = function MediaUploader(_ref) {
|
|
|
1553
1567
|
url: url};
|
|
1554
1568
|
insertMediaToEditor(file);
|
|
1555
1569
|
};
|
|
1556
|
-
var onEmbedVideo = function onEmbedVideo(
|
|
1570
|
+
var onEmbedVideo = function onEmbedVideo(originalUrl, embedUrl) {
|
|
1557
1571
|
if (!editor) return;
|
|
1558
1572
|
editor.chain().focus().setExternalVideo({
|
|
1559
|
-
src:
|
|
1573
|
+
src: embedUrl,
|
|
1574
|
+
originalUrl: originalUrl
|
|
1560
1575
|
}).run();
|
|
1561
1576
|
};
|
|
1562
1577
|
var allowDismiss = not(isUploading);
|
|
@@ -3425,5 +3440,5 @@ var Menu = function Menu(props) {
|
|
|
3425
3440
|
}));
|
|
3426
3441
|
};
|
|
3427
3442
|
|
|
3428
|
-
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,
|
|
3429
|
-
//# sourceMappingURL=chunk-
|
|
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
|