@atlaskit/editor-core 185.2.2 → 185.2.7
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/CHANGELOG.md +13 -0
- package/dist/cjs/plugins/block-type/index.js +12 -9
- package/dist/cjs/plugins/card/nodeviews/embedCard.js +2 -2
- package/dist/cjs/plugins/card/nodeviews/genericCard.js +2 -1
- package/dist/cjs/plugins/card/toolbar.js +1 -1
- package/dist/cjs/plugins/card/ui/EditLinkToolbar.js +15 -12
- package/dist/cjs/plugins/floating-toolbar/index.js +7 -1
- package/dist/cjs/plugins/media/nodeviews/mediaNodeUpdater.js +1 -1
- package/dist/cjs/plugins/media/toolbar/index.js +1 -1
- package/dist/cjs/plugins/media/toolbar/linking.js +3 -3
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/plugins/block-type/index.js +12 -9
- package/dist/es2019/plugins/card/nodeviews/embedCard.js +2 -2
- package/dist/es2019/plugins/card/nodeviews/genericCard.js +2 -1
- package/dist/es2019/plugins/card/toolbar.js +1 -1
- package/dist/es2019/plugins/card/ui/EditLinkToolbar.js +7 -4
- package/dist/es2019/plugins/floating-toolbar/index.js +4 -1
- package/dist/es2019/plugins/media/nodeviews/mediaNodeUpdater.js +1 -1
- package/dist/es2019/plugins/media/toolbar/index.js +1 -1
- package/dist/es2019/plugins/media/toolbar/linking.js +3 -3
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/plugins/block-type/index.js +12 -9
- package/dist/esm/plugins/card/nodeviews/embedCard.js +2 -2
- package/dist/esm/plugins/card/nodeviews/genericCard.js +2 -1
- package/dist/esm/plugins/card/toolbar.js +1 -1
- package/dist/esm/plugins/card/ui/EditLinkToolbar.js +15 -12
- package/dist/esm/plugins/floating-toolbar/index.js +4 -1
- package/dist/esm/plugins/media/nodeviews/mediaNodeUpdater.js +1 -1
- package/dist/esm/plugins/media/toolbar/index.js +1 -1
- package/dist/esm/plugins/media/toolbar/linking.js +3 -3
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/labs/next/presets/cxhtml.d.ts +6 -0
- package/dist/types/labs/next/presets/default.d.ts +12 -0
- package/dist/types/labs/next/presets/mobile.d.ts +6 -0
- package/dist/types/plugins/block-type/index.d.ts +3 -1
- package/dist/types/plugins/card/index.d.ts +3 -1
- package/dist/types/plugins/card/ui/EditLinkToolbar.d.ts +6 -3
- package/dist/types/plugins/floating-toolbar/index.d.ts +2 -6
- package/dist/types/plugins/media/index.d.ts +3 -1
- package/dist/types/plugins/media/nodeviews/mediaInline.d.ts +1 -1
- package/dist/types/plugins/media/nodeviews/mediaNodeUpdater.d.ts +1 -1
- package/dist/types/plugins/media/nodeviews/types.d.ts +1 -1
- package/dist/types/plugins/media/toolbar/linking.d.ts +3 -1
- package/dist/types-ts4.5/labs/next/presets/cxhtml.d.ts +6 -0
- package/dist/types-ts4.5/labs/next/presets/default.d.ts +12 -0
- package/dist/types-ts4.5/labs/next/presets/mobile.d.ts +6 -0
- package/dist/types-ts4.5/plugins/block-type/index.d.ts +5 -1
- package/dist/types-ts4.5/plugins/card/index.d.ts +3 -1
- package/dist/types-ts4.5/plugins/card/ui/EditLinkToolbar.d.ts +6 -3
- package/dist/types-ts4.5/plugins/floating-toolbar/index.d.ts +2 -9
- package/dist/types-ts4.5/plugins/media/index.d.ts +3 -1
- package/dist/types-ts4.5/plugins/media/nodeviews/mediaInline.d.ts +1 -1
- package/dist/types-ts4.5/plugins/media/nodeviews/mediaNodeUpdater.d.ts +1 -1
- package/dist/types-ts4.5/plugins/media/nodeviews/types.d.ts +1 -1
- package/dist/types-ts4.5/plugins/media/toolbar/linking.d.ts +3 -1
- package/package.json +10 -12
- package/report.api.md +2 -0
- package/tmp/api-report-tmp.d.ts +3 -1
|
@@ -7,12 +7,12 @@ import inputRulePlugin from './pm-plugins/input-rule';
|
|
|
7
7
|
import ToolbarBlockType from './ui/ToolbarBlockType';
|
|
8
8
|
import WithPluginState from '../../ui/WithPluginState';
|
|
9
9
|
import { setBlockTypeWithAnalytics } from './commands';
|
|
10
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID,
|
|
10
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
11
11
|
import * as keymaps from '../../keymaps';
|
|
12
12
|
import { IconHeading, IconQuote } from '../quick-insert/assets';
|
|
13
13
|
import { messages } from './messages';
|
|
14
14
|
import { ToolbarSize } from '../../ui/Toolbar/types';
|
|
15
|
-
var headingPluginOptions = function headingPluginOptions(_ref, isAllowed) {
|
|
15
|
+
var headingPluginOptions = function headingPluginOptions(_ref, isAllowed, editorAnalyticsApi) {
|
|
16
16
|
var formatMessage = _ref.formatMessage;
|
|
17
17
|
if (!isAllowed) {
|
|
18
18
|
return [];
|
|
@@ -40,7 +40,7 @@ var headingPluginOptions = function headingPluginOptions(_ref, isAllowed) {
|
|
|
40
40
|
var tr = insert(state.schema.nodes.heading.createChecked({
|
|
41
41
|
level: level
|
|
42
42
|
}));
|
|
43
|
-
|
|
43
|
+
editorAnalyticsApi === null || editorAnalyticsApi === void 0 ? void 0 : editorAnalyticsApi.attachAnalyticsEvent({
|
|
44
44
|
action: ACTION.FORMATTED,
|
|
45
45
|
actionSubject: ACTION_SUBJECT.TEXT,
|
|
46
46
|
eventType: EVENT_TYPE.TRACK,
|
|
@@ -49,12 +49,13 @@ var headingPluginOptions = function headingPluginOptions(_ref, isAllowed) {
|
|
|
49
49
|
inputMethod: INPUT_METHOD.QUICK_INSERT,
|
|
50
50
|
newHeadingLevel: level
|
|
51
51
|
}
|
|
52
|
-
});
|
|
52
|
+
})(tr);
|
|
53
|
+
return tr;
|
|
53
54
|
}
|
|
54
55
|
};
|
|
55
56
|
});
|
|
56
57
|
};
|
|
57
|
-
var blockquotePluginOptions = function blockquotePluginOptions(_ref2, isAllowed) {
|
|
58
|
+
var blockquotePluginOptions = function blockquotePluginOptions(_ref2, isAllowed, editorAnalyticsApi) {
|
|
58
59
|
var formatMessage = _ref2.formatMessage;
|
|
59
60
|
if (!isAllowed) {
|
|
60
61
|
return [];
|
|
@@ -70,7 +71,7 @@ var blockquotePluginOptions = function blockquotePluginOptions(_ref2, isAllowed)
|
|
|
70
71
|
},
|
|
71
72
|
action: function action(insert, state) {
|
|
72
73
|
var tr = insert(state.schema.nodes.blockquote.createChecked({}, state.schema.nodes.paragraph.createChecked()));
|
|
73
|
-
|
|
74
|
+
editorAnalyticsApi === null || editorAnalyticsApi === void 0 ? void 0 : editorAnalyticsApi.attachAnalyticsEvent({
|
|
74
75
|
action: ACTION.FORMATTED,
|
|
75
76
|
actionSubject: ACTION_SUBJECT.TEXT,
|
|
76
77
|
eventType: EVENT_TYPE.TRACK,
|
|
@@ -78,11 +79,12 @@ var blockquotePluginOptions = function blockquotePluginOptions(_ref2, isAllowed)
|
|
|
78
79
|
attributes: {
|
|
79
80
|
inputMethod: INPUT_METHOD.QUICK_INSERT
|
|
80
81
|
}
|
|
81
|
-
});
|
|
82
|
+
})(tr);
|
|
83
|
+
return tr;
|
|
82
84
|
}
|
|
83
85
|
}];
|
|
84
86
|
};
|
|
85
|
-
var blockTypePlugin = function blockTypePlugin(options) {
|
|
87
|
+
var blockTypePlugin = function blockTypePlugin(options, api) {
|
|
86
88
|
return {
|
|
87
89
|
name: 'blockType',
|
|
88
90
|
nodes: function nodes() {
|
|
@@ -166,8 +168,9 @@ var blockTypePlugin = function blockTypePlugin(options) {
|
|
|
166
168
|
},
|
|
167
169
|
pluginsOptions: {
|
|
168
170
|
quickInsert: function quickInsert(intl) {
|
|
171
|
+
var _api$dependencies$ana, _api$dependencies$ana2;
|
|
169
172
|
var exclude = options && options.allowBlockType && options.allowBlockType.exclude ? options.allowBlockType.exclude : [];
|
|
170
|
-
return [].concat(_toConsumableArray(blockquotePluginOptions(intl, exclude.indexOf('blockquote') === -1)), _toConsumableArray(headingPluginOptions(intl, exclude.indexOf('heading') === -1)));
|
|
173
|
+
return [].concat(_toConsumableArray(blockquotePluginOptions(intl, exclude.indexOf('blockquote') === -1, api === null || api === void 0 ? void 0 : (_api$dependencies$ana = api.dependencies.analytics) === null || _api$dependencies$ana === void 0 ? void 0 : _api$dependencies$ana.actions)), _toConsumableArray(headingPluginOptions(intl, exclude.indexOf('heading') === -1, api === null || api === void 0 ? void 0 : (_api$dependencies$ana2 = api.dependencies.analytics) === null || _api$dependencies$ana2 === void 0 ? void 0 : _api$dependencies$ana2.actions)));
|
|
171
174
|
}
|
|
172
175
|
}
|
|
173
176
|
};
|
|
@@ -71,8 +71,8 @@ var CardInner = function CardInner(_ref) {
|
|
|
71
71
|
}), smartCard);
|
|
72
72
|
}
|
|
73
73
|
var displayGrid = function displayGrid(visible, gridType, highlight) {
|
|
74
|
-
var _pluginInjectionApi$d
|
|
75
|
-
return pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d = pluginInjectionApi.dependencies) === null || _pluginInjectionApi$d === void 0 ? void 0 :
|
|
74
|
+
var _pluginInjectionApi$d;
|
|
75
|
+
return pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d = pluginInjectionApi.dependencies.grid.actions) === null || _pluginInjectionApi$d === void 0 ? void 0 : _pluginInjectionApi$d.displayGrid(view)({
|
|
76
76
|
visible: visible,
|
|
77
77
|
gridType: gridType,
|
|
78
78
|
highlight: highlight
|
|
@@ -80,6 +80,7 @@ export function Card(SmartCardComponent, UnsupportedComponent) {
|
|
|
80
80
|
// (2) Render a blue link whilst downgrading to `link` in the ADF (fatal errs).
|
|
81
81
|
|
|
82
82
|
if (maybeAPIError.kind && maybeAPIError.kind === 'fatal') {
|
|
83
|
+
var _pluginInjectionApi$d;
|
|
83
84
|
this.setState({
|
|
84
85
|
isError: true
|
|
85
86
|
});
|
|
@@ -93,7 +94,7 @@ export function Card(SmartCardComponent, UnsupportedComponent) {
|
|
|
93
94
|
if (!getPos || typeof getPos === 'boolean') {
|
|
94
95
|
return;
|
|
95
96
|
}
|
|
96
|
-
changeSelectedCardToLinkFallback(undefined, url, true, node, getPos(), pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.dependencies.analytics.actions)(view.state, view.dispatch);
|
|
97
|
+
changeSelectedCardToLinkFallback(undefined, url, true, node, getPos(), pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d = pluginInjectionApi.dependencies.analytics) === null || _pluginInjectionApi$d === void 0 ? void 0 : _pluginInjectionApi$d.actions)(view.state, view.dispatch);
|
|
97
98
|
return null;
|
|
98
99
|
} else {
|
|
99
100
|
// Otherwise, render a blue link as fallback (above in render()).
|
|
@@ -189,7 +189,7 @@ var generateToolbarItems = function generateToolbarItems(state, featureFlags, in
|
|
|
189
189
|
linkPicker: linkPicker,
|
|
190
190
|
node: node,
|
|
191
191
|
featureFlags: featureFlags,
|
|
192
|
-
|
|
192
|
+
pluginInjectionApi: pluginInjectionApi
|
|
193
193
|
})];
|
|
194
194
|
} else {
|
|
195
195
|
var inlineCard = state.schema.nodes.inlineCard;
|
|
@@ -17,7 +17,6 @@ import { LINKPICKER_HEIGHT_IN_PX, RECENT_SEARCH_HEIGHT_IN_PX, RECENT_SEARCH_WIDT
|
|
|
17
17
|
import { changeSelectedCardToLink, updateCard } from '../pm-plugins/doc';
|
|
18
18
|
import { findCardInfo, displayInfoForCard } from '../utils';
|
|
19
19
|
import { NodeSelection } from 'prosemirror-state';
|
|
20
|
-
import { forceFocusSelector } from '../../floating-toolbar/pm-plugins/force-focus';
|
|
21
20
|
import { linkToolbarMessages } from '@atlaskit/editor-common/messages';
|
|
22
21
|
var HyperLinkToolbarWithListeners = withOuterListeners(HyperlinkToolbar);
|
|
23
22
|
export var EditLinkToolbar = /*#__PURE__*/function (_React$Component) {
|
|
@@ -34,7 +33,8 @@ export var EditLinkToolbar = /*#__PURE__*/function (_React$Component) {
|
|
|
34
33
|
* and not close the floating toolbar.
|
|
35
34
|
*/
|
|
36
35
|
_defineProperty(_assertThisInitialized(_this), "handleEsc", function (e) {
|
|
37
|
-
|
|
36
|
+
var _this$props$forceFocu, _this$props;
|
|
37
|
+
(_this$props$forceFocu = (_this$props = _this.props).forceFocusSelector) === null || _this$props$forceFocu === void 0 ? void 0 : _this$props$forceFocu.call(_this$props, "[aria-label=\"".concat(linkToolbarMessages.editLink.defaultMessage, "\"]"), _this.props.view);
|
|
38
38
|
});
|
|
39
39
|
return _this;
|
|
40
40
|
}
|
|
@@ -60,14 +60,14 @@ export var EditLinkToolbar = /*#__PURE__*/function (_React$Component) {
|
|
|
60
60
|
key: "render",
|
|
61
61
|
value: function render() {
|
|
62
62
|
var _this2 = this;
|
|
63
|
-
var _this$
|
|
64
|
-
linkPickerOptions = _this$
|
|
65
|
-
providerFactory = _this$
|
|
66
|
-
url = _this$
|
|
67
|
-
text = _this$
|
|
68
|
-
view = _this$
|
|
69
|
-
featureFlags = _this$
|
|
70
|
-
_onSubmit = _this$
|
|
63
|
+
var _this$props2 = this.props,
|
|
64
|
+
linkPickerOptions = _this$props2.linkPickerOptions,
|
|
65
|
+
providerFactory = _this$props2.providerFactory,
|
|
66
|
+
url = _this$props2.url,
|
|
67
|
+
text = _this$props2.text,
|
|
68
|
+
view = _this$props2.view,
|
|
69
|
+
featureFlags = _this$props2.featureFlags,
|
|
70
|
+
_onSubmit = _this$props2.onSubmit;
|
|
71
71
|
return /*#__PURE__*/React.createElement(HyperLinkToolbarWithListeners, {
|
|
72
72
|
view: view,
|
|
73
73
|
linkPickerOptions: linkPickerOptions,
|
|
@@ -112,12 +112,13 @@ export var buildEditLinkToolbar = function buildEditLinkToolbar(_ref) {
|
|
|
112
112
|
node = _ref.node,
|
|
113
113
|
linkPicker = _ref.linkPicker,
|
|
114
114
|
featureFlags = _ref.featureFlags,
|
|
115
|
-
|
|
115
|
+
pluginInjectionApi = _ref.pluginInjectionApi;
|
|
116
116
|
return {
|
|
117
117
|
type: 'custom',
|
|
118
118
|
disableArrowNavigation: true,
|
|
119
119
|
fallback: [],
|
|
120
120
|
render: function render(view, idx) {
|
|
121
|
+
var _pluginInjectionApi$d;
|
|
121
122
|
if (!view || !providerFactory) {
|
|
122
123
|
return null;
|
|
123
124
|
}
|
|
@@ -131,6 +132,7 @@ export var buildEditLinkToolbar = function buildEditLinkToolbar(_ref) {
|
|
|
131
132
|
text: displayInfo.title || '',
|
|
132
133
|
node: node,
|
|
133
134
|
featureFlags: featureFlags,
|
|
135
|
+
forceFocusSelector: pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d = pluginInjectionApi.dependencies.floatingToolbar.actions) === null || _pluginInjectionApi$d === void 0 ? void 0 : _pluginInjectionApi$d.forceFocusSelector,
|
|
134
136
|
onSubmit: function onSubmit(newHref, newText, analytic) {
|
|
135
137
|
var urlChanged = newHref !== displayInfo.url;
|
|
136
138
|
var titleChanged = newText !== displayInfo.title;
|
|
@@ -138,7 +140,8 @@ export var buildEditLinkToolbar = function buildEditLinkToolbar(_ref) {
|
|
|
138
140
|
// If the title is changed in a smartlink, convert to standard blue hyperlink
|
|
139
141
|
// (even if the url was also changed) - we don't want to lose the custom title.
|
|
140
142
|
if (titleChanged) {
|
|
141
|
-
|
|
143
|
+
var _pluginInjectionApi$d2;
|
|
144
|
+
return commandWithMetadata(changeSelectedCardToLink(newText, newHref, undefined, undefined, undefined, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d2 = pluginInjectionApi.dependencies.analytics) === null || _pluginInjectionApi$d2 === void 0 ? void 0 : _pluginInjectionApi$d2.actions), {
|
|
142
145
|
action: ACTION.UPDATED,
|
|
143
146
|
sourceEvent: analytic
|
|
144
147
|
})(view.state, view.dispatch);
|
|
@@ -22,7 +22,7 @@ import { ToolbarLoader } from './ui/ToolbarLoader';
|
|
|
22
22
|
import { findNode } from './utils';
|
|
23
23
|
import { ErrorBoundary } from '../../ui/ErrorBoundary';
|
|
24
24
|
import { processCopyButtonItems } from '../copy-button/toolbar';
|
|
25
|
-
import forceFocusPlugin from './pm-plugins/force-focus';
|
|
25
|
+
import forceFocusPlugin, { forceFocusSelector } from './pm-plugins/force-focus';
|
|
26
26
|
export var getRelevantConfig = function getRelevantConfig(selection, configs) {
|
|
27
27
|
// node selections always take precedence, see if
|
|
28
28
|
var configPair;
|
|
@@ -146,6 +146,9 @@ var floatingToolbarPlugin = function floatingToolbarPlugin(_, api) {
|
|
|
146
146
|
}
|
|
147
147
|
}];
|
|
148
148
|
},
|
|
149
|
+
actions: {
|
|
150
|
+
forceFocusSelector: forceFocusSelector
|
|
151
|
+
},
|
|
149
152
|
contentComponent: function contentComponent(_ref3) {
|
|
150
153
|
var popupsMountPoint = _ref3.popupsMountPoint,
|
|
151
154
|
popupsBoundariesElement = _ref3.popupsBoundariesElement,
|
|
@@ -6,7 +6,7 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
|
6
6
|
import uuidV4 from 'uuid/v4';
|
|
7
7
|
import { DEFAULT_IMAGE_HEIGHT, DEFAULT_IMAGE_WIDTH } from '@atlaskit/editor-common/ui';
|
|
8
8
|
import { getMediaClient, isMediaBlobUrl as _isMediaBlobUrl, getAttrsFromUrl, isImageRepresentationReady } from '@atlaskit/media-client';
|
|
9
|
-
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '
|
|
9
|
+
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
10
10
|
import { replaceExternalMedia, updateAllMediaSingleNodesAttrs, updateCurrentMediaNodeAttrs, updateMediaSingleNodeAttrs } from '../commands/helpers';
|
|
11
11
|
export var MediaNodeUpdater = /*#__PURE__*/function () {
|
|
12
12
|
function MediaNodeUpdater(props) {
|
|
@@ -338,7 +338,7 @@ export var floatingToolbar = function floatingToolbar(state, intl) {
|
|
|
338
338
|
}
|
|
339
339
|
};
|
|
340
340
|
if (allowLinking && mediaLinkingState && mediaLinkingState.visible && shouldShowMediaLinkToolbar(state)) {
|
|
341
|
-
var linkingToolbar = getLinkingToolbar(baseToolbar, mediaLinkingState, state, intl, providerFactory);
|
|
341
|
+
var linkingToolbar = getLinkingToolbar(baseToolbar, mediaLinkingState, state, intl, pluginInjectionApi, providerFactory);
|
|
342
342
|
if (linkingToolbar) {
|
|
343
343
|
return linkingToolbar;
|
|
344
344
|
}
|
|
@@ -6,7 +6,6 @@ import { hideLinkingToolbar, setUrlToMedia, unlink } from '../commands/linking';
|
|
|
6
6
|
import { getMediaLinkingState } from '../pm-plugins/linking';
|
|
7
7
|
import MediaLinkingToolbar from '../ui/MediaLinkingToolbar';
|
|
8
8
|
import { RECENT_SEARCH_HEIGHT_IN_PX, RECENT_SEARCH_WIDTH_IN_PX } from '@atlaskit/editor-common/ui';
|
|
9
|
-
import { forceFocusSelector } from '../../floating-toolbar/pm-plugins/force-focus';
|
|
10
9
|
var FORCE_FOCUS_SELECTOR = '[data-testid="add-link-button"],[data-testid="edit-link-button"]';
|
|
11
10
|
export function shouldShowMediaLinkToolbar(editorState) {
|
|
12
11
|
var mediaLinkingState = getMediaLinkingState(editorState);
|
|
@@ -24,7 +23,7 @@ export function shouldShowMediaLinkToolbar(editorState) {
|
|
|
24
23
|
parent = _editorState$doc$reso.parent;
|
|
25
24
|
return parent && parent.type.allowsMarkType(link);
|
|
26
25
|
}
|
|
27
|
-
export var getLinkingToolbar = function getLinkingToolbar(toolbarBaseConfig, mediaLinkingState, state, intl, providerFactory) {
|
|
26
|
+
export var getLinkingToolbar = function getLinkingToolbar(toolbarBaseConfig, mediaLinkingState, state, intl, pluginInjectionApi, providerFactory) {
|
|
28
27
|
var link = mediaLinkingState.link,
|
|
29
28
|
visible = mediaLinkingState.visible,
|
|
30
29
|
editing = mediaLinkingState.editable,
|
|
@@ -60,11 +59,12 @@ export var getLinkingToolbar = function getLinkingToolbar(toolbarBaseConfig, med
|
|
|
60
59
|
hideLinkingToolbar(view.state, view.dispatch, view);
|
|
61
60
|
},
|
|
62
61
|
onCancel: function onCancel() {
|
|
62
|
+
var _pluginInjectionApi$d;
|
|
63
63
|
hideLinkingToolbar(view.state, view.dispatch, view, true);
|
|
64
64
|
/** Focus should move to the 'Add link' button when the toolbar closes
|
|
65
65
|
* and not close the floating toolbar.
|
|
66
66
|
*/
|
|
67
|
-
forceFocusSelector(FORCE_FOCUS_SELECTOR, view);
|
|
67
|
+
pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d = pluginInjectionApi.dependencies.floatingToolbar.actions) === null || _pluginInjectionApi$d === void 0 ? void 0 : _pluginInjectionApi$d.forceFocusSelector(FORCE_FOCUS_SELECTOR, view);
|
|
68
68
|
},
|
|
69
69
|
onSubmit: function onSubmit(href, meta) {
|
|
70
70
|
setUrlToMedia(href, meta.inputMethod)(view.state, view.dispatch, view);
|
package/dist/esm/version.json
CHANGED
|
@@ -118,6 +118,9 @@ export declare function useCXHTMLPreset({ mentionProvider, mediaProvider, placeh
|
|
|
118
118
|
removeDecoration: import("@atlaskit/editor-common/types").Command;
|
|
119
119
|
};
|
|
120
120
|
}>];
|
|
121
|
+
actions: {
|
|
122
|
+
forceFocusSelector: import("@atlaskit/editor-plugin-floating-toolbar").ForceFocusSelector;
|
|
123
|
+
};
|
|
121
124
|
}> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"floatingToolbar", {
|
|
122
125
|
dependencies: [(config: import("@atlaskit/editor-common/types").FeatureFlags, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"featureFlags", {
|
|
123
126
|
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
@@ -138,6 +141,9 @@ export declare function useCXHTMLPreset({ mentionProvider, mediaProvider, placeh
|
|
|
138
141
|
removeDecoration: import("@atlaskit/editor-common/types").Command;
|
|
139
142
|
};
|
|
140
143
|
}>];
|
|
144
|
+
actions: {
|
|
145
|
+
forceFocusSelector: import("@atlaskit/editor-plugin-floating-toolbar").ForceFocusSelector;
|
|
146
|
+
};
|
|
141
147
|
}>, (config?: undefined, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"fakeTextCursor", {}> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"fakeTextCursor", {}>, (config?: ((editorView: import("prosemirror-view").EditorView<any>) => void) | undefined, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"submitEditor", {
|
|
142
148
|
pluginConfiguration: ((editorView: import("prosemirror-view").EditorView<any>) => void) | undefined;
|
|
143
149
|
}> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"submitEditor", {
|
|
@@ -147,6 +147,9 @@ export declare function createDefaultPreset(options: EditorPresetProps & Default
|
|
|
147
147
|
removeDecoration: import("@atlaskit/editor-common/types").Command;
|
|
148
148
|
};
|
|
149
149
|
}>];
|
|
150
|
+
actions: {
|
|
151
|
+
forceFocusSelector: import("@atlaskit/editor-plugin-floating-toolbar").ForceFocusSelector;
|
|
152
|
+
};
|
|
150
153
|
}> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"floatingToolbar", {
|
|
151
154
|
dependencies: [(config: import("@atlaskit/editor-common/types").FeatureFlags, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"featureFlags", {
|
|
152
155
|
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
@@ -167,6 +170,9 @@ export declare function createDefaultPreset(options: EditorPresetProps & Default
|
|
|
167
170
|
removeDecoration: import("@atlaskit/editor-common/types").Command;
|
|
168
171
|
};
|
|
169
172
|
}>];
|
|
173
|
+
actions: {
|
|
174
|
+
forceFocusSelector: import("@atlaskit/editor-plugin-floating-toolbar").ForceFocusSelector;
|
|
175
|
+
};
|
|
170
176
|
}>, (config?: undefined, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"fakeTextCursor", {}> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"fakeTextCursor", {}>, (config?: ((editorView: import("prosemirror-view").EditorView<any>) => void) | undefined, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"submitEditor", {
|
|
171
177
|
pluginConfiguration: ((editorView: import("prosemirror-view").EditorView<any>) => void) | undefined;
|
|
172
178
|
}> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"submitEditor", {
|
|
@@ -376,6 +382,9 @@ export declare function useDefaultPreset(props: EditorPresetProps & DefaultPrese
|
|
|
376
382
|
removeDecoration: import("@atlaskit/editor-common/types").Command;
|
|
377
383
|
};
|
|
378
384
|
}>];
|
|
385
|
+
actions: {
|
|
386
|
+
forceFocusSelector: import("@atlaskit/editor-plugin-floating-toolbar").ForceFocusSelector;
|
|
387
|
+
};
|
|
379
388
|
}> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"floatingToolbar", {
|
|
380
389
|
dependencies: [(config: import("@atlaskit/editor-common/types").FeatureFlags, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"featureFlags", {
|
|
381
390
|
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
@@ -396,6 +405,9 @@ export declare function useDefaultPreset(props: EditorPresetProps & DefaultPrese
|
|
|
396
405
|
removeDecoration: import("@atlaskit/editor-common/types").Command;
|
|
397
406
|
};
|
|
398
407
|
}>];
|
|
408
|
+
actions: {
|
|
409
|
+
forceFocusSelector: import("@atlaskit/editor-plugin-floating-toolbar").ForceFocusSelector;
|
|
410
|
+
};
|
|
399
411
|
}>, (config?: undefined, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"fakeTextCursor", {}> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"fakeTextCursor", {}>, (config?: ((editorView: import("prosemirror-view").EditorView<any>) => void) | undefined, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"submitEditor", {
|
|
400
412
|
pluginConfiguration: ((editorView: import("prosemirror-view").EditorView<any>) => void) | undefined;
|
|
401
413
|
}> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"submitEditor", {
|
|
@@ -121,6 +121,9 @@ export declare function useMobilePreset({ media, placeholder, maxContentSize, cr
|
|
|
121
121
|
removeDecoration: import("@atlaskit/editor-common/types").Command;
|
|
122
122
|
};
|
|
123
123
|
}>];
|
|
124
|
+
actions: {
|
|
125
|
+
forceFocusSelector: import("@atlaskit/editor-plugin-floating-toolbar").ForceFocusSelector;
|
|
126
|
+
};
|
|
124
127
|
}> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"floatingToolbar", {
|
|
125
128
|
dependencies: [(config: import("@atlaskit/editor-common/types").FeatureFlags, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"featureFlags", {
|
|
126
129
|
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
@@ -141,6 +144,9 @@ export declare function useMobilePreset({ media, placeholder, maxContentSize, cr
|
|
|
141
144
|
removeDecoration: import("@atlaskit/editor-common/types").Command;
|
|
142
145
|
};
|
|
143
146
|
}>];
|
|
147
|
+
actions: {
|
|
148
|
+
forceFocusSelector: import("@atlaskit/editor-plugin-floating-toolbar").ForceFocusSelector;
|
|
149
|
+
};
|
|
144
150
|
}>, (config?: undefined, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"fakeTextCursor", {}> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"fakeTextCursor", {}>, (config?: ((editorView: import("prosemirror-view").EditorView<any>) => void) | undefined, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"submitEditor", {
|
|
145
151
|
pluginConfiguration: ((editorView: import("prosemirror-view").EditorView<any>) => void) | undefined;
|
|
146
152
|
}> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"submitEditor", {
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
1
|
+
import { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
2
2
|
import { BlockTypePluginOptions } from './types';
|
|
3
|
+
import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
3
4
|
declare const blockTypePlugin: NextEditorPlugin<'blockType', {
|
|
4
5
|
pluginConfiguration: BlockTypePluginOptions | undefined;
|
|
6
|
+
dependencies: [OptionalPlugin<typeof analyticsPlugin>];
|
|
5
7
|
}>;
|
|
6
8
|
export default blockTypePlugin;
|
|
7
9
|
export { pluginKey } from './pm-plugins/main';
|
|
@@ -5,6 +5,7 @@ import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
|
5
5
|
import type { widthPlugin } from '@atlaskit/editor-plugin-width';
|
|
6
6
|
import type { decorationsPlugin } from '@atlaskit/editor-plugin-decorations';
|
|
7
7
|
import type { gridPlugin } from '@atlaskit/editor-plugin-grid';
|
|
8
|
+
import type { FloatingToolbarPlugin } from '@atlaskit/editor-plugin-floating-toolbar';
|
|
8
9
|
declare const cardPlugin: NextEditorPlugin<'card', {
|
|
9
10
|
pluginConfiguration: CardPluginOptions;
|
|
10
11
|
dependencies: [
|
|
@@ -12,7 +13,8 @@ declare const cardPlugin: NextEditorPlugin<'card', {
|
|
|
12
13
|
typeof analyticsPlugin,
|
|
13
14
|
typeof widthPlugin,
|
|
14
15
|
typeof decorationsPlugin,
|
|
15
|
-
typeof gridPlugin
|
|
16
|
+
typeof gridPlugin,
|
|
17
|
+
FloatingToolbarPlugin
|
|
16
18
|
];
|
|
17
19
|
}>;
|
|
18
20
|
export default cardPlugin;
|
|
@@ -4,9 +4,11 @@ import { Node } from 'prosemirror-model';
|
|
|
4
4
|
import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
5
5
|
import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
6
6
|
import type { LinkPickerOptions } from '@atlaskit/editor-common/types';
|
|
7
|
-
import type { Command, FloatingToolbarItem, FloatingToolbarConfig } from '@atlaskit/editor-common/types';
|
|
7
|
+
import type { Command, FloatingToolbarItem, FloatingToolbarConfig, ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
8
8
|
import { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
9
9
|
import { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
10
|
+
import type cardPlugin from '../index';
|
|
11
|
+
import type { ForceFocusSelector } from '@atlaskit/editor-plugin-floating-toolbar';
|
|
10
12
|
export type EditLinkToolbarProps = {
|
|
11
13
|
view: EditorView;
|
|
12
14
|
providerFactory: ProviderFactory;
|
|
@@ -16,6 +18,7 @@ export type EditLinkToolbarProps = {
|
|
|
16
18
|
onSubmit?: (href: string, text?: string, analytic?: UIAnalyticsEvent | null | undefined) => void;
|
|
17
19
|
linkPickerOptions?: LinkPickerOptions;
|
|
18
20
|
featureFlags: FeatureFlags;
|
|
21
|
+
forceFocusSelector: ForceFocusSelector | undefined;
|
|
19
22
|
};
|
|
20
23
|
export declare class EditLinkToolbar extends React.Component<EditLinkToolbarProps> {
|
|
21
24
|
componentDidUpdate(prevProps: EditLinkToolbarProps): void;
|
|
@@ -28,11 +31,11 @@ export declare class EditLinkToolbar extends React.Component<EditLinkToolbarProp
|
|
|
28
31
|
render(): JSX.Element;
|
|
29
32
|
}
|
|
30
33
|
export declare const editLink: (editorAnalyticsApi: EditorAnalyticsAPI | undefined) => Command;
|
|
31
|
-
export declare const buildEditLinkToolbar: ({ providerFactory, node, linkPicker, featureFlags,
|
|
34
|
+
export declare const buildEditLinkToolbar: ({ providerFactory, node, linkPicker, featureFlags, pluginInjectionApi, }: {
|
|
32
35
|
providerFactory: ProviderFactory;
|
|
33
36
|
node: Node;
|
|
34
37
|
linkPicker?: LinkPickerOptions | undefined;
|
|
35
38
|
featureFlags: FeatureFlags;
|
|
36
|
-
|
|
39
|
+
pluginInjectionApi: ExtractInjectionAPI<typeof cardPlugin> | undefined;
|
|
37
40
|
}) => FloatingToolbarItem<Command>;
|
|
38
41
|
export declare const editLinkToolbarConfig: (showLinkingToolbar: boolean, lpLinkPicker: boolean) => Partial<FloatingToolbarConfig>;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { PluginKey, Selection, EditorState } from 'prosemirror-state';
|
|
2
2
|
import { Node } from 'prosemirror-model';
|
|
3
|
-
import { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
4
3
|
import { FloatingToolbarConfig } from './types';
|
|
5
|
-
import type
|
|
6
|
-
import type { decorationsPlugin } from '@atlaskit/editor-plugin-decorations';
|
|
4
|
+
import type { FloatingToolbarPlugin } from '@atlaskit/editor-plugin-floating-toolbar';
|
|
7
5
|
export type FloatingToolbarPluginState = Record<'getConfigWithNodeInfo', (state: EditorState) => ConfigWithNodeInfo | null | undefined>;
|
|
8
6
|
export type ConfigWithNodeInfo = {
|
|
9
7
|
config: FloatingToolbarConfig | undefined;
|
|
@@ -11,9 +9,7 @@ export type ConfigWithNodeInfo = {
|
|
|
11
9
|
node: Node;
|
|
12
10
|
};
|
|
13
11
|
export declare const getRelevantConfig: (selection: Selection<any>, configs: Array<FloatingToolbarConfig>) => ConfigWithNodeInfo | undefined;
|
|
14
|
-
declare const floatingToolbarPlugin:
|
|
15
|
-
dependencies: [typeof featureFlagsPlugin, typeof decorationsPlugin];
|
|
16
|
-
}>;
|
|
12
|
+
declare const floatingToolbarPlugin: FloatingToolbarPlugin;
|
|
17
13
|
export default floatingToolbarPlugin;
|
|
18
14
|
/**
|
|
19
15
|
*
|
|
@@ -9,6 +9,7 @@ import type { gridPlugin } from '@atlaskit/editor-plugin-grid';
|
|
|
9
9
|
import type { widthPlugin } from '@atlaskit/editor-plugin-width';
|
|
10
10
|
import type { decorationsPlugin } from '@atlaskit/editor-plugin-decorations';
|
|
11
11
|
import { MediaPluginState } from './pm-plugins/types';
|
|
12
|
+
import type { FloatingToolbarPlugin } from '@atlaskit/editor-plugin-floating-toolbar';
|
|
12
13
|
export type { MediaState, MediaProvider, CustomMediaPicker };
|
|
13
14
|
export { insertMediaSingleNode } from './utils/media-single';
|
|
14
15
|
declare const mediaPlugin: NextEditorPlugin<'media', {
|
|
@@ -18,7 +19,8 @@ declare const mediaPlugin: NextEditorPlugin<'media', {
|
|
|
18
19
|
OptionalPlugin<typeof analyticsPlugin>,
|
|
19
20
|
typeof gridPlugin,
|
|
20
21
|
typeof widthPlugin,
|
|
21
|
-
typeof decorationsPlugin
|
|
22
|
+
typeof decorationsPlugin,
|
|
23
|
+
FloatingToolbarPlugin
|
|
22
24
|
];
|
|
23
25
|
sharedState: MediaPluginState | null;
|
|
24
26
|
}>;
|
|
@@ -9,7 +9,7 @@ import type { MediaProvider } from '@atlaskit/editor-common/provider-factory';
|
|
|
9
9
|
import { PortalProviderAPI } from '../../../../src/ui/PortalProvider';
|
|
10
10
|
import { MediaPluginState } from '../pm-plugins/types';
|
|
11
11
|
import { MediaNodeUpdater } from './mediaNodeUpdater';
|
|
12
|
-
import { DispatchAnalyticsEvent } from '
|
|
12
|
+
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
13
13
|
export interface MediaInlineProps {
|
|
14
14
|
mediaProvider: Promise<MediaProvider>;
|
|
15
15
|
identifier: FileIdentifier;
|
|
@@ -3,7 +3,7 @@ import type { MediaProvider } from '@atlaskit/editor-common/provider-factory';
|
|
|
3
3
|
import { Node as PMNode } from 'prosemirror-model';
|
|
4
4
|
import { EditorView } from 'prosemirror-view';
|
|
5
5
|
import type { ContextIdentifierProvider } from '@atlaskit/editor-common/provider-factory';
|
|
6
|
-
import { DispatchAnalyticsEvent } from '
|
|
6
|
+
import { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
7
7
|
import { MediaOptions } from '../types';
|
|
8
8
|
import { ProsemirrorGetPosHandler } from '../../../nodeviews';
|
|
9
9
|
import { MediaTraceContext } from '@atlaskit/media-common';
|
|
@@ -6,7 +6,7 @@ import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
|
6
6
|
import { ProsemirrorGetPosHandler, ForwardRef } from '../../../nodeviews';
|
|
7
7
|
import { EventDispatcher } from '../../../event-dispatcher';
|
|
8
8
|
import { MediaOptions } from '../types';
|
|
9
|
-
import { DispatchAnalyticsEvent } from '
|
|
9
|
+
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
10
10
|
import { MediaPluginState } from '../pm-plugins/types';
|
|
11
11
|
import type mediaPlugin from '../index';
|
|
12
12
|
export interface MediaSingleNodeProps {
|
|
@@ -3,6 +3,8 @@ import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
|
3
3
|
import { IntlShape } from 'react-intl-next';
|
|
4
4
|
import { FloatingToolbarConfig } from '../../floating-toolbar/types';
|
|
5
5
|
import { MediaLinkingState } from '../pm-plugins/linking';
|
|
6
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
6
7
|
import { MediaToolbarBaseConfig } from '../types';
|
|
8
|
+
import type mediaPlugin from '../index';
|
|
7
9
|
export declare function shouldShowMediaLinkToolbar(editorState: EditorState): boolean;
|
|
8
|
-
export declare const getLinkingToolbar: (toolbarBaseConfig: MediaToolbarBaseConfig, mediaLinkingState: MediaLinkingState, state: EditorState, intl: IntlShape, providerFactory?: ProviderFactory) => FloatingToolbarConfig | undefined;
|
|
10
|
+
export declare const getLinkingToolbar: (toolbarBaseConfig: MediaToolbarBaseConfig, mediaLinkingState: MediaLinkingState, state: EditorState, intl: IntlShape, pluginInjectionApi: ExtractInjectionAPI<typeof mediaPlugin> | undefined, providerFactory?: ProviderFactory) => FloatingToolbarConfig | undefined;
|
|
@@ -152,6 +152,9 @@ export declare function useCXHTMLPreset({ mentionProvider, mediaProvider, placeh
|
|
|
152
152
|
};
|
|
153
153
|
}>
|
|
154
154
|
];
|
|
155
|
+
actions: {
|
|
156
|
+
forceFocusSelector: import("@atlaskit/editor-plugin-floating-toolbar").ForceFocusSelector;
|
|
157
|
+
};
|
|
155
158
|
}> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"floatingToolbar", {
|
|
156
159
|
dependencies: [
|
|
157
160
|
(config: import("@atlaskit/editor-common/types").FeatureFlags, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"featureFlags", {
|
|
@@ -175,6 +178,9 @@ export declare function useCXHTMLPreset({ mentionProvider, mediaProvider, placeh
|
|
|
175
178
|
};
|
|
176
179
|
}>
|
|
177
180
|
];
|
|
181
|
+
actions: {
|
|
182
|
+
forceFocusSelector: import("@atlaskit/editor-plugin-floating-toolbar").ForceFocusSelector;
|
|
183
|
+
};
|
|
178
184
|
}>,
|
|
179
185
|
(config?: undefined, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"fakeTextCursor", {}> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"fakeTextCursor", {}>,
|
|
180
186
|
(config?: ((editorView: import("prosemirror-view").EditorView<any>) => void) | undefined, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"submitEditor", {
|
|
@@ -181,6 +181,9 @@ export declare function createDefaultPreset(options: EditorPresetProps & Default
|
|
|
181
181
|
};
|
|
182
182
|
}>
|
|
183
183
|
];
|
|
184
|
+
actions: {
|
|
185
|
+
forceFocusSelector: import("@atlaskit/editor-plugin-floating-toolbar").ForceFocusSelector;
|
|
186
|
+
};
|
|
184
187
|
}> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"floatingToolbar", {
|
|
185
188
|
dependencies: [
|
|
186
189
|
(config: import("@atlaskit/editor-common/types").FeatureFlags, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"featureFlags", {
|
|
@@ -204,6 +207,9 @@ export declare function createDefaultPreset(options: EditorPresetProps & Default
|
|
|
204
207
|
};
|
|
205
208
|
}>
|
|
206
209
|
];
|
|
210
|
+
actions: {
|
|
211
|
+
forceFocusSelector: import("@atlaskit/editor-plugin-floating-toolbar").ForceFocusSelector;
|
|
212
|
+
};
|
|
207
213
|
}>,
|
|
208
214
|
(config?: undefined, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"fakeTextCursor", {}> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"fakeTextCursor", {}>,
|
|
209
215
|
(config?: ((editorView: import("prosemirror-view").EditorView<any>) => void) | undefined, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"submitEditor", {
|
|
@@ -472,6 +478,9 @@ export declare function useDefaultPreset(props: EditorPresetProps & DefaultPrese
|
|
|
472
478
|
};
|
|
473
479
|
}>
|
|
474
480
|
];
|
|
481
|
+
actions: {
|
|
482
|
+
forceFocusSelector: import("@atlaskit/editor-plugin-floating-toolbar").ForceFocusSelector;
|
|
483
|
+
};
|
|
475
484
|
}> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"floatingToolbar", {
|
|
476
485
|
dependencies: [
|
|
477
486
|
(config: import("@atlaskit/editor-common/types").FeatureFlags, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"featureFlags", {
|
|
@@ -495,6 +504,9 @@ export declare function useDefaultPreset(props: EditorPresetProps & DefaultPrese
|
|
|
495
504
|
};
|
|
496
505
|
}>
|
|
497
506
|
];
|
|
507
|
+
actions: {
|
|
508
|
+
forceFocusSelector: import("@atlaskit/editor-plugin-floating-toolbar").ForceFocusSelector;
|
|
509
|
+
};
|
|
498
510
|
}>,
|
|
499
511
|
(config?: undefined, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"fakeTextCursor", {}> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"fakeTextCursor", {}>,
|
|
500
512
|
(config?: ((editorView: import("prosemirror-view").EditorView<any>) => void) | undefined, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"submitEditor", {
|
|
@@ -155,6 +155,9 @@ export declare function useMobilePreset({ media, placeholder, maxContentSize, cr
|
|
|
155
155
|
};
|
|
156
156
|
}>
|
|
157
157
|
];
|
|
158
|
+
actions: {
|
|
159
|
+
forceFocusSelector: import("@atlaskit/editor-plugin-floating-toolbar").ForceFocusSelector;
|
|
160
|
+
};
|
|
158
161
|
}> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"floatingToolbar", {
|
|
159
162
|
dependencies: [
|
|
160
163
|
(config: import("@atlaskit/editor-common/types").FeatureFlags, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"featureFlags", {
|
|
@@ -178,6 +181,9 @@ export declare function useMobilePreset({ media, placeholder, maxContentSize, cr
|
|
|
178
181
|
};
|
|
179
182
|
}>
|
|
180
183
|
];
|
|
184
|
+
actions: {
|
|
185
|
+
forceFocusSelector: import("@atlaskit/editor-plugin-floating-toolbar").ForceFocusSelector;
|
|
186
|
+
};
|
|
181
187
|
}>,
|
|
182
188
|
(config?: undefined, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"fakeTextCursor", {}> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"fakeTextCursor", {}>,
|
|
183
189
|
(config?: ((editorView: import("prosemirror-view").EditorView<any>) => void) | undefined, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"submitEditor", {
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
import { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
1
|
+
import { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
2
2
|
import { BlockTypePluginOptions } from './types';
|
|
3
|
+
import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
3
4
|
declare const blockTypePlugin: NextEditorPlugin<'blockType', {
|
|
4
5
|
pluginConfiguration: BlockTypePluginOptions | undefined;
|
|
6
|
+
dependencies: [
|
|
7
|
+
OptionalPlugin<typeof analyticsPlugin>
|
|
8
|
+
];
|
|
5
9
|
}>;
|
|
6
10
|
export default blockTypePlugin;
|
|
7
11
|
export { pluginKey } from './pm-plugins/main';
|
|
@@ -5,6 +5,7 @@ import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
|
5
5
|
import type { widthPlugin } from '@atlaskit/editor-plugin-width';
|
|
6
6
|
import type { decorationsPlugin } from '@atlaskit/editor-plugin-decorations';
|
|
7
7
|
import type { gridPlugin } from '@atlaskit/editor-plugin-grid';
|
|
8
|
+
import type { FloatingToolbarPlugin } from '@atlaskit/editor-plugin-floating-toolbar';
|
|
8
9
|
declare const cardPlugin: NextEditorPlugin<'card', {
|
|
9
10
|
pluginConfiguration: CardPluginOptions;
|
|
10
11
|
dependencies: [
|
|
@@ -12,7 +13,8 @@ declare const cardPlugin: NextEditorPlugin<'card', {
|
|
|
12
13
|
typeof analyticsPlugin,
|
|
13
14
|
typeof widthPlugin,
|
|
14
15
|
typeof decorationsPlugin,
|
|
15
|
-
typeof gridPlugin
|
|
16
|
+
typeof gridPlugin,
|
|
17
|
+
FloatingToolbarPlugin
|
|
16
18
|
];
|
|
17
19
|
}>;
|
|
18
20
|
export default cardPlugin;
|