@atlaskit/editor-core 187.41.3 → 187.41.5
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 +38 -18
- package/dist/cjs/create-editor/feature-flags-from-props.js +2 -3
- package/dist/cjs/plugins/collab-edit/ui/styles.js +2 -2
- package/dist/cjs/plugins/date/nodeviews/date.js +6 -1
- package/dist/cjs/plugins/extension/index.js +35 -9
- package/dist/cjs/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +8 -15
- package/dist/cjs/plugins/floating-toolbar/ui/Toolbar.js +7 -18
- package/dist/cjs/plugins/media/styles.js +1 -1
- package/dist/cjs/plugins/media/toolbar/commands.js +63 -25
- package/dist/cjs/plugins/media/toolbar/index.js +13 -18
- package/dist/cjs/plugins/media/ui/ImageBorder/index.js +1 -3
- package/dist/cjs/plugins/media/ui/PixelEntry/index.js +6 -5
- package/dist/cjs/plugins/media/utils/analytics.js +1 -1
- package/dist/cjs/plugins/paste/handlers.js +2 -1
- package/dist/cjs/plugins/text-color/index.js +2 -6
- package/dist/cjs/plugins/text-color/ui/ToolbarTextColor/index.js +2 -5
- package/dist/cjs/ui/ColorPickerButton/index.js +3 -4
- package/dist/cjs/ui/ConfigPanel/Fields/ColorPicker.js +1 -11
- package/dist/cjs/ui/ConfigPanel/Fields/Expand.js +1 -1
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/create-editor/feature-flags-from-props.js +2 -3
- package/dist/es2019/plugins/collab-edit/ui/styles.js +2 -2
- package/dist/es2019/plugins/date/nodeviews/date.js +6 -1
- package/dist/es2019/plugins/extension/index.js +30 -4
- package/dist/es2019/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +8 -15
- package/dist/es2019/plugins/floating-toolbar/ui/Toolbar.js +3 -15
- package/dist/es2019/plugins/media/styles.js +3 -5
- package/dist/es2019/plugins/media/toolbar/commands.js +31 -1
- package/dist/es2019/plugins/media/toolbar/index.js +14 -20
- package/dist/es2019/plugins/media/ui/ImageBorder/index.js +1 -3
- package/dist/es2019/plugins/media/ui/PixelEntry/index.js +6 -5
- package/dist/es2019/plugins/media/utils/analytics.js +1 -1
- package/dist/es2019/plugins/paste/handlers.js +2 -1
- package/dist/es2019/plugins/text-color/index.js +2 -6
- package/dist/es2019/plugins/text-color/ui/ToolbarTextColor/index.js +2 -7
- package/dist/es2019/ui/ColorPickerButton/index.js +2 -3
- package/dist/es2019/ui/ConfigPanel/Fields/ColorPicker.js +1 -11
- package/dist/es2019/ui/ConfigPanel/Fields/Expand.js +1 -1
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/create-editor/feature-flags-from-props.js +2 -3
- package/dist/esm/plugins/collab-edit/ui/styles.js +2 -2
- package/dist/esm/plugins/date/nodeviews/date.js +6 -1
- package/dist/esm/plugins/extension/index.js +35 -9
- package/dist/esm/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +8 -15
- package/dist/esm/plugins/floating-toolbar/ui/Toolbar.js +7 -18
- package/dist/esm/plugins/media/styles.js +1 -1
- package/dist/esm/plugins/media/toolbar/commands.js +37 -1
- package/dist/esm/plugins/media/toolbar/index.js +14 -19
- package/dist/esm/plugins/media/ui/ImageBorder/index.js +1 -3
- package/dist/esm/plugins/media/ui/PixelEntry/index.js +6 -5
- package/dist/esm/plugins/media/utils/analytics.js +1 -1
- package/dist/esm/plugins/paste/handlers.js +2 -1
- package/dist/esm/plugins/text-color/index.js +2 -6
- package/dist/esm/plugins/text-color/ui/ToolbarTextColor/index.js +2 -5
- package/dist/esm/ui/ColorPickerButton/index.js +3 -4
- package/dist/esm/ui/ConfigPanel/Fields/ColorPicker.js +1 -11
- package/dist/esm/ui/ConfigPanel/Fields/Expand.js +1 -1
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/labs/next/presets/default.d.ts +44 -2
- package/dist/types/plugins/floating-toolbar/ui/ExtensionsPlaceholder.d.ts +2 -0
- package/dist/types/plugins/floating-toolbar/ui/Toolbar.d.ts +3 -1
- package/dist/types/plugins/media/toolbar/commands.d.ts +3 -1
- package/dist/types/plugins/media/ui/ImageBorder/index.d.ts +3 -4
- package/dist/types/plugins/media/ui/PixelEntry/types.d.ts +2 -0
- package/dist/types/plugins/text-color/index.d.ts +1 -2
- package/dist/types/plugins/text-color/ui/ToolbarTextColor/index.d.ts +0 -2
- package/dist/types/ui/ColorPickerButton/index.d.ts +1 -2
- package/dist/types/ui/ConfigPanel/Fields/Expand.d.ts +2 -2
- package/dist/types-ts4.5/labs/next/presets/default.d.ts +54 -0
- package/dist/types-ts4.5/plugins/floating-toolbar/ui/ExtensionsPlaceholder.d.ts +2 -0
- package/dist/types-ts4.5/plugins/floating-toolbar/ui/Toolbar.d.ts +3 -1
- package/dist/types-ts4.5/plugins/media/toolbar/commands.d.ts +3 -1
- package/dist/types-ts4.5/plugins/media/ui/ImageBorder/index.d.ts +3 -4
- package/dist/types-ts4.5/plugins/media/ui/PixelEntry/types.d.ts +2 -0
- package/dist/types-ts4.5/plugins/text-color/index.d.ts +0 -2
- package/dist/types-ts4.5/plugins/text-color/ui/ToolbarTextColor/index.d.ts +0 -2
- package/dist/types-ts4.5/ui/ColorPickerButton/index.d.ts +1 -2
- package/dist/types-ts4.5/ui/ConfigPanel/Fields/Expand.d.ts +2 -2
- package/package.json +6 -6
|
@@ -1,8 +1,12 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
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; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(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; }
|
|
1
4
|
import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
2
5
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
3
6
|
import { isNodeSelection, removeSelectedNode, safeInsert } from '@atlaskit/editor-prosemirror/utils';
|
|
7
|
+
import { getMediaInputResizeAnalyticsEvent } from '../utils/analytics';
|
|
4
8
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
5
|
-
import { removeMediaGroupNode } from './utils';
|
|
9
|
+
import { removeMediaGroupNode, getSelectedMediaSingle } from './utils';
|
|
6
10
|
import { currentMediaNodeWithPos } from '../utils/current-media-node';
|
|
7
11
|
export var DEFAULT_BORDER_COLOR = '#091e4224';
|
|
8
12
|
export var DEFAULT_BORDER_SIZE = 2;
|
|
@@ -190,4 +194,36 @@ export var setBorderMark = function setBorderMark(editorAnalyticsAPI) {
|
|
|
190
194
|
return true;
|
|
191
195
|
};
|
|
192
196
|
};
|
|
197
|
+
};
|
|
198
|
+
export var updateMediaSingleWidth = function updateMediaSingleWidth(editorAnalyticsAPI) {
|
|
199
|
+
return function (width, validation, layout) {
|
|
200
|
+
return function (state, dispatch) {
|
|
201
|
+
var selectedMediaSingleNode = getSelectedMediaSingle(state);
|
|
202
|
+
if (!selectedMediaSingleNode) {
|
|
203
|
+
return false;
|
|
204
|
+
}
|
|
205
|
+
var tr = state.tr.setNodeMarkup(selectedMediaSingleNode.pos, undefined, _objectSpread(_objectSpread({}, selectedMediaSingleNode.node.attrs), {}, {
|
|
206
|
+
width: width,
|
|
207
|
+
widthType: 'pixel',
|
|
208
|
+
layout: layout
|
|
209
|
+
}));
|
|
210
|
+
tr.setMeta('scrollIntoView', false);
|
|
211
|
+
tr.setSelection(NodeSelection.create(tr.doc, selectedMediaSingleNode.pos));
|
|
212
|
+
var $pos = state.doc.resolve(selectedMediaSingleNode.pos);
|
|
213
|
+
var parentNodeType = $pos ? $pos.parent.type.name : undefined;
|
|
214
|
+
var payload = getMediaInputResizeAnalyticsEvent('mediaSingle', {
|
|
215
|
+
width: width,
|
|
216
|
+
layout: layout,
|
|
217
|
+
validation: validation,
|
|
218
|
+
parentNode: parentNodeType
|
|
219
|
+
});
|
|
220
|
+
if (payload) {
|
|
221
|
+
editorAnalyticsAPI === null || editorAnalyticsAPI === void 0 ? void 0 : editorAnalyticsAPI.attachAnalyticsEvent(payload)(tr);
|
|
222
|
+
}
|
|
223
|
+
if (dispatch) {
|
|
224
|
+
dispatch(tr);
|
|
225
|
+
}
|
|
226
|
+
return true;
|
|
227
|
+
};
|
|
228
|
+
};
|
|
193
229
|
};
|
|
@@ -24,7 +24,7 @@ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
|
24
24
|
import { FilePreviewItem } from './filePreviewItem';
|
|
25
25
|
import { downloadMedia, getSelectedMediaSingle, removeMediaGroupNode, getPixelWidthOfElement, calcNewLayout, getMaxToolbarWidth } from './utils';
|
|
26
26
|
import { isVideo } from '../utils/media-single';
|
|
27
|
-
import { changeInlineToMediaCard, changeMediaCardToInline, removeInlineCard, setBorderMark, toggleBorderMark } from './commands';
|
|
27
|
+
import { changeInlineToMediaCard, changeMediaCardToInline, removeInlineCard, setBorderMark, toggleBorderMark, updateMediaSingleWidth } from './commands';
|
|
28
28
|
import { MediaInlineNodeSelector, MediaSingleNodeSelector } from '../nodeviews/styles';
|
|
29
29
|
import ImageBorderItem from '../ui/ImageBorder';
|
|
30
30
|
import { currentMediaNodeBorderMark } from '../utils/current-media-node';
|
|
@@ -222,7 +222,6 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
222
222
|
var _pluginInjectionApi$a2;
|
|
223
223
|
setBorderMark(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$a2 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a2 === void 0 ? void 0 : _pluginInjectionApi$a2.actions)(attrs)(state, dispatch);
|
|
224
224
|
},
|
|
225
|
-
showSomewhatSemanticTooltips: getEditorFeatureFlags === null || getEditorFeatureFlags === void 0 ? void 0 : getEditorFeatureFlags().useSomewhatSemanticTextColorNames,
|
|
226
225
|
borderMark: borderMark,
|
|
227
226
|
intl: intl
|
|
228
227
|
});
|
|
@@ -305,15 +304,11 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
305
304
|
}
|
|
306
305
|
},
|
|
307
306
|
onSubmit: function onSubmit(_ref2) {
|
|
308
|
-
var
|
|
309
|
-
var
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
}));
|
|
314
|
-
tr.setMeta('scrollIntoView', false);
|
|
315
|
-
tr.setSelection(NodeSelection.create(tr.doc, selectedMediaSingleNode.pos));
|
|
316
|
-
dispatch(tr);
|
|
307
|
+
var _pluginInjectionApi$a4;
|
|
308
|
+
var width = _ref2.width,
|
|
309
|
+
validation = _ref2.validation;
|
|
310
|
+
var newLayout = calcNewLayout(width, layout, contentWidth, options.fullWidthEnabled);
|
|
311
|
+
updateMediaSingleWidth(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$a4 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a4 === void 0 ? void 0 : _pluginInjectionApi$a4.actions)(width, validation, newLayout)(state, dispatch);
|
|
317
312
|
},
|
|
318
313
|
onMigrate: function onMigrate() {
|
|
319
314
|
var tr = state.tr.setNodeMarkup(selectedMediaSingleNode.pos, undefined, _objectSpread(_objectSpread({}, selectedMediaSingleNode.node.attrs), {}, {
|
|
@@ -368,10 +363,10 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
368
363
|
};
|
|
369
364
|
var openLink = function openLink() {
|
|
370
365
|
if (editorView) {
|
|
371
|
-
var _pluginInjectionApi$
|
|
366
|
+
var _pluginInjectionApi$a5;
|
|
372
367
|
var tr = editorView.state.tr,
|
|
373
368
|
dispatch = editorView.dispatch;
|
|
374
|
-
pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$
|
|
369
|
+
pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$a5 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a5 === void 0 ? void 0 : _pluginInjectionApi$a5.actions.attachAnalyticsEvent({
|
|
375
370
|
eventType: EVENT_TYPE.TRACK,
|
|
376
371
|
action: ACTION.VISITED,
|
|
377
372
|
actionSubject: ACTION_SUBJECT.MEDIA,
|
|
@@ -397,8 +392,8 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
397
392
|
}
|
|
398
393
|
}
|
|
399
394
|
if (allowAltTextOnImages) {
|
|
400
|
-
var _pluginInjectionApi$
|
|
401
|
-
toolbarButtons.push(altTextButton(intl, state, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$
|
|
395
|
+
var _pluginInjectionApi$a6;
|
|
396
|
+
toolbarButtons.push(altTextButton(intl, state, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$a6 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a6 === void 0 ? void 0 : _pluginInjectionApi$a6.actions), {
|
|
402
397
|
type: 'separator'
|
|
403
398
|
});
|
|
404
399
|
}
|
|
@@ -482,22 +477,22 @@ export var floatingToolbar = function floatingToolbar(state, intl) {
|
|
|
482
477
|
selectedNodeType = state.selection.node.type;
|
|
483
478
|
}
|
|
484
479
|
if (allowMediaInline && (parentMediaGroupNode === null || parentMediaGroupNode === void 0 ? void 0 : parentMediaGroupNode.node.type) === mediaGroup) {
|
|
485
|
-
var _pluginInjectionApi$
|
|
480
|
+
var _pluginInjectionApi$a7;
|
|
486
481
|
var mediaOffset = state.selection.$from.parentOffset + 1;
|
|
487
482
|
baseToolbar.getDomRef = function () {
|
|
488
483
|
var _mediaPluginState$ele;
|
|
489
484
|
var selector = mediaFilmstripItemDOMSelector(mediaOffset);
|
|
490
485
|
return (_mediaPluginState$ele = mediaPluginState.element) === null || _mediaPluginState$ele === void 0 ? void 0 : _mediaPluginState$ele.querySelector(selector);
|
|
491
486
|
};
|
|
492
|
-
items = generateMediaCardFloatingToolbar(state, intl, mediaPluginState, hoverDecoration, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$
|
|
487
|
+
items = generateMediaCardFloatingToolbar(state, intl, mediaPluginState, hoverDecoration, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$a7 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a7 === void 0 ? void 0 : _pluginInjectionApi$a7.actions);
|
|
493
488
|
} else if (allowMediaInline && selectedNodeType && selectedNodeType === mediaInline) {
|
|
494
|
-
var _pluginInjectionApi$
|
|
489
|
+
var _pluginInjectionApi$a8;
|
|
495
490
|
baseToolbar.getDomRef = function () {
|
|
496
491
|
var _mediaPluginState$ele2;
|
|
497
492
|
var element = (_mediaPluginState$ele2 = mediaPluginState.element) === null || _mediaPluginState$ele2 === void 0 ? void 0 : _mediaPluginState$ele2.querySelector(".".concat(MediaInlineNodeSelector));
|
|
498
493
|
return element || mediaPluginState.element;
|
|
499
494
|
};
|
|
500
|
-
items = generateMediaInlineFloatingToolbar(state, intl, mediaPluginState, hoverDecoration, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$
|
|
495
|
+
items = generateMediaInlineFloatingToolbar(state, intl, mediaPluginState, hoverDecoration, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$a8 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a8 === void 0 ? void 0 : _pluginInjectionApi$a8.actions);
|
|
501
496
|
} else {
|
|
502
497
|
baseToolbar.getDomRef = function () {
|
|
503
498
|
var _mediaPluginState$ele3;
|
|
@@ -17,7 +17,6 @@ import { messages } from './messages';
|
|
|
17
17
|
var ImageBorder = function ImageBorder(_ref) {
|
|
18
18
|
var formatMessage = _ref.intl.formatMessage,
|
|
19
19
|
toggleBorder = _ref.toggleBorder,
|
|
20
|
-
showSomewhatSemanticTooltips = _ref.showSomewhatSemanticTooltips,
|
|
21
20
|
borderMark = _ref.borderMark,
|
|
22
21
|
setBorder = _ref.setBorder;
|
|
23
22
|
var popupTarget = useRef(null);
|
|
@@ -78,8 +77,7 @@ var ImageBorder = function ImageBorder(_ref) {
|
|
|
78
77
|
paletteOptions: {
|
|
79
78
|
palette: borderColorPalette,
|
|
80
79
|
paletteColorTooltipMessages: borderPaletteTooltipMessages,
|
|
81
|
-
hexToPaletteColor: hexToEditorBorderPaletteColor
|
|
82
|
-
showSomewhatSemanticTooltips: showSomewhatSemanticTooltips
|
|
80
|
+
hexToPaletteColor: hexToEditorBorderPaletteColor
|
|
83
81
|
}
|
|
84
82
|
})))
|
|
85
83
|
}, {
|
|
@@ -49,25 +49,26 @@ export var PixelEntry = function PixelEntry(_ref) {
|
|
|
49
49
|
}
|
|
50
50
|
if (onSubmit) {
|
|
51
51
|
var widthToBeSumitted = data.inputWidth;
|
|
52
|
-
var
|
|
52
|
+
var validation = 'valid';
|
|
53
53
|
if (data.inputWidth < minWidth) {
|
|
54
54
|
widthToBeSumitted = minWidth;
|
|
55
|
-
|
|
55
|
+
validation = 'less-than-min';
|
|
56
56
|
}
|
|
57
57
|
if (data.inputWidth > maxWidth) {
|
|
58
58
|
widthToBeSumitted = maxWidth;
|
|
59
|
-
|
|
59
|
+
validation = 'greater-than-max';
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
// If user keeps submitting an invalid input, node width attribute will be updated with the same value
|
|
63
63
|
// and won't upadte the state in useEffect (since width is the same)
|
|
64
64
|
// Thus, we set the state here to always display the correct dimension
|
|
65
|
-
if (
|
|
65
|
+
if (validation !== 'valid') {
|
|
66
66
|
setComputedWidth(widthToBeSumitted);
|
|
67
67
|
setComputedHeight(Math.round(ratioWidth * widthToBeSumitted));
|
|
68
68
|
}
|
|
69
69
|
onSubmit({
|
|
70
|
-
width: widthToBeSumitted
|
|
70
|
+
width: widthToBeSumitted,
|
|
71
|
+
validation: validation
|
|
71
72
|
});
|
|
72
73
|
}
|
|
73
74
|
};
|
|
@@ -35,7 +35,7 @@ export var getMediaInputResizeAnalyticsEvent = function getMediaInputResizeAnaly
|
|
|
35
35
|
return {
|
|
36
36
|
action: ACTION.EDITED,
|
|
37
37
|
actionSubject: actionSubject,
|
|
38
|
-
actionSubjectId: ACTION_SUBJECT_ID.
|
|
38
|
+
actionSubjectId: ACTION_SUBJECT_ID.RESIZED,
|
|
39
39
|
attributes: {
|
|
40
40
|
width: width,
|
|
41
41
|
layout: layout,
|
|
@@ -620,7 +620,8 @@ export function handleMarkdown(markdownSlice, queueCardsFromChangedTr, from, to)
|
|
|
620
620
|
} else {
|
|
621
621
|
tr.replaceSelection(markdownSlice);
|
|
622
622
|
}
|
|
623
|
-
tr.
|
|
623
|
+
var textPosition = tr.doc.resolve(Math.min(pastesFrom + markdownSlice.size, tr.doc.content.size));
|
|
624
|
+
tr.setSelection(TextSelection.near(textPosition, -1));
|
|
624
625
|
queueCardsFromChangedTr === null || queueCardsFromChangedTr === void 0 ? void 0 : queueCardsFromChangedTr(state, tr, INPUT_METHOD.CLIPBOARD);
|
|
625
626
|
if (dispatch) {
|
|
626
627
|
dispatch(tr.scrollIntoView());
|
|
@@ -10,10 +10,7 @@ var pluginConfig = function pluginConfig(textColorConfig) {
|
|
|
10
10
|
return textColorConfig;
|
|
11
11
|
};
|
|
12
12
|
var textColorPlugin = function textColorPlugin(_ref) {
|
|
13
|
-
var
|
|
14
|
-
var textColorConfig = _ref.config,
|
|
15
|
-
api = _ref.api;
|
|
16
|
-
var featureFlags = (api === null || api === void 0 ? void 0 : (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 ? void 0 : _api$featureFlags.sharedState.currentState()) || {};
|
|
13
|
+
var textColorConfig = _ref.config;
|
|
17
14
|
return {
|
|
18
15
|
name: 'textColor',
|
|
19
16
|
marks: function marks() {
|
|
@@ -53,8 +50,7 @@ var textColorPlugin = function textColorPlugin(_ref) {
|
|
|
53
50
|
popupsBoundariesElement: popupsBoundariesElement,
|
|
54
51
|
popupsScrollableElement: popupsScrollableElement,
|
|
55
52
|
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
56
|
-
disabled: disabled
|
|
57
|
-
featureFlags: featureFlags
|
|
53
|
+
disabled: disabled
|
|
58
54
|
});
|
|
59
55
|
}
|
|
60
56
|
});
|
|
@@ -158,11 +158,9 @@ export var ToolbarTextColor = /*#__PURE__*/function (_React$Component) {
|
|
|
158
158
|
isReducedSpacing = _this$props.isReducedSpacing,
|
|
159
159
|
pluginState = _this$props.pluginState,
|
|
160
160
|
formatMessage = _this$props.intl.formatMessage,
|
|
161
|
-
disabled = _this$props.disabled
|
|
162
|
-
featureFlags = _this$props.featureFlags;
|
|
161
|
+
disabled = _this$props.disabled;
|
|
163
162
|
var labelTextColor = formatMessage(messages.textColor);
|
|
164
163
|
var palette = pluginState.palette;
|
|
165
|
-
var useSomewhatSemanticTextColorNames = featureFlags.useSomewhatSemanticTextColorNames;
|
|
166
164
|
var fitWidth;
|
|
167
165
|
if (document.body.clientWidth <= 740) {
|
|
168
166
|
// This was originally hard-coded, but moved here to a const
|
|
@@ -229,8 +227,7 @@ export var ToolbarTextColor = /*#__PURE__*/function (_React$Component) {
|
|
|
229
227
|
paletteOptions: {
|
|
230
228
|
palette: palette,
|
|
231
229
|
hexToPaletteColor: hexToEditorTextPaletteColor,
|
|
232
|
-
paletteColorTooltipMessages: textPaletteTooltipMessages
|
|
233
|
-
showSomewhatSemanticTooltips: useSomewhatSemanticTextColorNames
|
|
230
|
+
paletteColorTooltipMessages: textPaletteTooltipMessages
|
|
234
231
|
}
|
|
235
232
|
}))), jsx("span", {
|
|
236
233
|
css: separatorStyles
|
|
@@ -21,16 +21,16 @@ import ExpandIcon from '@atlaskit/icon/glyph/chevron-down';
|
|
|
21
21
|
|
|
22
22
|
// helps adjusts position of popup
|
|
23
23
|
var colorPickerButtonWrapper = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n"])));
|
|
24
|
-
var colorPickerExpandContainer = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin: 0px
|
|
24
|
+
var colorPickerExpandContainer = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin: 0px ", ";\n"])), "var(--ds-space-negative-050, -4px)");
|
|
25
25
|
|
|
26
26
|
// Control the size of color picker buttons and preview
|
|
27
27
|
// TODO: https://product-fabric.atlassian.net/browse/DSP-4134
|
|
28
28
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
29
29
|
var colorPickerWrapper = function colorPickerWrapper(theme) {
|
|
30
|
-
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n border-radius: ", "px;\n background-color: ", ";\n box-shadow: 0 4px 8px -2px ", ", 0 0 1px ", ";\n padding:
|
|
30
|
+
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n border-radius: ", "px;\n background-color: ", ";\n box-shadow: 0 4px 8px -2px ", ", 0 0 1px ", ";\n padding: ", " 0px;\n"])), borderRadius(), themed({
|
|
31
31
|
light: "var(--ds-surface-overlay, ".concat(N0, ")"),
|
|
32
32
|
dark: "var(--ds-surface-overlay, ".concat(DN50, ")")
|
|
33
|
-
})(theme), N60A, N60A);
|
|
33
|
+
})(theme), N60A, N60A, "var(--ds-space-100, 8px)");
|
|
34
34
|
};
|
|
35
35
|
/* eslint-enable @atlaskit/design-system/ensure-design-token-usage */
|
|
36
36
|
|
|
@@ -154,7 +154,6 @@ var ColorPickerButton = function ColorPickerButton(props) {
|
|
|
154
154
|
paletteOptions: {
|
|
155
155
|
palette: props.colorPalette,
|
|
156
156
|
hexToPaletteColor: props.hexToPaletteColor,
|
|
157
|
-
showSomewhatSemanticTooltips: props.showSomewhatSemanticTooltips,
|
|
158
157
|
paletteColorTooltipMessages: props.paletteColorTooltipMessages
|
|
159
158
|
}
|
|
160
159
|
}))));
|
|
@@ -338,25 +338,15 @@ var ColorPicker = function ColorPicker(props) {
|
|
|
338
338
|
onFieldChange(name, currentColor !== colorValue);
|
|
339
339
|
};
|
|
340
340
|
var _ref = featureFlags !== null && featureFlags !== void 0 ? featureFlags : {
|
|
341
|
-
useSomewhatSemanticTextColorNames: false,
|
|
342
341
|
expandedChartColors: false
|
|
343
342
|
},
|
|
344
|
-
useSomewhatSemanticTextColorNames = _ref.useSomewhatSemanticTextColorNames,
|
|
345
343
|
expandedChartColors = _ref.expandedChartColors;
|
|
346
344
|
return expandedChartColors ? jsx(ColorPickerButton, {
|
|
347
345
|
title: title,
|
|
348
346
|
currentColor: currentColor,
|
|
349
347
|
onChange: onColorChange,
|
|
350
348
|
colorPalette: extendedColorPalette,
|
|
351
|
-
paletteColorTooltipMessages: chartsColorPaletteTooltipMessages
|
|
352
|
-
// We did not want to create new FF or update
|
|
353
|
-
// useSomewhatSemanticTextColorNames name
|
|
354
|
-
// because it is temporary and require extra work.
|
|
355
|
-
// So even though it says text color names,
|
|
356
|
-
// we are going to use for all color pickers
|
|
357
|
-
// such as text, background and table charts.
|
|
358
|
-
,
|
|
359
|
-
showSomewhatSemanticTooltips: useSomewhatSemanticTextColorNames,
|
|
349
|
+
paletteColorTooltipMessages: chartsColorPaletteTooltipMessages,
|
|
360
350
|
cols: EXPANDED_COLOR_PICKER_COLUMNS,
|
|
361
351
|
alignX: "right",
|
|
362
352
|
placement: "ConfigPanel",
|
|
@@ -15,7 +15,7 @@ export var expandControl = css(_templateObject2 || (_templateObject2 = _taggedTe
|
|
|
15
15
|
var chevronContainer = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n\n & > button {\n width: ", ";\n height: ", ";\n }\n"])), "var(--ds-space-300, 24px)", "var(--ds-space-300, 24px)");
|
|
16
16
|
var labelContainer = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n width: 100%;\n align-items: center;\n display: flex;\n font-weight: 500;\n"])));
|
|
17
17
|
var expandContentContainer = function expandContentContainer(isHidden) {
|
|
18
|
-
return css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n display: ", ";\n margin-top:
|
|
18
|
+
return css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n display: ", ";\n margin-top: ", ";\n"])), isHidden ? 'none' : 'block', "var(--ds-space-negative-100, -8px)");
|
|
19
19
|
};
|
|
20
20
|
function Expand(_ref) {
|
|
21
21
|
var field = _ref.field,
|
|
@@ -78,7 +78,28 @@ export declare function createDefaultPreset(options: EditorPresetProps & Default
|
|
|
78
78
|
actions: {
|
|
79
79
|
applyChange: (tr: import("prosemirror-state").Transaction) => import("prosemirror-state").Transaction;
|
|
80
80
|
};
|
|
81
|
-
}, undefined>>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"
|
|
81
|
+
}, undefined>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"extension", {
|
|
82
|
+
pluginConfiguration: import("@atlaskit/editor-plugin-extension").ExtensionPluginOptions | undefined;
|
|
83
|
+
dependencies: [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
84
|
+
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
85
|
+
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
86
|
+
}, import("@atlaskit/editor-common/types").FeatureFlags>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"width", {
|
|
87
|
+
sharedState: import("@atlaskit/editor-common/types").EditorContainerWidth | undefined;
|
|
88
|
+
}, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"decorations", {
|
|
89
|
+
sharedState: import("@atlaskit/editor-plugin-decorations").DecorationState;
|
|
90
|
+
actions: {
|
|
91
|
+
hoverDecoration: (nodeType: import("prosemirror-model").NodeType | import("prosemirror-model").NodeType[], add: boolean, className?: string | undefined) => import("@atlaskit/editor-common/types").Command;
|
|
92
|
+
removeDecoration: import("@atlaskit/editor-common/types").Command;
|
|
93
|
+
};
|
|
94
|
+
}, undefined>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"contextPanel", {
|
|
95
|
+
actions: {
|
|
96
|
+
applyChange: (tr: import("prosemirror-state").Transaction) => import("prosemirror-state").Transaction;
|
|
97
|
+
};
|
|
98
|
+
}, undefined>>];
|
|
99
|
+
actions: {
|
|
100
|
+
api: () => import("@atlaskit/editor-common/extensions").ExtensionAPI<import("@atlaskit/editor-common/extensions").Parameters>;
|
|
101
|
+
};
|
|
102
|
+
}, import("@atlaskit/editor-plugin-extension").ExtensionPluginOptions | undefined>>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"editorDisabled", {
|
|
82
103
|
sharedState: import("@atlaskit/editor-plugin-editor-disabled").EditorDisabledPluginState;
|
|
83
104
|
}, undefined>];
|
|
84
105
|
actions: {
|
|
@@ -233,7 +254,28 @@ export declare function useDefaultPreset(props: EditorPresetProps & DefaultPrese
|
|
|
233
254
|
actions: {
|
|
234
255
|
applyChange: (tr: import("prosemirror-state").Transaction) => import("prosemirror-state").Transaction;
|
|
235
256
|
};
|
|
236
|
-
}, undefined>>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"
|
|
257
|
+
}, undefined>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"extension", {
|
|
258
|
+
pluginConfiguration: import("@atlaskit/editor-plugin-extension").ExtensionPluginOptions | undefined;
|
|
259
|
+
dependencies: [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
260
|
+
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
261
|
+
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
262
|
+
}, import("@atlaskit/editor-common/types").FeatureFlags>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"width", {
|
|
263
|
+
sharedState: import("@atlaskit/editor-common/types").EditorContainerWidth | undefined;
|
|
264
|
+
}, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"decorations", {
|
|
265
|
+
sharedState: import("@atlaskit/editor-plugin-decorations").DecorationState;
|
|
266
|
+
actions: {
|
|
267
|
+
hoverDecoration: (nodeType: import("prosemirror-model").NodeType | import("prosemirror-model").NodeType[], add: boolean, className?: string | undefined) => import("@atlaskit/editor-common/types").Command;
|
|
268
|
+
removeDecoration: import("@atlaskit/editor-common/types").Command;
|
|
269
|
+
};
|
|
270
|
+
}, undefined>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"contextPanel", {
|
|
271
|
+
actions: {
|
|
272
|
+
applyChange: (tr: import("prosemirror-state").Transaction) => import("prosemirror-state").Transaction;
|
|
273
|
+
};
|
|
274
|
+
}, undefined>>];
|
|
275
|
+
actions: {
|
|
276
|
+
api: () => import("@atlaskit/editor-common/extensions").ExtensionAPI<import("@atlaskit/editor-common/extensions").Parameters>;
|
|
277
|
+
};
|
|
278
|
+
}, import("@atlaskit/editor-plugin-extension").ExtensionPluginOptions | undefined>>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"editorDisabled", {
|
|
237
279
|
sharedState: import("@atlaskit/editor-plugin-editor-disabled").EditorDisabledPluginState;
|
|
238
280
|
}, undefined>];
|
|
239
281
|
actions: {
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
3
3
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
4
4
|
import type { ExtensionProvider } from '@atlaskit/editor-common/extensions';
|
|
5
|
+
import type { ExtensionAPI } from '@atlaskit/editor-common/extensions';
|
|
5
6
|
import type { ApplyChangeHandler } from '@atlaskit/editor-plugin-context-panel';
|
|
6
7
|
interface Props {
|
|
7
8
|
node: PMNode;
|
|
@@ -9,6 +10,7 @@ interface Props {
|
|
|
9
10
|
editorView: EditorView;
|
|
10
11
|
separator?: 'start' | 'end' | 'both';
|
|
11
12
|
applyChangeToContextPanel: ApplyChangeHandler | undefined;
|
|
13
|
+
extensionApi: ExtensionAPI | undefined;
|
|
12
14
|
}
|
|
13
15
|
export declare const ExtensionsPlaceholder: (props: Props) => JSX.Element | null;
|
|
14
16
|
export {};
|
|
@@ -9,6 +9,7 @@ import type { WrappedComponentProps } from 'react-intl-next';
|
|
|
9
9
|
import type { FloatingToolbarItem, FeatureFlags, PluginInjectionAPIWithDependencies, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
10
10
|
import type { decorationsPlugin } from '@atlaskit/editor-plugin-decorations';
|
|
11
11
|
import type { contextPanelPlugin } from '@atlaskit/editor-plugin-context-panel';
|
|
12
|
+
import type { ExtensionPlugin } from '@atlaskit/editor-plugin-extension';
|
|
12
13
|
export type Item = FloatingToolbarItem<Function>;
|
|
13
14
|
export interface Props {
|
|
14
15
|
items: Array<Item>;
|
|
@@ -28,7 +29,8 @@ export interface Props {
|
|
|
28
29
|
featureFlags: FeatureFlags;
|
|
29
30
|
api: PluginInjectionAPIWithDependencies<[
|
|
30
31
|
typeof decorationsPlugin,
|
|
31
|
-
OptionalPlugin<typeof contextPanelPlugin
|
|
32
|
+
OptionalPlugin<typeof contextPanelPlugin>,
|
|
33
|
+
OptionalPlugin<ExtensionPlugin>
|
|
32
34
|
]> | undefined;
|
|
33
35
|
}
|
|
34
36
|
export declare const isSameItem: (leftItem: Item, rightItem: Item) => boolean;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type { BorderMarkAttributes } from '@atlaskit/adf-schema';
|
|
1
|
+
import type { BorderMarkAttributes, RichMediaLayout } from '@atlaskit/adf-schema';
|
|
2
2
|
import type { Command } from '../../../types';
|
|
3
|
+
import type { PixelEntryValidation } from '../ui/PixelEntry/types';
|
|
3
4
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
4
5
|
export declare const DEFAULT_BORDER_COLOR = "#091e4224";
|
|
5
6
|
export declare const DEFAULT_BORDER_SIZE = 2;
|
|
@@ -8,3 +9,4 @@ export declare const changeMediaCardToInline: (editorAnalyticsAPI: EditorAnalyti
|
|
|
8
9
|
export declare const removeInlineCard: Command;
|
|
9
10
|
export declare const toggleBorderMark: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => Command;
|
|
10
11
|
export declare const setBorderMark: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (attrs: Partial<BorderMarkAttributes>) => Command;
|
|
12
|
+
export declare const updateMediaSingleWidth: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (width: number, validation: PixelEntryValidation, layout: RichMediaLayout) => Command;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { jsx } from '@emotion/react';
|
|
3
|
-
import { IntlShape } from 'react-intl-next';
|
|
4
|
-
import { BorderMarkAttributes } from '@atlaskit/adf-schema';
|
|
3
|
+
import type { IntlShape } from 'react-intl-next';
|
|
4
|
+
import type { BorderMarkAttributes } from '@atlaskit/adf-schema';
|
|
5
5
|
export interface ImageBorderProps {
|
|
6
6
|
intl: IntlShape;
|
|
7
7
|
toggleBorder: () => void;
|
|
8
8
|
borderMark?: BorderMarkAttributes;
|
|
9
|
-
showSomewhatSemanticTooltips?: boolean;
|
|
10
9
|
setBorder: (attrs: Partial<BorderMarkAttributes>) => void;
|
|
11
10
|
}
|
|
12
|
-
declare const ImageBorder: ({ intl: { formatMessage }, toggleBorder,
|
|
11
|
+
declare const ImageBorder: ({ intl: { formatMessage }, toggleBorder, borderMark, setBorder, }: ImageBorderProps) => jsx.JSX.Element;
|
|
13
12
|
export default ImageBorder;
|
|
@@ -51,6 +51,8 @@ export type PixelEntryFormValues = {
|
|
|
51
51
|
inputWidth: number | '';
|
|
52
52
|
inputHeight: number | '';
|
|
53
53
|
};
|
|
54
|
+
export type PixelEntryValidation = 'valid' | 'greater-than-max' | 'less-than-min';
|
|
54
55
|
export type PixelEntryFormData = {
|
|
55
56
|
width: number;
|
|
57
|
+
validation: PixelEntryValidation;
|
|
56
58
|
};
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
2
|
-
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
3
2
|
import type { TextColorPluginConfig, TextColorPluginState } from './pm-plugins/main';
|
|
4
3
|
import { pluginKey as textColorPluginKey } from './pm-plugins/main';
|
|
5
4
|
type Config = TextColorPluginConfig | boolean;
|
|
6
5
|
declare const textColorPlugin: NextEditorPlugin<'textColor', {
|
|
7
6
|
pluginConfiguration: Config | undefined;
|
|
8
|
-
dependencies: [
|
|
7
|
+
dependencies: [];
|
|
9
8
|
}>;
|
|
10
9
|
export { textColorPluginKey };
|
|
11
10
|
export type { TextColorPluginState };
|
|
@@ -5,7 +5,6 @@ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
|
5
5
|
import type { WrappedComponentProps } from 'react-intl-next';
|
|
6
6
|
import type { DispatchAnalyticsEvent } from '../../../analytics';
|
|
7
7
|
import type { TextColorPluginState } from '../../pm-plugins/main';
|
|
8
|
-
import type { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
9
8
|
export declare const messages: {
|
|
10
9
|
textColor: {
|
|
11
10
|
id: string;
|
|
@@ -26,7 +25,6 @@ export interface Props {
|
|
|
26
25
|
isReducedSpacing?: boolean;
|
|
27
26
|
dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
|
|
28
27
|
disabled?: boolean;
|
|
29
|
-
featureFlags: FeatureFlags;
|
|
30
28
|
}
|
|
31
29
|
export declare class ToolbarTextColor extends React.Component<Props & WrappedComponentProps, State> {
|
|
32
30
|
state: State;
|
|
@@ -17,7 +17,6 @@ type Props = WithAnalyticsEventsProps & {
|
|
|
17
17
|
mountPoint?: HTMLElement;
|
|
18
18
|
setDisableParentScroll?: (disable: boolean) => void;
|
|
19
19
|
hexToPaletteColor?: (hexColor: string) => string | undefined;
|
|
20
|
-
showSomewhatSemanticTooltips?: boolean;
|
|
21
20
|
paletteColorTooltipMessages?: PaletteTooltipMessages;
|
|
22
21
|
/**
|
|
23
22
|
* After picking the color the default behaviour is to focus the color picker button.
|
|
@@ -25,5 +24,5 @@ type Props = WithAnalyticsEventsProps & {
|
|
|
25
24
|
*/
|
|
26
25
|
skipFocusButtonAfterPick?: boolean;
|
|
27
26
|
};
|
|
28
|
-
declare const _default: React.ForwardRefExoticComponent<Pick<Omit<Props, keyof WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "title" | "key" | "onChange" | "size" | "cols" | "analyticsContext" | "currentColor" | "alignX" | "colorPalette" | "placement" | "mountPoint" | "setDisableParentScroll" | "hexToPaletteColor" | "
|
|
27
|
+
declare const _default: React.ForwardRefExoticComponent<Pick<Omit<Props, keyof WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "title" | "key" | "onChange" | "size" | "cols" | "analyticsContext" | "currentColor" | "alignX" | "colorPalette" | "placement" | "mountPoint" | "setDisableParentScroll" | "hexToPaletteColor" | "paletteColorTooltipMessages" | "skipFocusButtonAfterPick"> & React.RefAttributes<any>>;
|
|
29
28
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { WrappedComponentProps } from 'react-intl-next';
|
|
4
|
-
import { FieldDefinition } from '@atlaskit/editor-common/extensions';
|
|
3
|
+
import type { WrappedComponentProps } from 'react-intl-next';
|
|
4
|
+
import type { FieldDefinition } from '@atlaskit/editor-common/extensions';
|
|
5
5
|
export declare const expandContainer: import("@emotion/react").SerializedStyles;
|
|
6
6
|
export declare const expandControl: import("@emotion/react").SerializedStyles;
|
|
7
7
|
declare const _default: React.FC<import("react-intl-next").WithIntlProps<{
|
|
@@ -106,6 +106,33 @@ export declare function createDefaultPreset(options: EditorPresetProps & Default
|
|
|
106
106
|
applyChange: (tr: import("prosemirror-state").Transaction) => import("prosemirror-state").Transaction;
|
|
107
107
|
};
|
|
108
108
|
}, undefined>>,
|
|
109
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"extension", {
|
|
110
|
+
pluginConfiguration: import("@atlaskit/editor-plugin-extension").ExtensionPluginOptions | undefined;
|
|
111
|
+
dependencies: [
|
|
112
|
+
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
113
|
+
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
114
|
+
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
115
|
+
}, import("@atlaskit/editor-common/types").FeatureFlags>,
|
|
116
|
+
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"width", {
|
|
117
|
+
sharedState: import("@atlaskit/editor-common/types").EditorContainerWidth | undefined;
|
|
118
|
+
}, undefined>,
|
|
119
|
+
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"decorations", {
|
|
120
|
+
sharedState: import("@atlaskit/editor-plugin-decorations").DecorationState;
|
|
121
|
+
actions: {
|
|
122
|
+
hoverDecoration: (nodeType: import("prosemirror-model").NodeType | import("prosemirror-model").NodeType[], add: boolean, className?: string | undefined) => import("@atlaskit/editor-common/types").Command;
|
|
123
|
+
removeDecoration: import("@atlaskit/editor-common/types").Command;
|
|
124
|
+
};
|
|
125
|
+
}, undefined>,
|
|
126
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"contextPanel", {
|
|
127
|
+
actions: {
|
|
128
|
+
applyChange: (tr: import("prosemirror-state").Transaction) => import("prosemirror-state").Transaction;
|
|
129
|
+
};
|
|
130
|
+
}, undefined>>
|
|
131
|
+
];
|
|
132
|
+
actions: {
|
|
133
|
+
api: () => import("@atlaskit/editor-common/extensions").ExtensionAPI<import("@atlaskit/editor-common/extensions").Parameters>;
|
|
134
|
+
};
|
|
135
|
+
}, import("@atlaskit/editor-plugin-extension").ExtensionPluginOptions | undefined>>,
|
|
109
136
|
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"editorDisabled", {
|
|
110
137
|
sharedState: import("@atlaskit/editor-plugin-editor-disabled").EditorDisabledPluginState;
|
|
111
138
|
}, undefined>
|
|
@@ -315,6 +342,33 @@ export declare function useDefaultPreset(props: EditorPresetProps & DefaultPrese
|
|
|
315
342
|
applyChange: (tr: import("prosemirror-state").Transaction) => import("prosemirror-state").Transaction;
|
|
316
343
|
};
|
|
317
344
|
}, undefined>>,
|
|
345
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"extension", {
|
|
346
|
+
pluginConfiguration: import("@atlaskit/editor-plugin-extension").ExtensionPluginOptions | undefined;
|
|
347
|
+
dependencies: [
|
|
348
|
+
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
349
|
+
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
350
|
+
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
351
|
+
}, import("@atlaskit/editor-common/types").FeatureFlags>,
|
|
352
|
+
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"width", {
|
|
353
|
+
sharedState: import("@atlaskit/editor-common/types").EditorContainerWidth | undefined;
|
|
354
|
+
}, undefined>,
|
|
355
|
+
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"decorations", {
|
|
356
|
+
sharedState: import("@atlaskit/editor-plugin-decorations").DecorationState;
|
|
357
|
+
actions: {
|
|
358
|
+
hoverDecoration: (nodeType: import("prosemirror-model").NodeType | import("prosemirror-model").NodeType[], add: boolean, className?: string | undefined) => import("@atlaskit/editor-common/types").Command;
|
|
359
|
+
removeDecoration: import("@atlaskit/editor-common/types").Command;
|
|
360
|
+
};
|
|
361
|
+
}, undefined>,
|
|
362
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"contextPanel", {
|
|
363
|
+
actions: {
|
|
364
|
+
applyChange: (tr: import("prosemirror-state").Transaction) => import("prosemirror-state").Transaction;
|
|
365
|
+
};
|
|
366
|
+
}, undefined>>
|
|
367
|
+
];
|
|
368
|
+
actions: {
|
|
369
|
+
api: () => import("@atlaskit/editor-common/extensions").ExtensionAPI<import("@atlaskit/editor-common/extensions").Parameters>;
|
|
370
|
+
};
|
|
371
|
+
}, import("@atlaskit/editor-plugin-extension").ExtensionPluginOptions | undefined>>,
|
|
318
372
|
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"editorDisabled", {
|
|
319
373
|
sharedState: import("@atlaskit/editor-plugin-editor-disabled").EditorDisabledPluginState;
|
|
320
374
|
}, undefined>
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
3
3
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
4
4
|
import type { ExtensionProvider } from '@atlaskit/editor-common/extensions';
|
|
5
|
+
import type { ExtensionAPI } from '@atlaskit/editor-common/extensions';
|
|
5
6
|
import type { ApplyChangeHandler } from '@atlaskit/editor-plugin-context-panel';
|
|
6
7
|
interface Props {
|
|
7
8
|
node: PMNode;
|
|
@@ -9,6 +10,7 @@ interface Props {
|
|
|
9
10
|
editorView: EditorView;
|
|
10
11
|
separator?: 'start' | 'end' | 'both';
|
|
11
12
|
applyChangeToContextPanel: ApplyChangeHandler | undefined;
|
|
13
|
+
extensionApi: ExtensionAPI | undefined;
|
|
12
14
|
}
|
|
13
15
|
export declare const ExtensionsPlaceholder: (props: Props) => JSX.Element | null;
|
|
14
16
|
export {};
|