@atlaskit/editor-core 187.31.3 → 187.31.6
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 +22 -0
- package/dist/cjs/create-editor/ReactEditorViewInternal.js +2 -3
- package/dist/cjs/create-editor/create-plugins-list.js +2 -28
- package/dist/cjs/create-editor/create-preset.js +36 -0
- package/dist/cjs/labs/next/presets/default.js +2 -2
- package/dist/cjs/labs/next/presets/useUniversalPreset.js +3 -3
- package/dist/cjs/plugins/index.js +0 -7
- package/dist/cjs/plugins/media/toolbar/index.js +20 -6
- package/dist/cjs/plugins/media/ui/PixelEntry/index.js +9 -2
- package/dist/cjs/plugins/media/ui/PixelEntry/messages.js +5 -0
- package/dist/cjs/plugins/media/ui/PixelEntry/styles.js +5 -3
- package/dist/cjs/plugins/selection/gap-cursor/utils.js +1 -2
- package/dist/cjs/ui/ContentStyles/index.js +20 -21
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/create-editor/ReactEditorViewInternal.js +2 -3
- package/dist/es2019/create-editor/create-plugins-list.js +2 -23
- package/dist/es2019/create-editor/create-preset.js +25 -0
- package/dist/es2019/labs/next/presets/default.js +1 -1
- package/dist/es2019/labs/next/presets/useUniversalPreset.js +1 -1
- package/dist/es2019/plugins/index.js +0 -1
- package/dist/es2019/plugins/media/toolbar/index.js +23 -7
- package/dist/es2019/plugins/media/ui/PixelEntry/index.js +10 -1
- package/dist/es2019/plugins/media/ui/PixelEntry/messages.js +5 -0
- package/dist/es2019/plugins/media/ui/PixelEntry/styles.js +7 -0
- package/dist/es2019/plugins/selection/gap-cursor/utils.js +1 -2
- package/dist/es2019/ui/ContentStyles/index.js +1 -2
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/create-editor/ReactEditorViewInternal.js +2 -3
- package/dist/esm/create-editor/create-plugins-list.js +2 -27
- package/dist/esm/create-editor/create-preset.js +29 -0
- package/dist/esm/labs/next/presets/default.js +1 -1
- package/dist/esm/labs/next/presets/useUniversalPreset.js +1 -1
- package/dist/esm/plugins/index.js +0 -1
- package/dist/esm/plugins/media/toolbar/index.js +21 -7
- package/dist/esm/plugins/media/ui/PixelEntry/index.js +7 -1
- package/dist/esm/plugins/media/ui/PixelEntry/messages.js +5 -0
- package/dist/esm/plugins/media/ui/PixelEntry/styles.js +3 -2
- package/dist/esm/plugins/selection/gap-cursor/utils.js +1 -2
- package/dist/esm/ui/ContentStyles/index.js +1 -2
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/create-editor/create-plugins-list.d.ts +2 -3
- package/dist/types/create-editor/create-preset.d.ts +3 -0
- package/dist/types/plugins/base/plugin.d.ts +2 -2
- package/dist/types/plugins/breakout/index.d.ts +2 -2
- package/dist/types/plugins/extension/index.d.ts +8 -8
- package/dist/types/plugins/extension/nodeviews/extension.d.ts +3 -3
- package/dist/types/plugins/extension/ui/Extension/Extension/index.d.ts +2 -2
- package/dist/types/plugins/extension/ui/Extension/ExtensionComponent.d.ts +2 -2
- package/dist/types/plugins/extension/ui/Extension/index.d.ts +2 -2
- package/dist/types/plugins/index.d.ts +0 -1
- package/dist/types/plugins/media/next-plugin-type.d.ts +12 -12
- package/dist/types/plugins/media/ui/PixelEntry/index.d.ts +5 -0
- package/dist/types/plugins/media/ui/PixelEntry/messages.d.ts +5 -0
- package/dist/types/plugins/media/ui/PixelEntry/styles.d.ts +1 -0
- package/dist/types/plugins/toolbar-lists-indentation/index.d.ts +4 -4
- package/dist/types-ts4.5/create-editor/create-plugins-list.d.ts +2 -3
- package/dist/types-ts4.5/create-editor/create-preset.d.ts +3 -0
- package/dist/types-ts4.5/plugins/base/plugin.d.ts +2 -2
- package/dist/types-ts4.5/plugins/breakout/index.d.ts +2 -2
- package/dist/types-ts4.5/plugins/extension/index.d.ts +8 -8
- package/dist/types-ts4.5/plugins/extension/nodeviews/extension.d.ts +3 -3
- package/dist/types-ts4.5/plugins/extension/ui/Extension/Extension/index.d.ts +2 -2
- package/dist/types-ts4.5/plugins/extension/ui/Extension/ExtensionComponent.d.ts +2 -2
- package/dist/types-ts4.5/plugins/extension/ui/Extension/index.d.ts +2 -2
- package/dist/types-ts4.5/plugins/index.d.ts +0 -1
- package/dist/types-ts4.5/plugins/media/next-plugin-type.d.ts +12 -12
- package/dist/types-ts4.5/plugins/media/ui/PixelEntry/index.d.ts +5 -0
- package/dist/types-ts4.5/plugins/media/ui/PixelEntry/messages.d.ts +5 -0
- package/dist/types-ts4.5/plugins/media/ui/PixelEntry/styles.d.ts +1 -0
- package/dist/types-ts4.5/plugins/toolbar-lists-indentation/index.d.ts +4 -4
- package/package.json +7 -6
- package/report.api.md +12 -12
- package/tmp/api-report-tmp.d.ts +12 -12
- package/dist/cjs/plugins/unsupported-content/index.js +0 -87
- package/dist/cjs/plugins/unsupported-content/styles.js +0 -20
- package/dist/cjs/plugins/unsupported-content/unsupported-inline-node-view.js +0 -16
- package/dist/es2019/plugins/unsupported-content/index.js +0 -77
- package/dist/es2019/plugins/unsupported-content/styles.js +0 -27
- package/dist/es2019/plugins/unsupported-content/unsupported-inline-node-view.js +0 -7
- package/dist/esm/plugins/unsupported-content/index.js +0 -77
- package/dist/esm/plugins/unsupported-content/styles.js +0 -11
- package/dist/esm/plugins/unsupported-content/unsupported-inline-node-view.js +0 -7
- package/dist/types/plugins/unsupported-content/index.d.ts +0 -5
- package/dist/types/plugins/unsupported-content/styles.d.ts +0 -5
- package/dist/types/plugins/unsupported-content/unsupported-inline-node-view.d.ts +0 -11
- package/dist/types-ts4.5/plugins/unsupported-content/index.d.ts +0 -5
- package/dist/types-ts4.5/plugins/unsupported-content/styles.d.ts +0 -5
- package/dist/types-ts4.5/plugins/unsupported-content/unsupported-inline-node-view.d.ts +0 -11
|
@@ -41,4 +41,11 @@ export const pixelEntryHiddenSubmit = css`
|
|
|
41
41
|
visibility: hidden;
|
|
42
42
|
width: 0;
|
|
43
43
|
height: 0;
|
|
44
|
+
`;
|
|
45
|
+
export const pixelSizingFullWidthLabelStyles = css`
|
|
46
|
+
min-width: ${PIXEL_SIZING_WRAPPER_MINIMUM_WIDTH}px;
|
|
47
|
+
height: ${"var(--ds-space-300, 24px)"};
|
|
48
|
+
display: flex;
|
|
49
|
+
justify-content: center;
|
|
50
|
+
align-items: center;
|
|
44
51
|
`;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { TableSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
1
|
+
import { TableSharedCssClassName, UnsupportedSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
2
2
|
import { Side } from './selection';
|
|
3
|
-
import { UnsupportedSharedCssClassName } from '../../unsupported-content/styles';
|
|
4
3
|
import { CAPTION_PLACEHOLDER_ID } from '../../media/ui/CaptionPlaceholder';
|
|
5
4
|
export const isLeftCursor = side => side === Side.LEFT;
|
|
6
5
|
export function getMediaNearPos(doc, $pos, schema, dir = -1) {
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import React, { useMemo } from 'react';
|
|
3
3
|
import { jsx, css, useTheme } from '@emotion/react';
|
|
4
|
-
import { whitespaceSharedStyles, paragraphSharedStyles, listsSharedStyles, indentationSharedStyles, blockMarksSharedStyles, shadowSharedStyle, dateSharedStyle, tasksAndDecisionsStyles, annotationSharedStyles, smartCardSharedStyles, textColorStyles, resizerStyles, gridStyles, smartCardStyles, embedCardStyles, codeBlockInListSafariFix } from '@atlaskit/editor-common/styles';
|
|
4
|
+
import { whitespaceSharedStyles, paragraphSharedStyles, listsSharedStyles, indentationSharedStyles, blockMarksSharedStyles, shadowSharedStyle, dateSharedStyle, tasksAndDecisionsStyles, annotationSharedStyles, smartCardSharedStyles, textColorStyles, resizerStyles, gridStyles, smartCardStyles, embedCardStyles, codeBlockInListSafariFix, unsupportedStyles } from '@atlaskit/editor-common/styles';
|
|
5
5
|
import { blockNodesVerticalMargin, editorFontSize } from '@atlaskit/editor-shared-styles';
|
|
6
|
-
import { unsupportedStyles } from '../../plugins/unsupported-content/styles';
|
|
7
6
|
import { telepointerStyle } from '../../plugins/collab-edit/styles';
|
|
8
7
|
import { gapCursorStyles } from '../../plugins/selection/gap-cursor/styles';
|
|
9
8
|
import { tableStyles } from '@atlaskit/editor-plugin-table/ui/common-styles';
|
|
@@ -34,6 +34,7 @@ import { PluginPerformanceObserver } from '../utils/performance/plugin-performan
|
|
|
34
34
|
import { getParticipantsCount } from '../plugins/collab-edit/get-participants-count';
|
|
35
35
|
import { EVENT_NAME_DISPATCH_TRANSACTION, EVENT_NAME_STATE_APPLY, EVENT_NAME_UPDATE_STATE, EVENT_NAME_VIEW_STATE_UPDATED, EVENT_NAME_ON_CHANGE, TransactionTracker } from '../utils/performance/track-transactions';
|
|
36
36
|
import { countNodes as _countNodes } from '@atlaskit/editor-common/utils';
|
|
37
|
+
import createPluginsList from './create-plugins-list';
|
|
37
38
|
import { PROSEMIRROR_RENDERED_NORMAL_SEVERITY_THRESHOLD, PROSEMIRROR_RENDERED_DEGRADED_SEVERITY_THRESHOLD, DEFAULT_SAMPLING_RATE_VALID_TRANSACTIONS } from './consts';
|
|
38
39
|
import ReactEditorViewContext from './ReactEditorViewContext';
|
|
39
40
|
import { EditorPluginInjectionAPI } from '@atlaskit/editor-common/preset';
|
|
@@ -753,9 +754,7 @@ export var ReactEditorView = /*#__PURE__*/function (_React$Component) {
|
|
|
753
754
|
value:
|
|
754
755
|
// Helper to allow tests to inject plugins directly
|
|
755
756
|
function getPlugins(preset) {
|
|
756
|
-
var plugins = preset.
|
|
757
|
-
pluginInjectionAPI: this.pluginInjectionAPI
|
|
758
|
-
});
|
|
757
|
+
var plugins = createPluginsList(preset, this.props.editorProps, this.pluginInjectionAPI);
|
|
759
758
|
this.editorPlugins = plugins;
|
|
760
759
|
return this.editorPlugins;
|
|
761
760
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
3
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
-
import createUniversalPreset from '../labs/next/presets/universal';
|
|
5
4
|
import { GUTTER_SIZE_MOBILE_IN_PX } from '@atlaskit/editor-common/utils';
|
|
6
5
|
import { isFullPage as fullPageCheck } from '../utils/is-full-page';
|
|
7
6
|
import { createFeatureFlagsFromProps } from './feature-flags-from-props';
|
|
@@ -102,8 +101,7 @@ export function getDefaultPresetOptionsFromEditorProps(props, createAnalyticsEve
|
|
|
102
101
|
* Note: The order that presets are added determines
|
|
103
102
|
* their placement in the editor toolbar
|
|
104
103
|
*/
|
|
105
|
-
export default function createPluginsList(props,
|
|
106
|
-
var preset = createUniversalPreset(props.appearance, getDefaultPresetOptionsFromEditorProps(props), createFeatureFlagsFromProps(props), prevProps === null || prevProps === void 0 ? void 0 : prevProps.appearance);
|
|
104
|
+
export default function createPluginsList(preset, props, pluginInjectionAPI) {
|
|
107
105
|
var excludes = new Set();
|
|
108
106
|
if (!isCodeBlockAllowed({
|
|
109
107
|
allowBlockType: props.allowBlockType
|
|
@@ -111,30 +109,7 @@ export default function createPluginsList(props, prevProps) {
|
|
|
111
109
|
excludes.add('codeBlock');
|
|
112
110
|
}
|
|
113
111
|
return preset.build({
|
|
112
|
+
pluginInjectionAPI: pluginInjectionAPI,
|
|
114
113
|
excludePlugins: excludes
|
|
115
114
|
});
|
|
116
|
-
}
|
|
117
|
-
function withDangerouslyAppendPlugins(preset) {
|
|
118
|
-
function createEditorNextPluginsFromDangerouslyAppended(plugins) {
|
|
119
|
-
return plugins ? plugins.map(function (plugin) {
|
|
120
|
-
return function () {
|
|
121
|
-
return plugin;
|
|
122
|
-
};
|
|
123
|
-
}) : [];
|
|
124
|
-
}
|
|
125
|
-
return function (editorPluginsToAppend) {
|
|
126
|
-
if (!editorPluginsToAppend || editorPluginsToAppend.length === 0) {
|
|
127
|
-
return preset;
|
|
128
|
-
}
|
|
129
|
-
var nextEditorPluginsToAppend = createEditorNextPluginsFromDangerouslyAppended(editorPluginsToAppend);
|
|
130
|
-
var presetWithAppendedPlugins = nextEditorPluginsToAppend.reduce(function (acc, plugin) {
|
|
131
|
-
return acc.add(plugin);
|
|
132
|
-
}, preset);
|
|
133
|
-
return presetWithAppendedPlugins;
|
|
134
|
-
};
|
|
135
|
-
}
|
|
136
|
-
export function createPreset(props, prevProps) {
|
|
137
|
-
var _props$dangerouslyApp;
|
|
138
|
-
var preset = createUniversalPreset(props.appearance, getDefaultPresetOptionsFromEditorProps(props), createFeatureFlagsFromProps(props), prevProps === null || prevProps === void 0 ? void 0 : prevProps.appearance);
|
|
139
|
-
return withDangerouslyAppendPlugins(preset)((_props$dangerouslyApp = props.dangerouslyAppendPlugins) === null || _props$dangerouslyApp === void 0 ? void 0 : _props$dangerouslyApp.__plugins);
|
|
140
115
|
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import createUniversalPreset from '../labs/next/presets/universal';
|
|
2
|
+
import { getDefaultPresetOptionsFromEditorProps } from './create-plugins-list';
|
|
3
|
+
import { createFeatureFlagsFromProps } from './feature-flags-from-props';
|
|
4
|
+
// Separate file, we should not accidentally import this into the `ComposableEditor`
|
|
5
|
+
// otherwise it will blow up the bundle size.
|
|
6
|
+
export function createPreset(props, prevProps) {
|
|
7
|
+
var _props$dangerouslyApp;
|
|
8
|
+
var preset = createUniversalPreset(props.appearance, getDefaultPresetOptionsFromEditorProps(props), createFeatureFlagsFromProps(props), prevProps === null || prevProps === void 0 ? void 0 : prevProps.appearance);
|
|
9
|
+
return withDangerouslyAppendPlugins(preset)((_props$dangerouslyApp = props.dangerouslyAppendPlugins) === null || _props$dangerouslyApp === void 0 ? void 0 : _props$dangerouslyApp.__plugins);
|
|
10
|
+
}
|
|
11
|
+
function withDangerouslyAppendPlugins(preset) {
|
|
12
|
+
function createEditorNextPluginsFromDangerouslyAppended(plugins) {
|
|
13
|
+
return plugins ? plugins.map(function (plugin) {
|
|
14
|
+
return function () {
|
|
15
|
+
return plugin;
|
|
16
|
+
};
|
|
17
|
+
}) : [];
|
|
18
|
+
}
|
|
19
|
+
return function (editorPluginsToAppend) {
|
|
20
|
+
if (!editorPluginsToAppend || editorPluginsToAppend.length === 0) {
|
|
21
|
+
return preset;
|
|
22
|
+
}
|
|
23
|
+
var nextEditorPluginsToAppend = createEditorNextPluginsFromDangerouslyAppended(editorPluginsToAppend);
|
|
24
|
+
var presetWithAppendedPlugins = nextEditorPluginsToAppend.reduce(function (acc, plugin) {
|
|
25
|
+
return acc.add(plugin);
|
|
26
|
+
}, preset);
|
|
27
|
+
return presetWithAppendedPlugins;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
@@ -6,7 +6,7 @@ import clearMarksOnChangeToEmptyDocumentPlugin from '../../../plugins/clear-mark
|
|
|
6
6
|
import { hyperlinkPlugin } from '@atlaskit/editor-plugin-hyperlink';
|
|
7
7
|
import { textFormattingPlugin } from '@atlaskit/editor-plugin-text-formatting';
|
|
8
8
|
import { widthPlugin } from '@atlaskit/editor-plugin-width';
|
|
9
|
-
import unsupportedContentPlugin from '
|
|
9
|
+
import { unsupportedContentPlugin } from '@atlaskit/editor-plugin-unsupported-content';
|
|
10
10
|
import { basePlugin } from '../../../plugins/base';
|
|
11
11
|
import { focusPlugin } from '@atlaskit/editor-plugin-focus';
|
|
12
12
|
import { editorDisabledPlugin } from '@atlaskit/editor-plugin-editor-disabled';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
2
|
import { useLayoutEffect, useState } from 'react';
|
|
3
3
|
import { usePreviousState } from '@atlaskit/editor-common/hooks';
|
|
4
|
-
import { createPreset } from '../../../create-editor/create-
|
|
4
|
+
import { createPreset } from '../../../create-editor/create-preset';
|
|
5
5
|
import { shouldRecreatePreset } from '../../../create-editor/preset-utils';
|
|
6
6
|
export default function useUniversalPreset(_ref) {
|
|
7
7
|
var props = _ref.props;
|
|
@@ -29,7 +29,6 @@ export { default as submitEditorPlugin } from './submit-editor';
|
|
|
29
29
|
export { default as tasksAndDecisionsPlugin } from './tasks-and-decisions';
|
|
30
30
|
export { default as textColorPlugin } from './text-color';
|
|
31
31
|
export { default as typeAheadPlugin } from './type-ahead';
|
|
32
|
-
export { default as unsupportedContentPlugin } from './unsupported-content';
|
|
33
32
|
export { default as floatingToolbarPlugin } from './floating-toolbar';
|
|
34
33
|
export { default as statusPlugin } from './status';
|
|
35
34
|
export { default as breakoutPlugin } from './breakout';
|
|
@@ -29,7 +29,7 @@ import { MediaInlineNodeSelector, MediaSingleNodeSelector } from '../nodeviews/s
|
|
|
29
29
|
import ImageBorderItem from '../ui/ImageBorder';
|
|
30
30
|
import { currentMediaNodeBorderMark } from '../utils/current-media-node';
|
|
31
31
|
import { shouldShowImageBorder } from './imageBorder';
|
|
32
|
-
import { PixelEntry } from '../ui/PixelEntry';
|
|
32
|
+
import { PixelEntry, FullWidthDisplay } from '../ui/PixelEntry';
|
|
33
33
|
import { DEFAULT_IMAGE_WIDTH, DEFAULT_IMAGE_HEIGHT, calcMinWidth, getMaxWidthForNestedNodeNext } from '@atlaskit/editor-common/media-single';
|
|
34
34
|
import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth } from '@atlaskit/editor-shared-styles';
|
|
35
35
|
var remove = function remove(state, dispatch) {
|
|
@@ -257,20 +257,17 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
257
257
|
|
|
258
258
|
// Pixel Entry Toolbar Support
|
|
259
259
|
if (getBooleanFF('platform.editor.media.extended-resize-experience') && allowResizing) {
|
|
260
|
+
var selectedMediaSingleNode = getSelectedMediaSingle(state);
|
|
260
261
|
var sizeInput = {
|
|
261
262
|
type: 'custom',
|
|
262
263
|
fallback: [],
|
|
263
264
|
render: function render(editorView) {
|
|
264
265
|
var _widthPlugin$sharedSt2;
|
|
265
|
-
if (!editorView) {
|
|
266
|
+
if (!editorView || !selectedMediaSingleNode) {
|
|
266
267
|
return null;
|
|
267
268
|
}
|
|
268
269
|
var state = editorView.state,
|
|
269
270
|
dispatch = editorView.dispatch;
|
|
270
|
-
var selectedMediaSingleNode = getSelectedMediaSingle(state);
|
|
271
|
-
if (!selectedMediaSingleNode) {
|
|
272
|
-
return null;
|
|
273
|
-
}
|
|
274
271
|
var contentWidth = (widthPlugin === null || widthPlugin === void 0 ? void 0 : (_widthPlugin$sharedSt2 = widthPlugin.sharedState.currentState()) === null || _widthPlugin$sharedSt2 === void 0 ? void 0 : _widthPlugin$sharedSt2.lineLength) || akEditorDefaultLayoutWidth;
|
|
275
272
|
var selectedMediaNode = selectedMediaSingleNode.node.content.firstChild;
|
|
276
273
|
if (!selectedMediaNode) {
|
|
@@ -333,7 +330,24 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
333
330
|
}
|
|
334
331
|
};
|
|
335
332
|
if (pluginState.isResizing) {
|
|
336
|
-
// If the image is resizing
|
|
333
|
+
// If the image is resizing
|
|
334
|
+
// then return pixel entry component or full width label as the only toolbar item
|
|
335
|
+
if (!selectedMediaSingleNode) {
|
|
336
|
+
return [];
|
|
337
|
+
}
|
|
338
|
+
var layout = selectedMediaSingleNode.node.attrs.layout;
|
|
339
|
+
if (layout === 'full-width') {
|
|
340
|
+
var fullWidthLabel = {
|
|
341
|
+
type: 'custom',
|
|
342
|
+
fallback: [],
|
|
343
|
+
render: function render() {
|
|
344
|
+
return /*#__PURE__*/React.createElement(FullWidthDisplay, {
|
|
345
|
+
intl: intl
|
|
346
|
+
});
|
|
347
|
+
}
|
|
348
|
+
};
|
|
349
|
+
return [fullWidthLabel];
|
|
350
|
+
}
|
|
337
351
|
return [sizeInput];
|
|
338
352
|
}
|
|
339
353
|
toolbarButtons.push(sizeInput);
|
|
@@ -7,7 +7,7 @@ import Textfield from '@atlaskit/textfield';
|
|
|
7
7
|
import Tooltip from '@atlaskit/tooltip';
|
|
8
8
|
import Button from '@atlaskit/button';
|
|
9
9
|
import Form, { Field } from '@atlaskit/form';
|
|
10
|
-
import { pixelSizingInput, pixelSizingLabel, pixelSizingWidthInput, pixelSizingHeightInput, pixelSizingWrapper, pixelEntryForm, pixelEntryHiddenSubmit } from './styles';
|
|
10
|
+
import { pixelSizingInput, pixelSizingLabel, pixelSizingWidthInput, pixelSizingHeightInput, pixelSizingWrapper, pixelEntryForm, pixelEntryHiddenSubmit, pixelSizingFullWidthLabelStyles } from './styles';
|
|
11
11
|
import { messages } from './messages';
|
|
12
12
|
import { PIXELENTRY_MIGRATION_BUTTON_TESTID } from './constants';
|
|
13
13
|
export var PixelEntry = function PixelEntry(_ref) {
|
|
@@ -175,4 +175,10 @@ export var PixelEntry = function PixelEntry(_ref) {
|
|
|
175
175
|
type: "submit"
|
|
176
176
|
}, formatMessage(messages.submitButtonText))));
|
|
177
177
|
}));
|
|
178
|
+
};
|
|
179
|
+
export var FullWidthDisplay = function FullWidthDisplay(_ref5) {
|
|
180
|
+
var formatMessage = _ref5.intl.formatMessage;
|
|
181
|
+
return jsx("div", {
|
|
182
|
+
css: pixelSizingFullWidthLabelStyles
|
|
183
|
+
}, jsx("span", null, formatMessage(messages.fullWidthLabel)));
|
|
178
184
|
};
|
|
@@ -30,6 +30,11 @@ export var messages = defineMessages({
|
|
|
30
30
|
defaultMessage: 'Submit',
|
|
31
31
|
description: 'The text give to the hidden submit button'
|
|
32
32
|
},
|
|
33
|
+
fullWidthLabel: {
|
|
34
|
+
id: 'fabric.editor.image.fullWidthLabel',
|
|
35
|
+
defaultMessage: 'Full-width',
|
|
36
|
+
description: 'The media has reached its maximum width'
|
|
37
|
+
},
|
|
33
38
|
migrationButtonText: {
|
|
34
39
|
id: 'fabric.editor.media.pixelEntry.migrationButtonText',
|
|
35
40
|
defaultMessage: 'Convert to pixels',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
|
|
2
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
|
|
3
3
|
import { css } from '@emotion/react';
|
|
4
4
|
var PIXEL_SIZING_WRAPPER_MINIMUM_WIDTH = 120;
|
|
5
5
|
export var pixelSizingWrapper = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: grid;\n grid-template-columns: 1fr 1em 1fr 0;\n grid-template-rows: auto;\n grid-template-areas: 'widthinput label heightinput submit';\n width: ", "px;\n text-align: center;\n height: ", ";\n\n // Atlaskit fieldset does not allow style override\n & > * {\n margin-top: 0 !important;\n }\n"])), PIXEL_SIZING_WRAPPER_MINIMUM_WIDTH, "var(--ds-space-300, 24px)");
|
|
@@ -8,4 +8,5 @@ export var pixelSizingInput = css(_templateObject3 || (_templateObject3 = _tagge
|
|
|
8
8
|
export var pixelSizingLabel = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n grid-area: label;\n line-height: ", ";\n"])), "var(--ds-space-300, 24px)");
|
|
9
9
|
export var pixelSizingWidthInput = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n grid-area: widthinput;\n"])));
|
|
10
10
|
export var pixelSizingHeightInput = css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n grid-area: heightinput;\n"])));
|
|
11
|
-
export var pixelEntryHiddenSubmit = css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n grid-area: submit;\n visibility: hidden;\n width: 0;\n height: 0;\n"])));
|
|
11
|
+
export var pixelEntryHiddenSubmit = css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n grid-area: submit;\n visibility: hidden;\n width: 0;\n height: 0;\n"])));
|
|
12
|
+
export var pixelSizingFullWidthLabelStyles = css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n min-width: ", "px;\n height: ", ";\n display: flex;\n justify-content: center;\n align-items: center;\n"])), PIXEL_SIZING_WRAPPER_MINIMUM_WIDTH, "var(--ds-space-300, 24px)");
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { TableSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
1
|
+
import { TableSharedCssClassName, UnsupportedSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
2
2
|
import { Side } from './selection';
|
|
3
|
-
import { UnsupportedSharedCssClassName } from '../../unsupported-content/styles';
|
|
4
3
|
import { CAPTION_PLACEHOLDER_ID } from '../../media/ui/CaptionPlaceholder';
|
|
5
4
|
export var isLeftCursor = function isLeftCursor(side) {
|
|
6
5
|
return side === Side.LEFT;
|
|
@@ -3,9 +3,8 @@ var _templateObject, _templateObject2, _templateObject3;
|
|
|
3
3
|
/** @jsx jsx */
|
|
4
4
|
import React, { useMemo } from 'react';
|
|
5
5
|
import { jsx, css, useTheme } from '@emotion/react';
|
|
6
|
-
import { whitespaceSharedStyles, paragraphSharedStyles, listsSharedStyles, indentationSharedStyles, blockMarksSharedStyles, shadowSharedStyle, dateSharedStyle, tasksAndDecisionsStyles, annotationSharedStyles, smartCardSharedStyles, textColorStyles, resizerStyles, gridStyles, smartCardStyles, embedCardStyles, codeBlockInListSafariFix } from '@atlaskit/editor-common/styles';
|
|
6
|
+
import { whitespaceSharedStyles, paragraphSharedStyles, listsSharedStyles, indentationSharedStyles, blockMarksSharedStyles, shadowSharedStyle, dateSharedStyle, tasksAndDecisionsStyles, annotationSharedStyles, smartCardSharedStyles, textColorStyles, resizerStyles, gridStyles, smartCardStyles, embedCardStyles, codeBlockInListSafariFix, unsupportedStyles } from '@atlaskit/editor-common/styles';
|
|
7
7
|
import { blockNodesVerticalMargin, editorFontSize } from '@atlaskit/editor-shared-styles';
|
|
8
|
-
import { unsupportedStyles } from '../../plugins/unsupported-content/styles';
|
|
9
8
|
import { telepointerStyle } from '../../plugins/collab-edit/styles';
|
|
10
9
|
import { gapCursorStyles } from '../../plugins/selection/gap-cursor/styles';
|
|
11
10
|
import { tableStyles } from '@atlaskit/editor-plugin-table/ui/common-styles';
|
|
@@ -4,7 +4,7 @@ import type { EditorPluginFeatureProps } from '../types/editor-props';
|
|
|
4
4
|
import type { ScrollGutterPluginOptions } from '../plugins/base/pm-plugins/scroll-gutter';
|
|
5
5
|
import type { DefaultPresetPluginOptions } from '../labs/next/presets/default';
|
|
6
6
|
import type { EditorPresetProps } from '../labs/next/presets/types';
|
|
7
|
-
import type { EditorPresetBuilder } from '@atlaskit/editor-common/preset';
|
|
7
|
+
import type { EditorPresetBuilder, EditorPluginInjectionAPI } from '@atlaskit/editor-common/preset';
|
|
8
8
|
export declare function getScrollGutterOptions(props: EditorProps): ScrollGutterPluginOptions | undefined;
|
|
9
9
|
export declare function getDefaultPresetOptionsFromEditorProps(props: EditorProps, createAnalyticsEvent?: CreateUIAnalyticsEvent): EditorPresetProps & DefaultPresetPluginOptions & EditorPluginFeatureProps;
|
|
10
10
|
/**
|
|
@@ -13,5 +13,4 @@ export declare function getDefaultPresetOptionsFromEditorProps(props: EditorProp
|
|
|
13
13
|
* Note: The order that presets are added determines
|
|
14
14
|
* their placement in the editor toolbar
|
|
15
15
|
*/
|
|
16
|
-
export default function createPluginsList(props: EditorProps,
|
|
17
|
-
export declare function createPreset(props: EditorProps, prevProps?: EditorProps): EditorPresetBuilder<any, any>;
|
|
16
|
+
export default function createPluginsList(preset: EditorPresetBuilder<any, any>, props: EditorProps, pluginInjectionAPI?: EditorPluginInjectionAPI): EditorPlugin[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { NextEditorPlugin } from '../../types';
|
|
2
2
|
import type { ScrollGutterPluginOptions } from './pm-plugins/scroll-gutter';
|
|
3
3
|
import type { InputTracking, BrowserFreezetracking } from '../../types/performance-tracking';
|
|
4
|
-
import type
|
|
4
|
+
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
5
5
|
import type { ContextIdentifierProvider } from '@atlaskit/editor-common/provider-factory';
|
|
6
6
|
export interface BasePluginOptions {
|
|
7
7
|
allowScrollGutter?: ScrollGutterPluginOptions;
|
|
@@ -15,7 +15,7 @@ export type BasePluginState = {
|
|
|
15
15
|
};
|
|
16
16
|
export type BasePlugin = NextEditorPlugin<'base', {
|
|
17
17
|
pluginConfiguration: BasePluginOptions | undefined;
|
|
18
|
-
dependencies: [
|
|
18
|
+
dependencies: [FeatureFlagsPlugin];
|
|
19
19
|
sharedState: BasePluginState;
|
|
20
20
|
}>;
|
|
21
21
|
export declare const isChromeWithSelectionBug: any;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
2
|
-
import type {
|
|
2
|
+
import type { WidthPlugin } from '@atlaskit/editor-plugin-width';
|
|
3
3
|
import type { BreakoutPluginState } from './types';
|
|
4
4
|
interface BreakoutPluginOptions {
|
|
5
5
|
allowBreakoutButton?: boolean;
|
|
6
6
|
}
|
|
7
7
|
declare const breakoutPlugin: NextEditorPlugin<'breakout', {
|
|
8
8
|
pluginConfiguration: BreakoutPluginOptions | undefined;
|
|
9
|
-
dependencies: [
|
|
9
|
+
dependencies: [WidthPlugin];
|
|
10
10
|
sharedState: Partial<BreakoutPluginState>;
|
|
11
11
|
}>;
|
|
12
12
|
export default breakoutPlugin;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { ExtensionHandlers } from '@atlaskit/editor-common/extensions';
|
|
2
|
-
import type
|
|
2
|
+
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
3
3
|
import type { NextEditorPlugin, EditorAppearance, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
4
4
|
import type { LongPressSelectionPluginOptions } from '@atlaskit/editor-common/types';
|
|
5
|
-
import type {
|
|
6
|
-
import type {
|
|
7
|
-
import type {
|
|
5
|
+
import type { WidthPlugin } from '@atlaskit/editor-plugin-width';
|
|
6
|
+
import type { DecorationsPlugin } from '@atlaskit/editor-plugin-decorations';
|
|
7
|
+
import type { ContextPanelPlugin } from '@atlaskit/editor-plugin-context-panel';
|
|
8
8
|
interface ExtensionPluginOptions extends LongPressSelectionPluginOptions {
|
|
9
9
|
allowAutoSave?: boolean;
|
|
10
10
|
breakoutEnabled?: boolean;
|
|
@@ -14,10 +14,10 @@ interface ExtensionPluginOptions extends LongPressSelectionPluginOptions {
|
|
|
14
14
|
declare const extensionPlugin: NextEditorPlugin<'extension', {
|
|
15
15
|
pluginConfiguration: ExtensionPluginOptions | undefined;
|
|
16
16
|
dependencies: [
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
OptionalPlugin<
|
|
17
|
+
FeatureFlagsPlugin,
|
|
18
|
+
WidthPlugin,
|
|
19
|
+
DecorationsPlugin,
|
|
20
|
+
OptionalPlugin<ContextPanelPlugin>
|
|
21
21
|
];
|
|
22
22
|
}>;
|
|
23
23
|
export default extensionPlugin;
|
|
@@ -9,7 +9,7 @@ import type { ForwardRef, getPosHandler } from '../../../nodeviews';
|
|
|
9
9
|
import ReactNodeView from '@atlaskit/editor-common/react-node-view';
|
|
10
10
|
import type { PortalProviderAPI } from '@atlaskit/editor-common/portal-provider';
|
|
11
11
|
import type { EventDispatcher } from '../../../event-dispatcher';
|
|
12
|
-
import type {
|
|
12
|
+
import type { WidthPlugin } from '@atlaskit/editor-plugin-width';
|
|
13
13
|
interface ExtensionNodeViewOptions {
|
|
14
14
|
appearance?: EditorAppearance;
|
|
15
15
|
}
|
|
@@ -25,8 +25,8 @@ export declare class ExtensionNode extends ReactNodeView {
|
|
|
25
25
|
providerFactory: ProviderFactory;
|
|
26
26
|
extensionHandlers: ExtensionHandlers;
|
|
27
27
|
extensionNodeViewOptions?: ExtensionNodeViewOptions;
|
|
28
|
-
pluginInjectionApi: PluginInjectionAPIWithDependency<
|
|
28
|
+
pluginInjectionApi: PluginInjectionAPIWithDependency<WidthPlugin> | undefined;
|
|
29
29
|
}, forwardRef: ForwardRef): JSX.Element;
|
|
30
30
|
}
|
|
31
|
-
export default function ExtensionNodeView(portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, extensionHandlers: ExtensionHandlers, extensionNodeViewOptions: ExtensionNodeViewOptions, pluginInjectionApi: PluginInjectionAPIWithDependency<
|
|
31
|
+
export default function ExtensionNodeView(portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, extensionHandlers: ExtensionHandlers, extensionNodeViewOptions: ExtensionNodeViewOptions, pluginInjectionApi: PluginInjectionAPIWithDependency<WidthPlugin> | undefined): (node: PmNode, view: EditorView, getPos: getPosHandler) => NodeView;
|
|
32
32
|
export {};
|
|
@@ -4,7 +4,7 @@ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
|
4
4
|
import type { ExtensionProvider, ReferenceEntity } from '@atlaskit/editor-common/extensions';
|
|
5
5
|
import type { ProsemirrorGetPosHandler } from '../../../../../nodeviews';
|
|
6
6
|
import type { EditorAppearance } from '../../../../../types/editor-appearance';
|
|
7
|
-
import type {
|
|
7
|
+
import type { WidthPlugin } from '@atlaskit/editor-plugin-width';
|
|
8
8
|
import type { PluginInjectionAPIWithDependency } from '@atlaskit/editor-common/types';
|
|
9
9
|
export interface Props {
|
|
10
10
|
node: PmNode;
|
|
@@ -16,7 +16,7 @@ export interface Props {
|
|
|
16
16
|
references?: ReferenceEntity[];
|
|
17
17
|
hideFrame?: boolean;
|
|
18
18
|
editorAppearance?: EditorAppearance;
|
|
19
|
-
pluginInjectionApi: PluginInjectionAPIWithDependency<
|
|
19
|
+
pluginInjectionApi: PluginInjectionAPIWithDependency<WidthPlugin> | undefined;
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
22
|
* End workaround
|
|
@@ -5,7 +5,7 @@ import { getNodeRenderer, getExtensionModuleNodePrivateProps } from '@atlaskit/e
|
|
|
5
5
|
import type { ExtensionHandlers, ExtensionProvider, ReferenceEntity } from '@atlaskit/editor-common/extensions';
|
|
6
6
|
import type { ProsemirrorGetPosHandler } from '../../../../nodeviews';
|
|
7
7
|
import type { EditorAppearance } from '../../../../types/editor-appearance';
|
|
8
|
-
import type {
|
|
8
|
+
import type { WidthPlugin } from '@atlaskit/editor-plugin-width';
|
|
9
9
|
import type { PluginInjectionAPIWithDependency } from '@atlaskit/editor-common/types';
|
|
10
10
|
export interface Props {
|
|
11
11
|
editorView: EditorView;
|
|
@@ -16,7 +16,7 @@ export interface Props {
|
|
|
16
16
|
extensionProvider?: Promise<ExtensionProvider>;
|
|
17
17
|
references?: ReferenceEntity[];
|
|
18
18
|
editorAppearance?: EditorAppearance;
|
|
19
|
-
pluginInjectionApi: PluginInjectionAPIWithDependency<
|
|
19
|
+
pluginInjectionApi: PluginInjectionAPIWithDependency<WidthPlugin> | undefined;
|
|
20
20
|
}
|
|
21
21
|
export interface State {
|
|
22
22
|
extensionProvider?: ExtensionProvider;
|
|
@@ -5,7 +5,7 @@ import type { ExtensionHandlers, ReferenceEntity } from '@atlaskit/editor-common
|
|
|
5
5
|
import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
6
6
|
import type { ProsemirrorGetPosHandler } from '../../../../nodeviews/types';
|
|
7
7
|
import type { EditorAppearance } from '../../../../types/editor-appearance';
|
|
8
|
-
import type {
|
|
8
|
+
import type { WidthPlugin } from '@atlaskit/editor-plugin-width';
|
|
9
9
|
import type { PluginInjectionAPIWithDependency } from '@atlaskit/editor-common/types';
|
|
10
10
|
export interface Props {
|
|
11
11
|
editorView: EditorView;
|
|
@@ -16,7 +16,7 @@ export interface Props {
|
|
|
16
16
|
extensionHandlers: ExtensionHandlers;
|
|
17
17
|
references?: ReferenceEntity[];
|
|
18
18
|
editorAppearance?: EditorAppearance;
|
|
19
|
-
pluginInjectionApi: PluginInjectionAPIWithDependency<
|
|
19
|
+
pluginInjectionApi: PluginInjectionAPIWithDependency<WidthPlugin> | undefined;
|
|
20
20
|
}
|
|
21
21
|
export default class Extension extends Component<Props, any> {
|
|
22
22
|
static displayName: string;
|
|
@@ -30,7 +30,6 @@ export { default as submitEditorPlugin } from './submit-editor';
|
|
|
30
30
|
export { default as tasksAndDecisionsPlugin } from './tasks-and-decisions';
|
|
31
31
|
export { default as textColorPlugin } from './text-color';
|
|
32
32
|
export { default as typeAheadPlugin } from './type-ahead';
|
|
33
|
-
export { default as unsupportedContentPlugin } from './unsupported-content';
|
|
34
33
|
export { default as floatingToolbarPlugin } from './floating-toolbar';
|
|
35
34
|
export { default as statusPlugin } from './status';
|
|
36
35
|
export { default as breakoutPlugin } from './breakout';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
5
|
-
import type {
|
|
6
|
-
import type {
|
|
1
|
+
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
2
|
+
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
3
|
+
import type { GuidelinePlugin } from '@atlaskit/editor-plugin-guideline';
|
|
4
|
+
import type { GridPlugin } from '@atlaskit/editor-plugin-grid';
|
|
5
|
+
import type { WidthPlugin } from '@atlaskit/editor-plugin-width';
|
|
6
|
+
import type { DecorationsPlugin } from '@atlaskit/editor-plugin-decorations';
|
|
7
7
|
import type { MediaPluginState } from './pm-plugins/types';
|
|
8
8
|
import type { FloatingToolbarPlugin } from '@atlaskit/editor-plugin-floating-toolbar';
|
|
9
9
|
import type { EditorDisabledPlugin } from '@atlaskit/editor-plugin-editor-disabled';
|
|
@@ -13,12 +13,12 @@ import type { MediaOptions } from './types';
|
|
|
13
13
|
export type MediaNextEditorPluginType = NextEditorPlugin<'media', {
|
|
14
14
|
pluginConfiguration: MediaOptions | undefined;
|
|
15
15
|
dependencies: [
|
|
16
|
-
|
|
17
|
-
OptionalPlugin<
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
FeatureFlagsPlugin,
|
|
17
|
+
OptionalPlugin<AnalyticsPlugin>,
|
|
18
|
+
GuidelinePlugin,
|
|
19
|
+
GridPlugin,
|
|
20
|
+
WidthPlugin,
|
|
21
|
+
DecorationsPlugin,
|
|
22
22
|
FloatingToolbarPlugin,
|
|
23
23
|
EditorDisabledPlugin,
|
|
24
24
|
FocusPlugin
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
/** @jsx jsx */
|
|
2
3
|
import { jsx } from '@emotion/react';
|
|
4
|
+
import type { IntlShape } from 'react-intl-next';
|
|
3
5
|
import type { PixelEntryProps } from './types';
|
|
4
6
|
export declare const PixelEntry: ({ width, mediaWidth, mediaHeight, onSubmit, validate, minWidth, maxWidth, intl: { formatMessage }, showMigration, onMigrate, }: PixelEntryProps) => jsx.JSX.Element;
|
|
7
|
+
export declare const FullWidthDisplay: React.FC<{
|
|
8
|
+
intl: IntlShape;
|
|
9
|
+
}>;
|
|
@@ -5,3 +5,4 @@ export declare const pixelSizingLabel: import("@emotion/react").SerializedStyles
|
|
|
5
5
|
export declare const pixelSizingWidthInput: import("@emotion/react").SerializedStyles;
|
|
6
6
|
export declare const pixelSizingHeightInput: import("@emotion/react").SerializedStyles;
|
|
7
7
|
export declare const pixelEntryHiddenSubmit: import("@emotion/react").SerializedStyles;
|
|
8
|
+
export declare const pixelSizingFullWidthLabelStyles: import("@emotion/react").SerializedStyles;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
2
|
-
import type
|
|
3
|
-
import type {
|
|
2
|
+
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
3
|
+
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
4
4
|
import type { ListPlugin } from '@atlaskit/editor-plugin-list';
|
|
5
5
|
import type { IndentationButtons } from './pm-plugins/indentation-buttons';
|
|
6
6
|
type Config = {
|
|
@@ -10,9 +10,9 @@ type Config = {
|
|
|
10
10
|
declare const toolbarListsIndentationPlugin: NextEditorPlugin<'toolbarListsIndentation', {
|
|
11
11
|
pluginConfiguration: Config;
|
|
12
12
|
dependencies: [
|
|
13
|
-
|
|
13
|
+
FeatureFlagsPlugin,
|
|
14
14
|
ListPlugin,
|
|
15
|
-
OptionalPlugin<
|
|
15
|
+
OptionalPlugin<AnalyticsPlugin>
|
|
16
16
|
];
|
|
17
17
|
sharedState: IndentationButtons | undefined;
|
|
18
18
|
}>;
|
|
@@ -4,7 +4,7 @@ import type { EditorPluginFeatureProps } from '../types/editor-props';
|
|
|
4
4
|
import type { ScrollGutterPluginOptions } from '../plugins/base/pm-plugins/scroll-gutter';
|
|
5
5
|
import type { DefaultPresetPluginOptions } from '../labs/next/presets/default';
|
|
6
6
|
import type { EditorPresetProps } from '../labs/next/presets/types';
|
|
7
|
-
import type { EditorPresetBuilder } from '@atlaskit/editor-common/preset';
|
|
7
|
+
import type { EditorPresetBuilder, EditorPluginInjectionAPI } from '@atlaskit/editor-common/preset';
|
|
8
8
|
export declare function getScrollGutterOptions(props: EditorProps): ScrollGutterPluginOptions | undefined;
|
|
9
9
|
export declare function getDefaultPresetOptionsFromEditorProps(props: EditorProps, createAnalyticsEvent?: CreateUIAnalyticsEvent): EditorPresetProps & DefaultPresetPluginOptions & EditorPluginFeatureProps;
|
|
10
10
|
/**
|
|
@@ -13,5 +13,4 @@ export declare function getDefaultPresetOptionsFromEditorProps(props: EditorProp
|
|
|
13
13
|
* Note: The order that presets are added determines
|
|
14
14
|
* their placement in the editor toolbar
|
|
15
15
|
*/
|
|
16
|
-
export default function createPluginsList(props: EditorProps,
|
|
17
|
-
export declare function createPreset(props: EditorProps, prevProps?: EditorProps): EditorPresetBuilder<any, any>;
|
|
16
|
+
export default function createPluginsList(preset: EditorPresetBuilder<any, any>, props: EditorProps, pluginInjectionAPI?: EditorPluginInjectionAPI): EditorPlugin[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { NextEditorPlugin } from '../../types';
|
|
2
2
|
import type { ScrollGutterPluginOptions } from './pm-plugins/scroll-gutter';
|
|
3
3
|
import type { InputTracking, BrowserFreezetracking } from '../../types/performance-tracking';
|
|
4
|
-
import type
|
|
4
|
+
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
5
5
|
import type { ContextIdentifierProvider } from '@atlaskit/editor-common/provider-factory';
|
|
6
6
|
export interface BasePluginOptions {
|
|
7
7
|
allowScrollGutter?: ScrollGutterPluginOptions;
|
|
@@ -16,7 +16,7 @@ export type BasePluginState = {
|
|
|
16
16
|
export type BasePlugin = NextEditorPlugin<'base', {
|
|
17
17
|
pluginConfiguration: BasePluginOptions | undefined;
|
|
18
18
|
dependencies: [
|
|
19
|
-
|
|
19
|
+
FeatureFlagsPlugin
|
|
20
20
|
];
|
|
21
21
|
sharedState: BasePluginState;
|
|
22
22
|
}>;
|