@atlaskit/editor-core 187.16.0 → 187.17.0
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 +16 -0
- package/dist/cjs/create-editor/feature-flags-from-props.js +23 -25
- package/dist/cjs/plugins/base/index.js +0 -8
- package/dist/cjs/plugins/better-type-history/index.js +34 -0
- package/dist/cjs/plugins/{base/pm-plugins/better-type-history.js → better-type-history/pm-plugins/main.js} +4 -5
- package/dist/cjs/plugins/better-type-history/pm-plugins/plugin-key.js +9 -0
- package/dist/cjs/plugins/index.js +7 -0
- package/dist/cjs/plugins/media/nodeviews/mediaSingle.js +2 -2
- package/dist/cjs/plugins/media/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +4 -14
- package/dist/cjs/plugins/paste/pm-plugins/main.js +7 -7
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/create-editor/feature-flags-from-props.js +23 -25
- package/dist/es2019/plugins/base/index.js +0 -7
- package/dist/es2019/plugins/better-type-history/index.js +24 -0
- package/dist/es2019/plugins/{base/pm-plugins/better-type-history.js → better-type-history/pm-plugins/main.js} +1 -2
- package/dist/es2019/plugins/better-type-history/pm-plugins/plugin-key.js +2 -0
- package/dist/es2019/plugins/index.js +1 -0
- package/dist/es2019/plugins/media/nodeviews/mediaSingle.js +2 -2
- package/dist/es2019/plugins/media/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +2 -14
- package/dist/es2019/plugins/paste/pm-plugins/main.js +7 -7
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/create-editor/feature-flags-from-props.js +23 -25
- package/dist/esm/plugins/base/index.js +0 -8
- package/dist/esm/plugins/better-type-history/index.js +26 -0
- package/dist/esm/plugins/{base/pm-plugins/better-type-history.js → better-type-history/pm-plugins/main.js} +1 -2
- package/dist/esm/plugins/better-type-history/pm-plugins/plugin-key.js +2 -0
- package/dist/esm/plugins/index.js +1 -0
- package/dist/esm/plugins/media/nodeviews/mediaSingle.js +2 -2
- package/dist/esm/plugins/media/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +3 -13
- package/dist/esm/plugins/paste/pm-plugins/main.js +7 -7
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/plugins/better-type-history/index.d.ts +13 -0
- package/dist/types/plugins/{base/pm-plugins/better-type-history.d.ts → better-type-history/pm-plugins/main.d.ts} +0 -2
- package/dist/types/plugins/better-type-history/pm-plugins/plugin-key.d.ts +2 -0
- package/dist/types/plugins/index.d.ts +1 -0
- package/dist/types/plugins/media/ui/ResizableMediaSingle/ResizableMediaSingleNext.d.ts +2 -7
- package/dist/types/plugins/paste/index.d.ts +4 -2
- package/dist/types-ts4.5/plugins/better-type-history/index.d.ts +13 -0
- package/dist/types-ts4.5/plugins/{base/pm-plugins/better-type-history.d.ts → better-type-history/pm-plugins/main.d.ts} +0 -2
- package/dist/types-ts4.5/plugins/better-type-history/pm-plugins/plugin-key.d.ts +2 -0
- package/dist/types-ts4.5/plugins/index.d.ts +1 -0
- package/dist/types-ts4.5/plugins/media/ui/ResizableMediaSingle/ResizableMediaSingleNext.d.ts +2 -7
- package/dist/types-ts4.5/plugins/paste/index.d.ts +4 -2
- package/package.json +1 -1
- package/report.api.md +1 -1
- package/tmp/api-report-tmp.d.ts +1 -1
- package/dist/cjs/plugins/media/ui/ResizableMediaSingle/resizable-media-single-messages.js +0 -15
- package/dist/cjs/ui/Resizer/ResizeLabel/index.js +0 -20
- package/dist/cjs/ui/Resizer/ResizeLabel/styles.js +0 -17
- package/dist/es2019/plugins/media/ui/ResizableMediaSingle/resizable-media-single-messages.js +0 -8
- package/dist/es2019/ui/Resizer/ResizeLabel/index.js +0 -12
- package/dist/es2019/ui/Resizer/ResizeLabel/styles.js +0 -25
- package/dist/esm/plugins/media/ui/ResizableMediaSingle/resizable-media-single-messages.js +0 -8
- package/dist/esm/ui/Resizer/ResizeLabel/index.js +0 -12
- package/dist/esm/ui/Resizer/ResizeLabel/styles.js +0 -7
- package/dist/types/plugins/media/ui/ResizableMediaSingle/resizable-media-single-messages.d.ts +0 -7
- package/dist/types/ui/Resizer/ResizeLabel/index.d.ts +0 -8
- package/dist/types/ui/Resizer/ResizeLabel/styles.d.ts +0 -3
- package/dist/types-ts4.5/plugins/media/ui/ResizableMediaSingle/resizable-media-single-messages.d.ts +0 -7
- package/dist/types-ts4.5/ui/Resizer/ResizeLabel/index.d.ts +0 -8
- package/dist/types-ts4.5/ui/Resizer/ResizeLabel/styles.d.ts +0 -3
|
@@ -302,7 +302,7 @@ export default class MediaSingleNode extends Component {
|
|
|
302
302
|
gutterOffset: MEDIA_SINGLE_GUTTER_SIZE
|
|
303
303
|
})
|
|
304
304
|
};
|
|
305
|
-
const
|
|
305
|
+
const resizableMediaSingleProps = {
|
|
306
306
|
view: view,
|
|
307
307
|
getPos: getPos,
|
|
308
308
|
updateSize: this.updateSize,
|
|
@@ -339,7 +339,7 @@ export default class MediaSingleNode extends Component {
|
|
|
339
339
|
ref: this.captionPlaceHolderRef,
|
|
340
340
|
onClick: this.clickPlaceholder
|
|
341
341
|
}));
|
|
342
|
-
return canResize ? getBooleanFF('platform.editor.media.extended-resize-experience') ? jsx(ResizableMediaSingleNext,
|
|
342
|
+
return canResize ? getBooleanFF('platform.editor.media.extended-resize-experience') ? jsx(ResizableMediaSingleNext, resizableMediaSingleProps, MediaChildren) : jsx(ResizableMediaSingle, _extends({}, resizableMediaSingleProps, {
|
|
343
343
|
lineLength: contentWidthForLegacyExperience
|
|
344
344
|
}), MediaChildren) : jsx(MediaSingle, mediaSingleProps, MediaChildren);
|
|
345
345
|
}
|
|
@@ -9,9 +9,6 @@ import { nonWrappedLayouts, setNodeSelection } from '@atlaskit/editor-common/uti
|
|
|
9
9
|
import { akEditorFullWidthLayoutWidth, akEditorGutterPadding, akEditorDefaultLayoutWidth } from '@atlaskit/editor-shared-styles';
|
|
10
10
|
import { wrapperStyle } from './styled';
|
|
11
11
|
import { ResizerNext } from '@atlaskit/editor-common/resizer';
|
|
12
|
-
import ResizeLabel from '../../../../ui/Resizer/ResizeLabel';
|
|
13
|
-
import { injectIntl } from 'react-intl-next';
|
|
14
|
-
import { messages } from './resizable-media-single-messages';
|
|
15
12
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
16
13
|
import classnames from 'classnames';
|
|
17
14
|
import { richMediaClassName, resizerStyles } from '@atlaskit/editor-common/styles';
|
|
@@ -391,7 +388,6 @@ class ResizableMediaSingleNext extends React.Component {
|
|
|
391
388
|
fullWidthMode,
|
|
392
389
|
selected,
|
|
393
390
|
children,
|
|
394
|
-
intl,
|
|
395
391
|
lineLength
|
|
396
392
|
} = this.props;
|
|
397
393
|
const {
|
|
@@ -414,8 +410,6 @@ class ResizableMediaSingleNext extends React.Component {
|
|
|
414
410
|
'rich-media-wrapped': layout === 'wrap-left' || layout === 'wrap-right'
|
|
415
411
|
});
|
|
416
412
|
const resizerNextClassName = classnames(className, resizerStyles);
|
|
417
|
-
const showSizeGuide = selected || isResizing;
|
|
418
|
-
const label = layout === 'full-width' ? intl.formatMessage(messages.fullWidthImage) : `${this.state.size.width} x ${this.state.size.height}`;
|
|
419
413
|
const maxWidth = this.calcMaxWidth(lineLength, containerWidth, fullWidthMode);
|
|
420
414
|
return jsx("div", {
|
|
421
415
|
ref: this.saveWrapper,
|
|
@@ -441,13 +435,7 @@ class ResizableMediaSingleNext extends React.Component {
|
|
|
441
435
|
snap: this.state.snaps,
|
|
442
436
|
resizeRatio: nonWrappedLayouts.includes(layout) ? 2 : 1,
|
|
443
437
|
"data-testid": resizerNextTestId
|
|
444
|
-
},
|
|
445
|
-
label: label,
|
|
446
|
-
containerWidth: this.state.size.width
|
|
447
|
-
}), children));
|
|
438
|
+
}, children));
|
|
448
439
|
}
|
|
449
440
|
}
|
|
450
|
-
|
|
451
|
-
// for testing purpose
|
|
452
|
-
export { ResizableMediaSingleNext as UnwrappedResizableMediaSingleNext };
|
|
453
|
-
export default injectIntl(ResizableMediaSingleNext);
|
|
441
|
+
export default ResizableMediaSingleNext;
|
|
@@ -21,7 +21,6 @@ import { upgradeTextToLists, splitParagraphs } from '../../list/transforms';
|
|
|
21
21
|
import { md } from '@atlaskit/editor-common/paste';
|
|
22
22
|
import { transformSliceToDecisionList } from '../../tasks-and-decisions/utils';
|
|
23
23
|
import { containsAnyAnnotations, stripNonExistingAnnotations } from '../../annotation/utils';
|
|
24
|
-
import { pluginKey as betterTypePluginKey } from '../../base/pm-plugins/better-type-history';
|
|
25
24
|
import { clipboardTextSerializer } from './clipboard-text-serializer';
|
|
26
25
|
import { htmlHasIncompleteTable, tryRebuildCompleteTableHtml, isPastedFromTinyMCEConfluence } from '../util/tinyMCE';
|
|
27
26
|
import { handlePaste as handlePasteTable } from '@atlaskit/editor-tables/utils';
|
|
@@ -178,8 +177,9 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
|
|
|
178
177
|
});
|
|
179
178
|
return tableExists;
|
|
180
179
|
});
|
|
181
|
-
if (!isPastingTextInsidePlaceholderText && !isPastingTable && !isPastingOverLayoutColumns) {
|
|
182
|
-
|
|
180
|
+
if (!isPastingTextInsidePlaceholderText && !isPastingTable && !isPastingOverLayoutColumns && pluginInjectionApi !== null && pluginInjectionApi !== void 0 && pluginInjectionApi.dependencies.betterTypeHistory) {
|
|
181
|
+
var _pluginInjectionApi$d;
|
|
182
|
+
tr = pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d = pluginInjectionApi.dependencies.betterTypeHistory) === null || _pluginInjectionApi$d === void 0 ? void 0 : _pluginInjectionApi$d.actions.flagPasteEvent(tr);
|
|
183
183
|
}
|
|
184
184
|
addLinkMetadata(view.state.selection, tr, {
|
|
185
185
|
action: isPlainText ? ACTION.PASTED_AS_PLAIN : ACTION.PASTED,
|
|
@@ -207,14 +207,14 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
|
|
|
207
207
|
// force a "paste as plain text" action by clearing the markdownSlice.
|
|
208
208
|
markdownSlice = !((_markdownSlice = markdownSlice) !== null && _markdownSlice !== void 0 && _markdownSlice.size) ? undefined : markdownSlice;
|
|
209
209
|
if (markdownSlice) {
|
|
210
|
-
var _pluginInjectionApi$
|
|
210
|
+
var _pluginInjectionApi$d2, _pluginInjectionApi$d3;
|
|
211
211
|
// linkify text prior to converting to macro
|
|
212
212
|
if (handlePasteLinkOnSelectedTextWithAnalytics(view, event, markdownSlice, PasteTypes.markdown)(state, dispatch)) {
|
|
213
213
|
return true;
|
|
214
214
|
}
|
|
215
215
|
|
|
216
216
|
// run macro autoconvert prior to other conversions
|
|
217
|
-
if (handleMacroAutoConvert(text, markdownSlice, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$
|
|
217
|
+
if (handleMacroAutoConvert(text, markdownSlice, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d2 = pluginInjectionApi.dependencies.card) === null || _pluginInjectionApi$d2 === void 0 ? void 0 : (_pluginInjectionApi$d3 = _pluginInjectionApi$d2.actions) === null || _pluginInjectionApi$d3 === void 0 ? void 0 : _pluginInjectionApi$d3.queueCardsFromChangedTr, cardOptions, extensionAutoConverter)(state, dispatch, view)) {
|
|
218
218
|
// TODO: handleMacroAutoConvert dispatch twice, so we can't use the helper
|
|
219
219
|
sendPasteAnalyticsEvent(view, event, markdownSlice, {
|
|
220
220
|
type: PasteTypes.markdown
|
|
@@ -281,7 +281,7 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
|
|
|
281
281
|
|
|
282
282
|
// finally, handle rich-text copy-paste
|
|
283
283
|
if (isRichText) {
|
|
284
|
-
var _pluginInjectionApi$
|
|
284
|
+
var _pluginInjectionApi$d4, _pluginInjectionApi$d5;
|
|
285
285
|
// linkify the text where possible
|
|
286
286
|
slice = linkifyContent(state.schema)(slice);
|
|
287
287
|
if (handlePasteLinkOnSelectedTextWithAnalytics(view, event, slice, PasteTypes.richText)(state, dispatch)) {
|
|
@@ -289,7 +289,7 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
|
|
|
289
289
|
}
|
|
290
290
|
|
|
291
291
|
// run macro autoconvert prior to other conversions
|
|
292
|
-
if (handleMacroAutoConvert(text, slice, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$
|
|
292
|
+
if (handleMacroAutoConvert(text, slice, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d4 = pluginInjectionApi.dependencies.card) === null || _pluginInjectionApi$d4 === void 0 ? void 0 : (_pluginInjectionApi$d5 = _pluginInjectionApi$d4.actions) === null || _pluginInjectionApi$d5 === void 0 ? void 0 : _pluginInjectionApi$d5.queueCardsFromChangedTr, cardOptions, extensionAutoConverter)(state, dispatch, view)) {
|
|
293
293
|
// TODO: handleMacroAutoConvert dispatch twice, so we can't use the helper
|
|
294
294
|
sendPasteAnalyticsEvent(view, event, slice, {
|
|
295
295
|
type: PasteTypes.richText
|
package/dist/es2019/version.json
CHANGED
|
@@ -25,9 +25,8 @@ function getSpellCheck(featureFlags) {
|
|
|
25
25
|
* which is used by both current and archv3 editors.
|
|
26
26
|
*/
|
|
27
27
|
export function createFeatureFlagsFromProps(props) {
|
|
28
|
-
var _props$
|
|
28
|
+
var _props$allowLayouts, _props$performanceTra, _props$performanceTra2, _props$featureFlags, _props$featureFlags2, _props$allowTables, _props$featureFlags3, _props$featureFlags4, _props$allowTables2, _props$featureFlags5, _props$featureFlags6, _props$allowTables3, _props$featureFlags7, _props$featureFlags8, _props$allowTables4, _props$allowTables5, _props$featureFlags9, _props$featureFlags10, _props$allowTables6, _props$allowExtension, _props$featureFlags11, _props$featureFlags12, _props$featureFlags13, _props$featureFlags14, _props$featureFlags15, _props$featureFlags16, _props$featureFlags17, _props$featureFlags18, _props$featureFlags19, _props$featureFlags20, _props$featureFlags21, _props$featureFlags22, _props$featureFlags23, _props$featureFlags24, _props$featureFlags25, _props$featureFlags26, _props$featureFlags27, _props$featureFlags28, _props$collabEdit, _props$collabEdit2, _props$featureFlags29, _props$featureFlags30, _props$featureFlags31, _props$featureFlags32, _props$featureFlags33, _props$featureFlags34, _props$featureFlags35, _props$featureFlags36, _props$featureFlags37, _props$featureFlags38, _props$featureFlags39, _props$featureFlags40, _props$featureFlags41;
|
|
29
29
|
var normalizedFeatureFlags = normalizeFeatureFlags(props.featureFlags);
|
|
30
|
-
var tableCellOptionsInFloatingToolbar = normalizedFeatureFlags.tableCellOptionsInFloatingToolbar || ((_props$featureFlags = props.featureFlags) === null || _props$featureFlags === void 0 ? void 0 : _props$featureFlags.tableCellOptionsInFloatingToolbar) || undefined;
|
|
31
30
|
return _objectSpread(_objectSpread({}, normalizedFeatureFlags), {}, {
|
|
32
31
|
newInsertionBehaviour: props.allowNewInsertionBehaviour,
|
|
33
32
|
interactiveExpand: typeof props.allowExpand === 'boolean' ? props.allowExpand : Boolean(props.allowExpand && props.allowExpand.allowInteractiveExpand !== false),
|
|
@@ -38,34 +37,33 @@ export function createFeatureFlagsFromProps(props) {
|
|
|
38
37
|
singleLayout: _typeof(props.allowLayouts) === 'object' && !!((_props$allowLayouts = props.allowLayouts) !== null && _props$allowLayouts !== void 0 && _props$allowLayouts.UNSAFE_allowSingleColumnLayout),
|
|
39
38
|
undoRedoButtons: props.allowUndoRedoButtons,
|
|
40
39
|
catchAllTracking: (_props$performanceTra = props.performanceTracking) === null || _props$performanceTra === void 0 ? void 0 : (_props$performanceTra2 = _props$performanceTra.catchAllTracking) === null || _props$performanceTra2 === void 0 ? void 0 : _props$performanceTra2.enabled,
|
|
41
|
-
stickyHeadersOptimization: typeof ((_props$
|
|
42
|
-
initialRenderOptimization: typeof ((_props$
|
|
43
|
-
mouseMoveOptimization: typeof ((_props$
|
|
44
|
-
tableRenderOptimization: typeof ((_props$
|
|
45
|
-
tableOverflowShadowsOptimization: typeof ((_props$
|
|
40
|
+
stickyHeadersOptimization: typeof ((_props$featureFlags = props.featureFlags) === null || _props$featureFlags === void 0 ? void 0 : _props$featureFlags.stickyHeadersOptimization) === 'boolean' ? !!((_props$featureFlags2 = props.featureFlags) !== null && _props$featureFlags2 !== void 0 && _props$featureFlags2.stickyHeadersOptimization) : _typeof(props.allowTables) === 'object' && !!((_props$allowTables = props.allowTables) !== null && _props$allowTables !== void 0 && _props$allowTables.stickyHeadersOptimization),
|
|
41
|
+
initialRenderOptimization: typeof ((_props$featureFlags3 = props.featureFlags) === null || _props$featureFlags3 === void 0 ? void 0 : _props$featureFlags3.initialRenderOptimization) === 'boolean' ? !!((_props$featureFlags4 = props.featureFlags) !== null && _props$featureFlags4 !== void 0 && _props$featureFlags4.initialRenderOptimization) : _typeof(props.allowTables) === 'object' && !!((_props$allowTables2 = props.allowTables) !== null && _props$allowTables2 !== void 0 && _props$allowTables2.initialRenderOptimization),
|
|
42
|
+
mouseMoveOptimization: typeof ((_props$featureFlags5 = props.featureFlags) === null || _props$featureFlags5 === void 0 ? void 0 : _props$featureFlags5.mouseMoveOptimization) === 'boolean' ? !!((_props$featureFlags6 = props.featureFlags) !== null && _props$featureFlags6 !== void 0 && _props$featureFlags6.mouseMoveOptimization) : _typeof(props.allowTables) === 'object' && !!((_props$allowTables3 = props.allowTables) !== null && _props$allowTables3 !== void 0 && _props$allowTables3.mouseMoveOptimization),
|
|
43
|
+
tableRenderOptimization: typeof ((_props$featureFlags7 = props.featureFlags) === null || _props$featureFlags7 === void 0 ? void 0 : _props$featureFlags7.tableRenderOptimization) === 'boolean' ? !!((_props$featureFlags8 = props.featureFlags) !== null && _props$featureFlags8 !== void 0 && _props$featureFlags8.tableRenderOptimization) : _typeof(props.allowTables) === 'object' && typeof ((_props$allowTables4 = props.allowTables) === null || _props$allowTables4 === void 0 ? void 0 : _props$allowTables4.tableRenderOptimization) === 'boolean' ? (_props$allowTables5 = props.allowTables) === null || _props$allowTables5 === void 0 ? void 0 : _props$allowTables5.tableRenderOptimization : true,
|
|
44
|
+
tableOverflowShadowsOptimization: typeof ((_props$featureFlags9 = props.featureFlags) === null || _props$featureFlags9 === void 0 ? void 0 : _props$featureFlags9.tableOverflowShadowsOptimization) === 'boolean' ? !!((_props$featureFlags10 = props.featureFlags) !== null && _props$featureFlags10 !== void 0 && _props$featureFlags10.tableOverflowShadowsOptimization) : _typeof(props.allowTables) === 'object' && !!((_props$allowTables6 = props.allowTables) !== null && _props$allowTables6 !== void 0 && _props$allowTables6.tableOverflowShadowsOptimization),
|
|
46
45
|
extendFloatingToolbar: Boolean(_typeof(props.allowExtension) === 'object' && ((_props$allowExtension = props.allowExtension) === null || _props$allowExtension === void 0 ? void 0 : _props$allowExtension.allowExtendFloatingToolbars)),
|
|
47
|
-
showAvatarGroupAsPlugin: Boolean(typeof ((_props$
|
|
48
|
-
errorBoundaryDocStructure: Boolean(typeof ((_props$
|
|
49
|
-
synchronyErrorDocStructure: Boolean(typeof ((_props$
|
|
50
|
-
enableViewUpdateSubscription: Boolean(typeof ((_props$
|
|
51
|
-
collabAvatarScroll: Boolean(typeof ((_props$
|
|
52
|
-
ufo: Boolean(typeof ((_props$
|
|
53
|
-
twoLineEditorToolbar: Boolean(typeof ((_props$
|
|
54
|
-
saferDispatchedTransactions: Boolean(typeof normalizedFeatureFlags.saferDispatchedTransactions === 'boolean' && !!normalizedFeatureFlags.saferDispatchedTransactions || (typeof ((_props$
|
|
55
|
-
saferDispatchedTransactionsAnalyticsOnly: Boolean(typeof normalizedFeatureFlags.saferDispatchedTransactionsAnalyticsOnly === 'boolean' && !!normalizedFeatureFlags.saferDispatchedTransactionsAnalyticsOnly || (typeof ((_props$
|
|
46
|
+
showAvatarGroupAsPlugin: Boolean(typeof ((_props$featureFlags11 = props.featureFlags) === null || _props$featureFlags11 === void 0 ? void 0 : _props$featureFlags11.showAvatarGroupAsPlugin) === 'boolean' ? !!((_props$featureFlags12 = props.featureFlags) !== null && _props$featureFlags12 !== void 0 && _props$featureFlags12.showAvatarGroupAsPlugin) : false),
|
|
47
|
+
errorBoundaryDocStructure: Boolean(typeof ((_props$featureFlags13 = props.featureFlags) === null || _props$featureFlags13 === void 0 ? void 0 : _props$featureFlags13.useErrorBoundaryDocStructure) === 'boolean' ? !!((_props$featureFlags14 = props.featureFlags) !== null && _props$featureFlags14 !== void 0 && _props$featureFlags14.useErrorBoundaryDocStructure) : false),
|
|
48
|
+
synchronyErrorDocStructure: Boolean(typeof ((_props$featureFlags15 = props.featureFlags) === null || _props$featureFlags15 === void 0 ? void 0 : _props$featureFlags15.synchronyErrorDocStructure) === 'boolean' ? !!((_props$featureFlags16 = props.featureFlags) !== null && _props$featureFlags16 !== void 0 && _props$featureFlags16.synchronyErrorDocStructure) : false),
|
|
49
|
+
enableViewUpdateSubscription: Boolean(typeof ((_props$featureFlags17 = props.featureFlags) === null || _props$featureFlags17 === void 0 ? void 0 : _props$featureFlags17.enableViewUpdateSubscription) === 'boolean' ? !!((_props$featureFlags18 = props.featureFlags) !== null && _props$featureFlags18 !== void 0 && _props$featureFlags18.enableViewUpdateSubscription) : false),
|
|
50
|
+
collabAvatarScroll: Boolean(typeof ((_props$featureFlags19 = props.featureFlags) === null || _props$featureFlags19 === void 0 ? void 0 : _props$featureFlags19.collabAvatarScroll) === 'boolean' ? !!((_props$featureFlags20 = props.featureFlags) !== null && _props$featureFlags20 !== void 0 && _props$featureFlags20.collabAvatarScroll) : false),
|
|
51
|
+
ufo: Boolean(typeof ((_props$featureFlags21 = props.featureFlags) === null || _props$featureFlags21 === void 0 ? void 0 : _props$featureFlags21.ufo) === 'boolean' ? !!((_props$featureFlags22 = props.featureFlags) !== null && _props$featureFlags22 !== void 0 && _props$featureFlags22.ufo) : false),
|
|
52
|
+
twoLineEditorToolbar: Boolean(typeof ((_props$featureFlags23 = props.featureFlags) === null || _props$featureFlags23 === void 0 ? void 0 : _props$featureFlags23.twoLineEditorToolbar) === 'boolean' ? !!((_props$featureFlags24 = props.featureFlags) !== null && _props$featureFlags24 !== void 0 && _props$featureFlags24.twoLineEditorToolbar) : false),
|
|
53
|
+
saferDispatchedTransactions: Boolean(typeof normalizedFeatureFlags.saferDispatchedTransactions === 'boolean' && !!normalizedFeatureFlags.saferDispatchedTransactions || (typeof ((_props$featureFlags25 = props.featureFlags) === null || _props$featureFlags25 === void 0 ? void 0 : _props$featureFlags25.saferDispatchedTransactions) === 'boolean' ? !!((_props$featureFlags26 = props.featureFlags) !== null && _props$featureFlags26 !== void 0 && _props$featureFlags26.saferDispatchedTransactions) : false)),
|
|
54
|
+
saferDispatchedTransactionsAnalyticsOnly: Boolean(typeof normalizedFeatureFlags.saferDispatchedTransactionsAnalyticsOnly === 'boolean' && !!normalizedFeatureFlags.saferDispatchedTransactionsAnalyticsOnly || (typeof ((_props$featureFlags27 = props.featureFlags) === null || _props$featureFlags27 === void 0 ? void 0 : _props$featureFlags27.saferDispatchedTransactionsAnalyticsOnly) === 'boolean' ? !!((_props$featureFlags28 = props.featureFlags) !== null && _props$featureFlags28 !== void 0 && _props$featureFlags28.saferDispatchedTransactionsAnalyticsOnly) : false)),
|
|
56
55
|
useNativeCollabPlugin: Boolean(typeof ((_props$collabEdit = props.collabEdit) === null || _props$collabEdit === void 0 ? void 0 : _props$collabEdit.useNativePlugin) === 'boolean' ? !!((_props$collabEdit2 = props.collabEdit) !== null && _props$collabEdit2 !== void 0 && _props$collabEdit2.useNativePlugin) : false),
|
|
57
|
-
chromeCursorHandlerFixedVersion: typeof ((_props$
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
floatingToolbarLinkSettingsButton: typeof ((_props$featureFlags37 = props.featureFlags) === null || _props$featureFlags37 === void 0 ? void 0 : _props$featureFlags37['floating-toolbar-link-settings-button']) === 'string' ? props.featureFlags['floating-toolbar-link-settings-button'] || undefined : undefined,
|
|
56
|
+
chromeCursorHandlerFixedVersion: typeof ((_props$featureFlags29 = props.featureFlags) === null || _props$featureFlags29 === void 0 ? void 0 : _props$featureFlags29.chromeCursorHandlerFixedVersion) === 'string' ? Number(props.featureFlags.chromeCursorHandlerFixedVersion) || undefined : undefined,
|
|
57
|
+
showHoverPreview: Boolean(typeof ((_props$featureFlags30 = props.featureFlags) === null || _props$featureFlags30 === void 0 ? void 0 : _props$featureFlags30.showHoverPreview) === 'boolean' ? !!((_props$featureFlags31 = props.featureFlags) !== null && _props$featureFlags31 !== void 0 && _props$featureFlags31.showHoverPreview) : false),
|
|
58
|
+
indentationButtonsInTheToolbar: Boolean(typeof normalizedFeatureFlags.indentationButtonsInTheToolbar === 'boolean' && !!normalizedFeatureFlags.indentationButtonsInTheToolbar || (typeof ((_props$featureFlags32 = props.featureFlags) === null || _props$featureFlags32 === void 0 ? void 0 : _props$featureFlags32.indentationButtonsInTheToolbar) === 'boolean' ? !!((_props$featureFlags33 = props.featureFlags) !== null && _props$featureFlags33 !== void 0 && _props$featureFlags33.indentationButtonsInTheToolbar) : false)),
|
|
59
|
+
floatingToolbarCopyButton: Boolean(typeof normalizedFeatureFlags.floatingToolbarCopyButton === 'boolean' && !!normalizedFeatureFlags.floatingToolbarCopyButton || (typeof ((_props$featureFlags34 = props.featureFlags) === null || _props$featureFlags34 === void 0 ? void 0 : _props$featureFlags34.floatingToolbarCopyButton) === 'boolean' ? !!((_props$featureFlags35 = props.featureFlags) !== null && _props$featureFlags35 !== void 0 && _props$featureFlags35.floatingToolbarCopyButton) : false)),
|
|
60
|
+
floatingToolbarLinkSettingsButton: typeof ((_props$featureFlags36 = props.featureFlags) === null || _props$featureFlags36 === void 0 ? void 0 : _props$featureFlags36['floating-toolbar-link-settings-button']) === 'string' ? props.featureFlags['floating-toolbar-link-settings-button'] || undefined : undefined,
|
|
63
61
|
disableSpellcheckByBrowser: getSpellCheck(props.featureFlags),
|
|
64
62
|
// Including fallback to props.featureFlags so that mobile feature flags
|
|
65
63
|
// are included (they are not kebab cased)
|
|
66
|
-
restartNumberedLists: normalizedFeatureFlags.restartNumberedLists === true || ((_props$
|
|
67
|
-
useSomewhatSemanticTextColorNames: Boolean(typeof normalizedFeatureFlags.useSomewhatSemanticTextColorNames === 'boolean' && !!normalizedFeatureFlags.useSomewhatSemanticTextColorNames || (typeof ((_props$
|
|
64
|
+
restartNumberedLists: normalizedFeatureFlags.restartNumberedLists === true || ((_props$featureFlags37 = props.featureFlags) === null || _props$featureFlags37 === void 0 ? void 0 : _props$featureFlags37.restartNumberedLists) === true,
|
|
65
|
+
useSomewhatSemanticTextColorNames: Boolean(typeof normalizedFeatureFlags.useSomewhatSemanticTextColorNames === 'boolean' && !!normalizedFeatureFlags.useSomewhatSemanticTextColorNames || (typeof ((_props$featureFlags38 = props.featureFlags) === null || _props$featureFlags38 === void 0 ? void 0 : _props$featureFlags38.useSomewhatSemanticTextColorNames) === 'boolean' ? !!((_props$featureFlags39 = props.featureFlags) !== null && _props$featureFlags39 !== void 0 && _props$featureFlags39.useSomewhatSemanticTextColorNames) : false)),
|
|
68
66
|
lpLinkPickerFocusTrap: Boolean(normalizedFeatureFlags.lpLinkPickerFocusTrap),
|
|
69
|
-
preventPopupOverflow: Boolean(typeof ((_props$
|
|
67
|
+
preventPopupOverflow: Boolean(typeof ((_props$featureFlags40 = props.featureFlags) === null || _props$featureFlags40 === void 0 ? void 0 : _props$featureFlags40['prevent-popup-overflow']) === 'boolean' ? !!((_props$featureFlags41 = props.featureFlags) !== null && _props$featureFlags41 !== void 0 && _props$featureFlags41['prevent-popup-overflow']) : false)
|
|
70
68
|
});
|
|
71
69
|
}
|
|
@@ -12,7 +12,6 @@ import disableSpellcheckingPlugin from './pm-plugins/disable-spell-checking';
|
|
|
12
12
|
import contextIdentifierPlugin from './pm-plugins/context-identifier';
|
|
13
13
|
import newlinePreserveMarksPlugin from './pm-plugins/newline-preserve-marks';
|
|
14
14
|
import inlineCursorTargetPlugin from './pm-plugins/inline-cursor-target';
|
|
15
|
-
import betterTypeHistoryPlugin from './pm-plugins/better-type-history';
|
|
16
15
|
import scrollGutter from './pm-plugins/scroll-gutter';
|
|
17
16
|
import { keymap } from '@atlaskit/editor-common/keymaps';
|
|
18
17
|
import frozenEditor from './pm-plugins/frozen-editor';
|
|
@@ -89,13 +88,6 @@ var basePlugin = function basePlugin(options, api) {
|
|
|
89
88
|
providerFactory = _ref4.providerFactory;
|
|
90
89
|
return contextIdentifierPlugin(dispatch, providerFactory);
|
|
91
90
|
}
|
|
92
|
-
}, {
|
|
93
|
-
name: 'betterTypeHistory',
|
|
94
|
-
plugin: function plugin(_ref5) {
|
|
95
|
-
var dispatch = _ref5.dispatch,
|
|
96
|
-
providerFactory = _ref5.providerFactory;
|
|
97
|
-
return betterTypeHistoryPlugin();
|
|
98
|
-
}
|
|
99
91
|
});
|
|
100
92
|
if (options && options.allowScrollGutter) {
|
|
101
93
|
plugins.push({
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import createPlugin from './pm-plugins/main';
|
|
2
|
+
import { pluginKey } from './pm-plugins/plugin-key';
|
|
3
|
+
/**
|
|
4
|
+
* This plugin is aiming to improve undo behaviour for some of our more custom applications, very specific text
|
|
5
|
+
* paste events, splitting blocks of text, new lines.
|
|
6
|
+
*/
|
|
7
|
+
var betterTypeHistory = function betterTypeHistory() {
|
|
8
|
+
return {
|
|
9
|
+
name: 'betterTypeHistory',
|
|
10
|
+
actions: {
|
|
11
|
+
flagPasteEvent: function flagPasteEvent(tr) {
|
|
12
|
+
tr.setMeta(pluginKey, true);
|
|
13
|
+
return tr;
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
pmPlugins: function pmPlugins() {
|
|
17
|
+
return [{
|
|
18
|
+
name: 'betterTypeHistory',
|
|
19
|
+
plugin: function plugin() {
|
|
20
|
+
return createPlugin();
|
|
21
|
+
}
|
|
22
|
+
}];
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
export default betterTypeHistory;
|
|
@@ -3,8 +3,8 @@ import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
|
3
3
|
import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
4
4
|
import { closeHistory } from '@atlaskit/editor-prosemirror/history';
|
|
5
5
|
import { ReplaceStep, ReplaceAroundStep } from '@atlaskit/editor-prosemirror/transform';
|
|
6
|
-
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
7
6
|
import { extractSliceFromStep } from '../../../utils/step';
|
|
7
|
+
import { pluginKey } from './plugin-key';
|
|
8
8
|
var getEnterKeyboardActionStep = function getEnterKeyboardActionStep(trs) {
|
|
9
9
|
var firstTr = trs.length === 1 && trs[0];
|
|
10
10
|
if (!firstTr || !firstTr.docChanged || !firstTr.isGeneric || !(firstTr.selection instanceof TextSelection)) {
|
|
@@ -33,7 +33,6 @@ var isSliceAddingNewlineChar = function isSliceAddingNewlineChar(slice, schema)
|
|
|
33
33
|
var newLine = Fragment.from(schema.text('\n'));
|
|
34
34
|
return slice.content.eq(newLine);
|
|
35
35
|
};
|
|
36
|
-
export var pluginKey = new PluginKey('betterTypeHistoryPlugin');
|
|
37
36
|
export default (function () {
|
|
38
37
|
return new SafePlugin({
|
|
39
38
|
key: pluginKey,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { default as basePlugin } from './base';
|
|
2
2
|
export { default as blockTypePlugin } from './block-type';
|
|
3
3
|
export { pluginKey as blockPluginStateKey } from './block-type';
|
|
4
|
+
export { default as betterTypeHistoryPlugin } from './better-type-history';
|
|
4
5
|
export { default as clearMarksOnChangeToEmptyDocumentPlugin } from './clear-marks-on-change-to-empty-document';
|
|
5
6
|
export { default as codeBlockPlugin } from './code-block';
|
|
6
7
|
export { default as collabEditPlugin } from './collab-edit';
|
|
@@ -386,7 +386,7 @@ var MediaSingleNode = /*#__PURE__*/function (_Component) {
|
|
|
386
386
|
gutterOffset: MEDIA_SINGLE_GUTTER_SIZE
|
|
387
387
|
})
|
|
388
388
|
};
|
|
389
|
-
var
|
|
389
|
+
var resizableMediaSingleProps = _objectSpread({
|
|
390
390
|
view: view,
|
|
391
391
|
getPos: getPos,
|
|
392
392
|
updateSize: this.updateSize,
|
|
@@ -420,7 +420,7 @@ var MediaSingleNode = /*#__PURE__*/function (_Component) {
|
|
|
420
420
|
ref: this.captionPlaceHolderRef,
|
|
421
421
|
onClick: this.clickPlaceholder
|
|
422
422
|
}));
|
|
423
|
-
return canResize ? getBooleanFF('platform.editor.media.extended-resize-experience') ? jsx(ResizableMediaSingleNext,
|
|
423
|
+
return canResize ? getBooleanFF('platform.editor.media.extended-resize-experience') ? jsx(ResizableMediaSingleNext, resizableMediaSingleProps, MediaChildren) : jsx(ResizableMediaSingle, _extends({}, resizableMediaSingleProps, {
|
|
424
424
|
lineLength: contentWidthForLegacyExperience
|
|
425
425
|
}), MediaChildren) : jsx(MediaSingle, mediaSingleProps, MediaChildren);
|
|
426
426
|
}
|
|
@@ -20,9 +20,6 @@ import { nonWrappedLayouts, setNodeSelection } from '@atlaskit/editor-common/uti
|
|
|
20
20
|
import { akEditorFullWidthLayoutWidth, akEditorGutterPadding, akEditorDefaultLayoutWidth } from '@atlaskit/editor-shared-styles';
|
|
21
21
|
import { wrapperStyle } from './styled';
|
|
22
22
|
import { ResizerNext } from '@atlaskit/editor-common/resizer';
|
|
23
|
-
import ResizeLabel from '../../../../ui/Resizer/ResizeLabel';
|
|
24
|
-
import { injectIntl } from 'react-intl-next';
|
|
25
|
-
import { messages } from './resizable-media-single-messages';
|
|
26
23
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
27
24
|
import classnames from 'classnames';
|
|
28
25
|
import { richMediaClassName, resizerStyles } from '@atlaskit/editor-common/styles';
|
|
@@ -467,7 +464,6 @@ var ResizableMediaSingleNext = /*#__PURE__*/function (_React$Component) {
|
|
|
467
464
|
fullWidthMode = _this$props8.fullWidthMode,
|
|
468
465
|
selected = _this$props8.selected,
|
|
469
466
|
children = _this$props8.children,
|
|
470
|
-
intl = _this$props8.intl,
|
|
471
467
|
lineLength = _this$props8.lineLength;
|
|
472
468
|
var _this$state = this.state,
|
|
473
469
|
isResizing = _this$state.isResizing,
|
|
@@ -488,8 +484,6 @@ var ResizableMediaSingleNext = /*#__PURE__*/function (_React$Component) {
|
|
|
488
484
|
'rich-media-wrapped': layout === 'wrap-left' || layout === 'wrap-right'
|
|
489
485
|
});
|
|
490
486
|
var resizerNextClassName = classnames(className, resizerStyles);
|
|
491
|
-
var showSizeGuide = selected || isResizing;
|
|
492
|
-
var label = layout === 'full-width' ? intl.formatMessage(messages.fullWidthImage) : "".concat(this.state.size.width, " x ").concat(this.state.size.height);
|
|
493
487
|
var maxWidth = this.calcMaxWidth(lineLength, containerWidth, fullWidthMode);
|
|
494
488
|
return jsx("div", {
|
|
495
489
|
ref: this.saveWrapper,
|
|
@@ -515,13 +509,9 @@ var ResizableMediaSingleNext = /*#__PURE__*/function (_React$Component) {
|
|
|
515
509
|
snap: this.state.snaps,
|
|
516
510
|
resizeRatio: nonWrappedLayouts.includes(layout) ? 2 : 1,
|
|
517
511
|
"data-testid": resizerNextTestId
|
|
518
|
-
},
|
|
519
|
-
label: label,
|
|
520
|
-
containerWidth: this.state.size.width
|
|
521
|
-
}), children));
|
|
512
|
+
}, children));
|
|
522
513
|
}
|
|
523
514
|
}]);
|
|
524
515
|
return ResizableMediaSingleNext;
|
|
525
|
-
}(React.Component);
|
|
526
|
-
export
|
|
527
|
-
export default injectIntl(ResizableMediaSingleNext);
|
|
516
|
+
}(React.Component);
|
|
517
|
+
export default ResizableMediaSingleNext;
|
|
@@ -23,7 +23,6 @@ import { upgradeTextToLists, splitParagraphs } from '../../list/transforms';
|
|
|
23
23
|
import { md } from '@atlaskit/editor-common/paste';
|
|
24
24
|
import { transformSliceToDecisionList } from '../../tasks-and-decisions/utils';
|
|
25
25
|
import { containsAnyAnnotations, stripNonExistingAnnotations } from '../../annotation/utils';
|
|
26
|
-
import { pluginKey as betterTypePluginKey } from '../../base/pm-plugins/better-type-history';
|
|
27
26
|
import { clipboardTextSerializer } from './clipboard-text-serializer';
|
|
28
27
|
import { htmlHasIncompleteTable, tryRebuildCompleteTableHtml, isPastedFromTinyMCEConfluence } from '../util/tinyMCE';
|
|
29
28
|
import { handlePaste as handlePasteTable } from '@atlaskit/editor-tables/utils';
|
|
@@ -198,8 +197,9 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
|
|
|
198
197
|
});
|
|
199
198
|
return tableExists;
|
|
200
199
|
});
|
|
201
|
-
if (!isPastingTextInsidePlaceholderText && !isPastingTable && !isPastingOverLayoutColumns) {
|
|
202
|
-
|
|
200
|
+
if (!isPastingTextInsidePlaceholderText && !isPastingTable && !isPastingOverLayoutColumns && pluginInjectionApi !== null && pluginInjectionApi !== void 0 && pluginInjectionApi.dependencies.betterTypeHistory) {
|
|
201
|
+
var _pluginInjectionApi$d;
|
|
202
|
+
tr = pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d = pluginInjectionApi.dependencies.betterTypeHistory) === null || _pluginInjectionApi$d === void 0 ? void 0 : _pluginInjectionApi$d.actions.flagPasteEvent(tr);
|
|
203
203
|
}
|
|
204
204
|
addLinkMetadata(view.state.selection, tr, {
|
|
205
205
|
action: isPlainText ? ACTION.PASTED_AS_PLAIN : ACTION.PASTED,
|
|
@@ -227,14 +227,14 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
|
|
|
227
227
|
// force a "paste as plain text" action by clearing the markdownSlice.
|
|
228
228
|
markdownSlice = !((_markdownSlice = markdownSlice) !== null && _markdownSlice !== void 0 && _markdownSlice.size) ? undefined : markdownSlice;
|
|
229
229
|
if (markdownSlice) {
|
|
230
|
-
var _pluginInjectionApi$
|
|
230
|
+
var _pluginInjectionApi$d2, _pluginInjectionApi$d3;
|
|
231
231
|
// linkify text prior to converting to macro
|
|
232
232
|
if (handlePasteLinkOnSelectedTextWithAnalytics(view, event, markdownSlice, PasteTypes.markdown)(state, dispatch)) {
|
|
233
233
|
return true;
|
|
234
234
|
}
|
|
235
235
|
|
|
236
236
|
// run macro autoconvert prior to other conversions
|
|
237
|
-
if (handleMacroAutoConvert(text, markdownSlice, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$
|
|
237
|
+
if (handleMacroAutoConvert(text, markdownSlice, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d2 = pluginInjectionApi.dependencies.card) === null || _pluginInjectionApi$d2 === void 0 ? void 0 : (_pluginInjectionApi$d3 = _pluginInjectionApi$d2.actions) === null || _pluginInjectionApi$d3 === void 0 ? void 0 : _pluginInjectionApi$d3.queueCardsFromChangedTr, cardOptions, extensionAutoConverter)(state, dispatch, view)) {
|
|
238
238
|
// TODO: handleMacroAutoConvert dispatch twice, so we can't use the helper
|
|
239
239
|
sendPasteAnalyticsEvent(view, event, markdownSlice, {
|
|
240
240
|
type: PasteTypes.markdown
|
|
@@ -299,7 +299,7 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
|
|
|
299
299
|
|
|
300
300
|
// finally, handle rich-text copy-paste
|
|
301
301
|
if (isRichText) {
|
|
302
|
-
var _pluginInjectionApi$
|
|
302
|
+
var _pluginInjectionApi$d4, _pluginInjectionApi$d5;
|
|
303
303
|
// linkify the text where possible
|
|
304
304
|
slice = linkifyContent(state.schema)(slice);
|
|
305
305
|
if (handlePasteLinkOnSelectedTextWithAnalytics(view, event, slice, PasteTypes.richText)(state, dispatch)) {
|
|
@@ -307,7 +307,7 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
|
|
|
307
307
|
}
|
|
308
308
|
|
|
309
309
|
// run macro autoconvert prior to other conversions
|
|
310
|
-
if (handleMacroAutoConvert(text, slice, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$
|
|
310
|
+
if (handleMacroAutoConvert(text, slice, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d4 = pluginInjectionApi.dependencies.card) === null || _pluginInjectionApi$d4 === void 0 ? void 0 : (_pluginInjectionApi$d5 = _pluginInjectionApi$d4.actions) === null || _pluginInjectionApi$d5 === void 0 ? void 0 : _pluginInjectionApi$d5.queueCardsFromChangedTr, cardOptions, extensionAutoConverter)(state, dispatch, view)) {
|
|
311
311
|
// TODO: handleMacroAutoConvert dispatch twice, so we can't use the helper
|
|
312
312
|
sendPasteAnalyticsEvent(view, event, slice, {
|
|
313
313
|
type: PasteTypes.richText
|
package/dist/esm/version.json
CHANGED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
2
|
+
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
+
export type BetterTypeHistoryAPI = {
|
|
4
|
+
flagPasteEvent: (transaction: Transaction) => Transaction;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* This plugin is aiming to improve undo behaviour for some of our more custom applications, very specific text
|
|
8
|
+
* paste events, splitting blocks of text, new lines.
|
|
9
|
+
*/
|
|
10
|
+
declare const betterTypeHistory: NextEditorPlugin<'betterTypeHistory', {
|
|
11
|
+
actions: BetterTypeHistoryAPI;
|
|
12
|
+
}>;
|
|
13
|
+
export default betterTypeHistory;
|
|
@@ -2,6 +2,7 @@ export { default as basePlugin } from './base';
|
|
|
2
2
|
export { default as blockTypePlugin } from './block-type';
|
|
3
3
|
export { pluginKey as blockPluginStateKey } from './block-type';
|
|
4
4
|
export type { BlockTypeState } from './block-type';
|
|
5
|
+
export { default as betterTypeHistoryPlugin } from './better-type-history';
|
|
5
6
|
export { default as clearMarksOnChangeToEmptyDocumentPlugin } from './clear-marks-on-change-to-empty-document';
|
|
6
7
|
export { default as codeBlockPlugin } from './code-block';
|
|
7
8
|
export { default as collabEditPlugin } from './collab-edit';
|
|
@@ -6,7 +6,6 @@ import type { RichMediaLayout as MediaSingleLayout } from '@atlaskit/adf-schema'
|
|
|
6
6
|
import type { MediaClientConfig } from '@atlaskit/media-core';
|
|
7
7
|
import type { Props } from './types';
|
|
8
8
|
import type { Dimensions, HandleResize, HandleResizeStart, Position, Snap } from '@atlaskit/editor-common/resizer';
|
|
9
|
-
import type { WrappedComponentProps } from 'react-intl-next';
|
|
10
9
|
import type { GuidelineConfig, GuidelineSnapsReference } from '@atlaskit/editor-common/guideline';
|
|
11
10
|
type State = {
|
|
12
11
|
offsetLeft: number;
|
|
@@ -17,7 +16,7 @@ type State = {
|
|
|
17
16
|
snaps: Snap;
|
|
18
17
|
};
|
|
19
18
|
export declare const resizerNextTestId = "mediaSingle.resizerNext.testid";
|
|
20
|
-
type ResizableMediaSingleNextProps = Props
|
|
19
|
+
type ResizableMediaSingleNextProps = Props;
|
|
21
20
|
declare class ResizableMediaSingleNext extends React.Component<ResizableMediaSingleNextProps, State> {
|
|
22
21
|
private guidelines;
|
|
23
22
|
constructor(props: ResizableMediaSingleNextProps);
|
|
@@ -72,8 +71,4 @@ declare class ResizableMediaSingleNext extends React.Component<ResizableMediaSin
|
|
|
72
71
|
handleResizeStop: HandleResize;
|
|
73
72
|
render(): jsx.JSX.Element;
|
|
74
73
|
}
|
|
75
|
-
export
|
|
76
|
-
declare const _default: React.FC<import("react-intl-next").WithIntlProps<ResizableMediaSingleNextProps>> & {
|
|
77
|
-
WrappedComponent: React.ComponentType<ResizableMediaSingleNextProps>;
|
|
78
|
-
};
|
|
79
|
-
export default _default;
|
|
74
|
+
export default ResizableMediaSingleNext;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
2
|
-
import { CardOptions } from '@atlaskit/editor-common/card';
|
|
1
|
+
import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
2
|
+
import type { CardOptions } from '@atlaskit/editor-common/card';
|
|
3
3
|
import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
|
|
4
4
|
import type { cardPlugin } from '@atlaskit/editor-plugin-card';
|
|
5
|
+
import type betterTypeHistoryPlugin from '../better-type-history';
|
|
5
6
|
export type PastePluginOptions = {
|
|
6
7
|
cardOptions?: CardOptions;
|
|
7
8
|
sanitizePrivateContent?: boolean;
|
|
@@ -10,6 +11,7 @@ declare const pastePlugin: NextEditorPlugin<'paste', {
|
|
|
10
11
|
pluginConfiguration: PastePluginOptions;
|
|
11
12
|
dependencies: [
|
|
12
13
|
typeof featureFlagsPlugin,
|
|
14
|
+
typeof betterTypeHistoryPlugin,
|
|
13
15
|
OptionalPlugin<typeof cardPlugin>
|
|
14
16
|
];
|
|
15
17
|
}>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
2
|
+
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
+
export type BetterTypeHistoryAPI = {
|
|
4
|
+
flagPasteEvent: (transaction: Transaction) => Transaction;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* This plugin is aiming to improve undo behaviour for some of our more custom applications, very specific text
|
|
8
|
+
* paste events, splitting blocks of text, new lines.
|
|
9
|
+
*/
|
|
10
|
+
declare const betterTypeHistory: NextEditorPlugin<'betterTypeHistory', {
|
|
11
|
+
actions: BetterTypeHistoryAPI;
|
|
12
|
+
}>;
|
|
13
|
+
export default betterTypeHistory;
|
|
@@ -2,6 +2,7 @@ export { default as basePlugin } from './base';
|
|
|
2
2
|
export { default as blockTypePlugin } from './block-type';
|
|
3
3
|
export { pluginKey as blockPluginStateKey } from './block-type';
|
|
4
4
|
export type { BlockTypeState } from './block-type';
|
|
5
|
+
export { default as betterTypeHistoryPlugin } from './better-type-history';
|
|
5
6
|
export { default as clearMarksOnChangeToEmptyDocumentPlugin } from './clear-marks-on-change-to-empty-document';
|
|
6
7
|
export { default as codeBlockPlugin } from './code-block';
|
|
7
8
|
export { default as collabEditPlugin } from './collab-edit';
|
package/dist/types-ts4.5/plugins/media/ui/ResizableMediaSingle/ResizableMediaSingleNext.d.ts
CHANGED
|
@@ -6,7 +6,6 @@ import type { RichMediaLayout as MediaSingleLayout } from '@atlaskit/adf-schema'
|
|
|
6
6
|
import type { MediaClientConfig } from '@atlaskit/media-core';
|
|
7
7
|
import type { Props } from './types';
|
|
8
8
|
import type { Dimensions, HandleResize, HandleResizeStart, Position, Snap } from '@atlaskit/editor-common/resizer';
|
|
9
|
-
import type { WrappedComponentProps } from 'react-intl-next';
|
|
10
9
|
import type { GuidelineConfig, GuidelineSnapsReference } from '@atlaskit/editor-common/guideline';
|
|
11
10
|
type State = {
|
|
12
11
|
offsetLeft: number;
|
|
@@ -17,7 +16,7 @@ type State = {
|
|
|
17
16
|
snaps: Snap;
|
|
18
17
|
};
|
|
19
18
|
export declare const resizerNextTestId = "mediaSingle.resizerNext.testid";
|
|
20
|
-
type ResizableMediaSingleNextProps = Props
|
|
19
|
+
type ResizableMediaSingleNextProps = Props;
|
|
21
20
|
declare class ResizableMediaSingleNext extends React.Component<ResizableMediaSingleNextProps, State> {
|
|
22
21
|
private guidelines;
|
|
23
22
|
constructor(props: ResizableMediaSingleNextProps);
|
|
@@ -72,8 +71,4 @@ declare class ResizableMediaSingleNext extends React.Component<ResizableMediaSin
|
|
|
72
71
|
handleResizeStop: HandleResize;
|
|
73
72
|
render(): jsx.JSX.Element;
|
|
74
73
|
}
|
|
75
|
-
export
|
|
76
|
-
declare const _default: React.FC<import("react-intl-next").WithIntlProps<ResizableMediaSingleNextProps>> & {
|
|
77
|
-
WrappedComponent: React.ComponentType<ResizableMediaSingleNextProps>;
|
|
78
|
-
};
|
|
79
|
-
export default _default;
|
|
74
|
+
export default ResizableMediaSingleNext;
|