@atlaskit/editor-core 187.35.1 → 187.35.3
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 +24 -0
- package/dist/cjs/labs/next/presets/default.js +2 -2
- package/dist/cjs/plugins/media/toolbar/index.js +8 -1
- package/dist/cjs/plugins/media/toolbar/utils.js +15 -2
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/labs/next/presets/default.js +1 -1
- package/dist/es2019/plugins/media/toolbar/index.js +10 -2
- package/dist/es2019/plugins/media/toolbar/utils.js +12 -0
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/labs/next/presets/default.js +1 -1
- package/dist/esm/plugins/media/toolbar/index.js +9 -2
- package/dist/esm/plugins/media/toolbar/utils.js +12 -0
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/plugins/analytics/plugin.d.ts +2 -2
- package/dist/types/plugins/avatar-group/index.d.ts +2 -2
- package/dist/types/plugins/collab-edit/index.d.ts +2 -5
- package/dist/types/plugins/expand/index.d.ts +2 -2
- package/dist/types/plugins/find-replace/index.d.ts +2 -2
- package/dist/types/plugins/insert-block/types.d.ts +2 -2
- package/dist/types/plugins/media/toolbar/utils.d.ts +1 -0
- package/dist/types/plugins/paste/index.d.ts +2 -2
- package/dist/types/plugins/rule/index.d.ts +2 -2
- package/dist/types/plugins/text-color/index.d.ts +2 -2
- package/dist/types-ts4.5/plugins/analytics/plugin.d.ts +2 -2
- package/dist/types-ts4.5/plugins/avatar-group/index.d.ts +2 -2
- package/dist/types-ts4.5/plugins/collab-edit/index.d.ts +2 -2
- package/dist/types-ts4.5/plugins/expand/index.d.ts +2 -2
- package/dist/types-ts4.5/plugins/find-replace/index.d.ts +2 -2
- package/dist/types-ts4.5/plugins/insert-block/types.d.ts +2 -2
- package/dist/types-ts4.5/plugins/media/toolbar/utils.d.ts +1 -0
- package/dist/types-ts4.5/plugins/paste/index.d.ts +2 -2
- package/dist/types-ts4.5/plugins/rule/index.d.ts +2 -2
- package/dist/types-ts4.5/plugins/text-color/index.d.ts +2 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 187.35.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`1a4a64498ae`](https://bitbucket.org/atlassian/atlassian-frontend/commits/1a4a64498ae) - fix media floating toolbar cut off issue on align right and wrap right
|
|
8
|
+
|
|
9
|
+
## 187.35.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`6acf9830b36`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6acf9830b36) - Update feature flags plugin
|
|
14
|
+
(@atlaskit/editor-plugin-feature-flags) to use a named export
|
|
15
|
+
rather than default export to match other plugins.
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
// Before
|
|
19
|
+
import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
|
|
20
|
+
|
|
21
|
+
// After
|
|
22
|
+
import { featureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
- Updated dependencies
|
|
26
|
+
|
|
3
27
|
## 187.35.1
|
|
4
28
|
|
|
5
29
|
### Patch Changes
|
|
@@ -19,7 +19,7 @@ var _editorPluginEditorDisabled = require("@atlaskit/editor-plugin-editor-disabl
|
|
|
19
19
|
var _typeAhead = _interopRequireDefault(require("../../../plugins/type-ahead"));
|
|
20
20
|
var _submitEditor = _interopRequireDefault(require("../../../plugins/submit-editor"));
|
|
21
21
|
var _fakeTextCursor = _interopRequireDefault(require("../../../plugins/fake-text-cursor"));
|
|
22
|
-
var _editorPluginFeatureFlags =
|
|
22
|
+
var _editorPluginFeatureFlags = require("@atlaskit/editor-plugin-feature-flags");
|
|
23
23
|
var _floatingToolbar = _interopRequireDefault(require("../../../plugins/floating-toolbar"));
|
|
24
24
|
var _clipboard = _interopRequireDefault(require("../../../plugins/clipboard"));
|
|
25
25
|
var _plugins = require("../../../plugins");
|
|
@@ -42,7 +42,7 @@ var _preset = require("@atlaskit/editor-common/preset");
|
|
|
42
42
|
* their placement in the editor toolbar
|
|
43
43
|
*/
|
|
44
44
|
function createDefaultPreset(options) {
|
|
45
|
-
var preset = new _preset.EditorPresetBuilder().add([_editorPluginFeatureFlags.
|
|
45
|
+
var preset = new _preset.EditorPresetBuilder().add([_editorPluginFeatureFlags.featureFlagsPlugin, options.featureFlags || {}]).maybeAdd(_editorPluginAnalytics.analyticsPlugin, function (plugin, builder) {
|
|
46
46
|
if (options.allowAnalyticsGASV3) {
|
|
47
47
|
var performanceTracking = options.performanceTracking,
|
|
48
48
|
createAnalyticsEvent = options.createAnalyticsEvent;
|
|
@@ -449,6 +449,7 @@ var floatingToolbar = function floatingToolbar(state, intl) {
|
|
|
449
449
|
allowAltTextOnImages = options.allowAltTextOnImages,
|
|
450
450
|
providerFactory = options.providerFactory,
|
|
451
451
|
allowMediaInline = options.allowMediaInline,
|
|
452
|
+
allowResizing = options.allowResizing,
|
|
452
453
|
getEditorFeatureFlags = options.getEditorFeatureFlags;
|
|
453
454
|
var mediaPluginState = _pluginKey.stateKey.getState(state);
|
|
454
455
|
var mediaLinkingState = (0, _linking2.getMediaLinkingState)(state);
|
|
@@ -512,9 +513,15 @@ var floatingToolbar = function floatingToolbar(state, intl) {
|
|
|
512
513
|
};
|
|
513
514
|
items = generateMediaSingleFloatingToolbar(state, intl, options, mediaPluginState, mediaLinkingState, pluginInjectionApi, getEditorFeatureFlags);
|
|
514
515
|
}
|
|
515
|
-
|
|
516
|
+
var toolbarConfig = _objectSpread(_objectSpread({}, baseToolbar), {}, {
|
|
516
517
|
items: items,
|
|
517
518
|
scrollable: true
|
|
518
519
|
});
|
|
520
|
+
if ((0, _platformFeatureFlags.getBooleanFF)('platform.editor.media.extended-resize-experience') && allowResizing) {
|
|
521
|
+
return _objectSpread(_objectSpread({}, toolbarConfig), {}, {
|
|
522
|
+
width: mediaPluginState.isResizing ? undefined : (0, _utils2.getMaxToolbarWidth)()
|
|
523
|
+
});
|
|
524
|
+
}
|
|
525
|
+
return toolbarConfig;
|
|
519
526
|
};
|
|
520
527
|
exports.floatingToolbar = floatingToolbar;
|
|
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.removeMediaGroupNode = exports.getSelectedMediaSingle = exports.getSelectedMediaContainerNodeAttrs = exports.getPixelWidthOfElement = exports.downloadMedia = exports.calcNewLayout = void 0;
|
|
7
|
+
exports.removeMediaGroupNode = exports.getSelectedMediaSingle = exports.getSelectedMediaContainerNodeAttrs = exports.getPixelWidthOfElement = exports.getMaxToolbarWidth = exports.downloadMedia = exports.calcNewLayout = void 0;
|
|
8
8
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
9
9
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
10
10
|
var _mediaClient = require("@atlaskit/media-client");
|
|
@@ -101,4 +101,17 @@ var calcNewLayout = function calcNewLayout(width, layout, contentWidth) {
|
|
|
101
101
|
}
|
|
102
102
|
return isWrappedLayout && width !== contentWidth ? layout : 'center';
|
|
103
103
|
};
|
|
104
|
-
exports.calcNewLayout = calcNewLayout;
|
|
104
|
+
exports.calcNewLayout = calcNewLayout;
|
|
105
|
+
var maxToolbarFitWidth = 0;
|
|
106
|
+
var getMaxToolbarWidth = function getMaxToolbarWidth() {
|
|
107
|
+
var toolbar = document.querySelector("div[aria-label=\"Media floating controls\"]");
|
|
108
|
+
var toolbarWidth = toolbar === null || toolbar === void 0 ? void 0 : toolbar.getBoundingClientRect().width;
|
|
109
|
+
if (!toolbar) {
|
|
110
|
+
maxToolbarFitWidth = 0;
|
|
111
|
+
}
|
|
112
|
+
if (toolbarWidth && toolbarWidth > maxToolbarFitWidth) {
|
|
113
|
+
maxToolbarFitWidth = toolbarWidth;
|
|
114
|
+
}
|
|
115
|
+
return maxToolbarFitWidth;
|
|
116
|
+
};
|
|
117
|
+
exports.getMaxToolbarWidth = getMaxToolbarWidth;
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.version = exports.nextMajorVersion = exports.name = void 0;
|
|
7
7
|
var name = "@atlaskit/editor-core";
|
|
8
8
|
exports.name = name;
|
|
9
|
-
var version = "187.35.
|
|
9
|
+
var version = "187.35.3";
|
|
10
10
|
exports.version = version;
|
|
11
11
|
var nextMajorVersion = function nextMajorVersion() {
|
|
12
12
|
return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
|
|
@@ -13,7 +13,7 @@ import { editorDisabledPlugin } from '@atlaskit/editor-plugin-editor-disabled';
|
|
|
13
13
|
import typeAheadPlugin from '../../../plugins/type-ahead';
|
|
14
14
|
import submitEditorPlugin from '../../../plugins/submit-editor';
|
|
15
15
|
import fakeTextCursorPlugin from '../../../plugins/fake-text-cursor';
|
|
16
|
-
import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
|
|
16
|
+
import { featureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
17
17
|
import floatingToolbarPlugin from '../../../plugins/floating-toolbar';
|
|
18
18
|
import clipboardPlugin from '../../../plugins/clipboard';
|
|
19
19
|
import { analyticsPlugin as deprecatedAnalyticsPlugin } from '../../../plugins';
|
|
@@ -18,7 +18,7 @@ import { messages } from '@atlaskit/media-ui';
|
|
|
18
18
|
import { cardMessages } from '@atlaskit/editor-common/messages';
|
|
19
19
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
20
20
|
import { FilePreviewItem } from './filePreviewItem';
|
|
21
|
-
import { downloadMedia, getSelectedMediaSingle, removeMediaGroupNode, getPixelWidthOfElement, calcNewLayout } from './utils';
|
|
21
|
+
import { downloadMedia, getSelectedMediaSingle, removeMediaGroupNode, getPixelWidthOfElement, calcNewLayout, getMaxToolbarWidth } from './utils';
|
|
22
22
|
import { isVideo } from '../utils/media-single';
|
|
23
23
|
import { changeInlineToMediaCard, changeMediaCardToInline, removeInlineCard, setBorderMark, toggleBorderMark } from './commands';
|
|
24
24
|
import { MediaInlineNodeSelector, MediaSingleNodeSelector } from '../nodeviews/styles';
|
|
@@ -466,6 +466,7 @@ export const floatingToolbar = (state, intl, options = {}, pluginInjectionApi) =
|
|
|
466
466
|
allowAltTextOnImages,
|
|
467
467
|
providerFactory,
|
|
468
468
|
allowMediaInline,
|
|
469
|
+
allowResizing,
|
|
469
470
|
getEditorFeatureFlags
|
|
470
471
|
} = options;
|
|
471
472
|
const mediaPluginState = stateKey.getState(state);
|
|
@@ -529,9 +530,16 @@ export const floatingToolbar = (state, intl, options = {}, pluginInjectionApi) =
|
|
|
529
530
|
};
|
|
530
531
|
items = generateMediaSingleFloatingToolbar(state, intl, options, mediaPluginState, mediaLinkingState, pluginInjectionApi, getEditorFeatureFlags);
|
|
531
532
|
}
|
|
532
|
-
|
|
533
|
+
const toolbarConfig = {
|
|
533
534
|
...baseToolbar,
|
|
534
535
|
items,
|
|
535
536
|
scrollable: true
|
|
536
537
|
};
|
|
538
|
+
if (getBooleanFF('platform.editor.media.extended-resize-experience') && allowResizing) {
|
|
539
|
+
return {
|
|
540
|
+
...toolbarConfig,
|
|
541
|
+
width: mediaPluginState.isResizing ? undefined : getMaxToolbarWidth()
|
|
542
|
+
};
|
|
543
|
+
}
|
|
544
|
+
return toolbarConfig;
|
|
537
545
|
};
|
|
@@ -71,4 +71,16 @@ export const calcNewLayout = (width, layout, contentWidth, fullWidthMode = false
|
|
|
71
71
|
return 'wide';
|
|
72
72
|
}
|
|
73
73
|
return isWrappedLayout && width !== contentWidth ? layout : 'center';
|
|
74
|
+
};
|
|
75
|
+
let maxToolbarFitWidth = 0;
|
|
76
|
+
export const getMaxToolbarWidth = () => {
|
|
77
|
+
const toolbar = document.querySelector(`div[aria-label="Media floating controls"]`);
|
|
78
|
+
const toolbarWidth = toolbar === null || toolbar === void 0 ? void 0 : toolbar.getBoundingClientRect().width;
|
|
79
|
+
if (!toolbar) {
|
|
80
|
+
maxToolbarFitWidth = 0;
|
|
81
|
+
}
|
|
82
|
+
if (toolbarWidth && toolbarWidth > maxToolbarFitWidth) {
|
|
83
|
+
maxToolbarFitWidth = toolbarWidth;
|
|
84
|
+
}
|
|
85
|
+
return maxToolbarFitWidth;
|
|
74
86
|
};
|
|
@@ -13,7 +13,7 @@ import { editorDisabledPlugin } from '@atlaskit/editor-plugin-editor-disabled';
|
|
|
13
13
|
import typeAheadPlugin from '../../../plugins/type-ahead';
|
|
14
14
|
import submitEditorPlugin from '../../../plugins/submit-editor';
|
|
15
15
|
import fakeTextCursorPlugin from '../../../plugins/fake-text-cursor';
|
|
16
|
-
import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
|
|
16
|
+
import { featureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
17
17
|
import floatingToolbarPlugin from '../../../plugins/floating-toolbar';
|
|
18
18
|
import clipboardPlugin from '../../../plugins/clipboard';
|
|
19
19
|
import { analyticsPlugin as deprecatedAnalyticsPlugin } from '../../../plugins';
|
|
@@ -22,7 +22,7 @@ import { messages } from '@atlaskit/media-ui';
|
|
|
22
22
|
import { cardMessages } from '@atlaskit/editor-common/messages';
|
|
23
23
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
24
24
|
import { FilePreviewItem } from './filePreviewItem';
|
|
25
|
-
import { downloadMedia, getSelectedMediaSingle, removeMediaGroupNode, getPixelWidthOfElement, calcNewLayout } from './utils';
|
|
25
|
+
import { downloadMedia, getSelectedMediaSingle, removeMediaGroupNode, getPixelWidthOfElement, calcNewLayout, getMaxToolbarWidth } from './utils';
|
|
26
26
|
import { isVideo } from '../utils/media-single';
|
|
27
27
|
import { changeInlineToMediaCard, changeMediaCardToInline, removeInlineCard, setBorderMark, toggleBorderMark } from './commands';
|
|
28
28
|
import { MediaInlineNodeSelector, MediaSingleNodeSelector } from '../nodeviews/styles';
|
|
@@ -442,6 +442,7 @@ export var floatingToolbar = function floatingToolbar(state, intl) {
|
|
|
442
442
|
allowAltTextOnImages = options.allowAltTextOnImages,
|
|
443
443
|
providerFactory = options.providerFactory,
|
|
444
444
|
allowMediaInline = options.allowMediaInline,
|
|
445
|
+
allowResizing = options.allowResizing,
|
|
445
446
|
getEditorFeatureFlags = options.getEditorFeatureFlags;
|
|
446
447
|
var mediaPluginState = stateKey.getState(state);
|
|
447
448
|
var mediaLinkingState = getMediaLinkingState(state);
|
|
@@ -505,8 +506,14 @@ export var floatingToolbar = function floatingToolbar(state, intl) {
|
|
|
505
506
|
};
|
|
506
507
|
items = generateMediaSingleFloatingToolbar(state, intl, options, mediaPluginState, mediaLinkingState, pluginInjectionApi, getEditorFeatureFlags);
|
|
507
508
|
}
|
|
508
|
-
|
|
509
|
+
var toolbarConfig = _objectSpread(_objectSpread({}, baseToolbar), {}, {
|
|
509
510
|
items: items,
|
|
510
511
|
scrollable: true
|
|
511
512
|
});
|
|
513
|
+
if (getBooleanFF('platform.editor.media.extended-resize-experience') && allowResizing) {
|
|
514
|
+
return _objectSpread(_objectSpread({}, toolbarConfig), {}, {
|
|
515
|
+
width: mediaPluginState.isResizing ? undefined : getMaxToolbarWidth()
|
|
516
|
+
});
|
|
517
|
+
}
|
|
518
|
+
return toolbarConfig;
|
|
512
519
|
};
|
|
@@ -88,4 +88,16 @@ export var calcNewLayout = function calcNewLayout(width, layout, contentWidth) {
|
|
|
88
88
|
return 'wide';
|
|
89
89
|
}
|
|
90
90
|
return isWrappedLayout && width !== contentWidth ? layout : 'center';
|
|
91
|
+
};
|
|
92
|
+
var maxToolbarFitWidth = 0;
|
|
93
|
+
export var getMaxToolbarWidth = function getMaxToolbarWidth() {
|
|
94
|
+
var toolbar = document.querySelector("div[aria-label=\"Media floating controls\"]");
|
|
95
|
+
var toolbarWidth = toolbar === null || toolbar === void 0 ? void 0 : toolbar.getBoundingClientRect().width;
|
|
96
|
+
if (!toolbar) {
|
|
97
|
+
maxToolbarFitWidth = 0;
|
|
98
|
+
}
|
|
99
|
+
if (toolbarWidth && toolbarWidth > maxToolbarFitWidth) {
|
|
100
|
+
maxToolbarFitWidth = toolbarWidth;
|
|
101
|
+
}
|
|
102
|
+
return maxToolbarFitWidth;
|
|
91
103
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
2
2
|
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { AnalyticsEventPayload } from './types';
|
|
4
|
-
import type
|
|
4
|
+
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
5
5
|
import type { PerformanceTracking } from '../../types/performance-tracking';
|
|
6
6
|
import type { analyticsPlugin as newAnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
7
7
|
interface AnalyticsPluginOptions {
|
|
@@ -16,7 +16,7 @@ interface AnalyticsPluginOptions {
|
|
|
16
16
|
*/
|
|
17
17
|
declare const analyticsPlugin: NextEditorPlugin<'deprecatedAnalytics', {
|
|
18
18
|
pluginConfiguration: AnalyticsPluginOptions;
|
|
19
|
-
dependencies: [
|
|
19
|
+
dependencies: [FeatureFlagsPlugin, typeof newAnalyticsPlugin];
|
|
20
20
|
}>;
|
|
21
21
|
export declare function extendPayload({ payload, duration, distortedDuration, }: {
|
|
22
22
|
payload: AnalyticsEventPayload;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
2
2
|
import type { CollabEditOptions } from '@atlaskit/editor-common/collab';
|
|
3
|
-
import type
|
|
3
|
+
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
4
4
|
type Config = {
|
|
5
5
|
collabEdit?: CollabEditOptions;
|
|
6
6
|
takeFullWidth: boolean;
|
|
7
7
|
};
|
|
8
8
|
declare const avatarGroup: NextEditorPlugin<'avatarGroup', {
|
|
9
9
|
pluginConfiguration: Config;
|
|
10
|
-
dependencies: [
|
|
10
|
+
dependencies: [FeatureFlagsPlugin];
|
|
11
11
|
}>;
|
|
12
12
|
export default avatarGroup;
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
2
2
|
import { pluginKey } from './plugin';
|
|
3
3
|
import type { PrivateCollabEditOptions } from './types';
|
|
4
|
-
import type
|
|
4
|
+
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
5
5
|
import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
6
6
|
export { pluginKey };
|
|
7
7
|
declare const collabEditPlugin: NextEditorPlugin<'collabEdit', {
|
|
8
8
|
pluginConfiguration: PrivateCollabEditOptions;
|
|
9
|
-
dependencies: [
|
|
10
|
-
typeof featureFlagsPlugin,
|
|
11
|
-
OptionalPlugin<typeof analyticsPlugin>
|
|
12
|
-
];
|
|
9
|
+
dependencies: [FeatureFlagsPlugin, OptionalPlugin<typeof analyticsPlugin>];
|
|
13
10
|
}>;
|
|
14
11
|
export default collabEditPlugin;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { NextEditorPlugin, EditorProps } from '../../types';
|
|
2
2
|
import type { LongPressSelectionPluginOptions } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type
|
|
3
|
+
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
4
4
|
import type { decorationsPlugin } from '@atlaskit/editor-plugin-decorations';
|
|
5
5
|
interface ExpandPluginOptions extends LongPressSelectionPluginOptions {
|
|
6
6
|
allowInsertion?: boolean;
|
|
@@ -8,7 +8,7 @@ interface ExpandPluginOptions extends LongPressSelectionPluginOptions {
|
|
|
8
8
|
}
|
|
9
9
|
declare const expandPlugin: NextEditorPlugin<'expand', {
|
|
10
10
|
pluginConfiguration: ExpandPluginOptions | undefined;
|
|
11
|
-
dependencies: [
|
|
11
|
+
dependencies: [FeatureFlagsPlugin, typeof decorationsPlugin];
|
|
12
12
|
}>;
|
|
13
13
|
interface ExpandEditorProps {
|
|
14
14
|
allowExpand?: EditorProps['allowExpand'];
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
2
|
-
import type
|
|
2
|
+
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
3
3
|
type Config = {
|
|
4
4
|
takeFullWidth: boolean;
|
|
5
5
|
twoLineEditorToolbar: boolean;
|
|
6
6
|
};
|
|
7
7
|
export declare const findReplacePlugin: NextEditorPlugin<'findReplace', {
|
|
8
8
|
pluginConfiguration: Config;
|
|
9
|
-
dependencies: [
|
|
9
|
+
dependencies: [FeatureFlagsPlugin];
|
|
10
10
|
}>;
|
|
11
11
|
export default findReplacePlugin;
|
|
@@ -4,7 +4,7 @@ import type { EmojiPlugin } from '@atlaskit/editor-plugin-emoji';
|
|
|
4
4
|
import type datePlugin from '../date';
|
|
5
5
|
import type { tablesPlugin } from '@atlaskit/editor-plugin-table';
|
|
6
6
|
import type { hyperlinkPlugin } from '@atlaskit/editor-plugin-hyperlink';
|
|
7
|
-
import type
|
|
7
|
+
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
8
8
|
import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
9
9
|
import type mentionsPlugin from '../mentions';
|
|
10
10
|
import type quickInsertPlugin from '../quick-insert';
|
|
@@ -12,7 +12,7 @@ import type blockTypePlugin from '../block-type';
|
|
|
12
12
|
import type codeBlockPlugin from '../code-block';
|
|
13
13
|
import type panelPlugin from '../panel';
|
|
14
14
|
export type InsertBlockPluginDependencies = [
|
|
15
|
-
|
|
15
|
+
FeatureFlagsPlugin,
|
|
16
16
|
OptionalPlugin<typeof tablesPlugin>,
|
|
17
17
|
OptionalPlugin<typeof hyperlinkPlugin>,
|
|
18
18
|
OptionalPlugin<typeof datePlugin>,
|
|
@@ -8,3 +8,4 @@ export declare const removeMediaGroupNode: (state: EditorState) => import("prose
|
|
|
8
8
|
export declare const getSelectedMediaSingle: (state: EditorState) => import("prosemirror-utils/dist/types").FindResult;
|
|
9
9
|
export declare const getPixelWidthOfElement: (editorView: EditorView, pos: number, mediaWidth: number) => number;
|
|
10
10
|
export declare const calcNewLayout: (width: number, layout: RichMediaLayout, contentWidth: number, fullWidthMode?: boolean) => RichMediaLayout;
|
|
11
|
+
export declare const getMaxToolbarWidth: () => number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
2
2
|
import type { CardOptions } from '@atlaskit/editor-common/card';
|
|
3
|
-
import type
|
|
3
|
+
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
4
4
|
import type { cardPlugin } from '@atlaskit/editor-plugin-card';
|
|
5
5
|
import type betterTypeHistoryPlugin from '../better-type-history';
|
|
6
6
|
import type { listPlugin } from '@atlaskit/editor-plugin-list';
|
|
@@ -12,7 +12,7 @@ export type PastePluginOptions = {
|
|
|
12
12
|
declare const pastePlugin: NextEditorPlugin<'paste', {
|
|
13
13
|
pluginConfiguration: PastePluginOptions;
|
|
14
14
|
dependencies: [
|
|
15
|
-
|
|
15
|
+
FeatureFlagsPlugin,
|
|
16
16
|
OptionalPlugin<typeof listPlugin>,
|
|
17
17
|
typeof betterTypeHistoryPlugin,
|
|
18
18
|
OptionalPlugin<typeof cardPlugin>,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
2
|
-
import type
|
|
2
|
+
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
3
3
|
declare const rulePlugin: NextEditorPlugin<'rule', {
|
|
4
4
|
pluginConfiguration: undefined;
|
|
5
|
-
dependencies: [
|
|
5
|
+
dependencies: [FeatureFlagsPlugin];
|
|
6
6
|
}>;
|
|
7
7
|
export default rulePlugin;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
2
|
-
import type
|
|
2
|
+
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
3
3
|
import type { TextColorPluginConfig, TextColorPluginState } from './pm-plugins/main';
|
|
4
4
|
import { pluginKey as textColorPluginKey } from './pm-plugins/main';
|
|
5
5
|
type Config = TextColorPluginConfig | boolean;
|
|
6
6
|
declare const textColorPlugin: NextEditorPlugin<'textColor', {
|
|
7
7
|
pluginConfiguration: Config | undefined;
|
|
8
|
-
dependencies: [
|
|
8
|
+
dependencies: [FeatureFlagsPlugin];
|
|
9
9
|
}>;
|
|
10
10
|
export { textColorPluginKey };
|
|
11
11
|
export type { TextColorPluginState };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
2
2
|
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { AnalyticsEventPayload } from './types';
|
|
4
|
-
import type
|
|
4
|
+
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
5
5
|
import type { PerformanceTracking } from '../../types/performance-tracking';
|
|
6
6
|
import type { analyticsPlugin as newAnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
7
7
|
interface AnalyticsPluginOptions {
|
|
@@ -17,7 +17,7 @@ interface AnalyticsPluginOptions {
|
|
|
17
17
|
declare const analyticsPlugin: NextEditorPlugin<'deprecatedAnalytics', {
|
|
18
18
|
pluginConfiguration: AnalyticsPluginOptions;
|
|
19
19
|
dependencies: [
|
|
20
|
-
|
|
20
|
+
FeatureFlagsPlugin,
|
|
21
21
|
typeof newAnalyticsPlugin
|
|
22
22
|
];
|
|
23
23
|
}>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
2
2
|
import type { CollabEditOptions } from '@atlaskit/editor-common/collab';
|
|
3
|
-
import type
|
|
3
|
+
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
4
4
|
type Config = {
|
|
5
5
|
collabEdit?: CollabEditOptions;
|
|
6
6
|
takeFullWidth: boolean;
|
|
@@ -8,7 +8,7 @@ type Config = {
|
|
|
8
8
|
declare const avatarGroup: NextEditorPlugin<'avatarGroup', {
|
|
9
9
|
pluginConfiguration: Config;
|
|
10
10
|
dependencies: [
|
|
11
|
-
|
|
11
|
+
FeatureFlagsPlugin
|
|
12
12
|
];
|
|
13
13
|
}>;
|
|
14
14
|
export default avatarGroup;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
2
2
|
import { pluginKey } from './plugin';
|
|
3
3
|
import type { PrivateCollabEditOptions } from './types';
|
|
4
|
-
import type
|
|
4
|
+
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
5
5
|
import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
6
6
|
export { pluginKey };
|
|
7
7
|
declare const collabEditPlugin: NextEditorPlugin<'collabEdit', {
|
|
8
8
|
pluginConfiguration: PrivateCollabEditOptions;
|
|
9
9
|
dependencies: [
|
|
10
|
-
|
|
10
|
+
FeatureFlagsPlugin,
|
|
11
11
|
OptionalPlugin<typeof analyticsPlugin>
|
|
12
12
|
];
|
|
13
13
|
}>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { NextEditorPlugin, EditorProps } from '../../types';
|
|
2
2
|
import type { LongPressSelectionPluginOptions } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type
|
|
3
|
+
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
4
4
|
import type { decorationsPlugin } from '@atlaskit/editor-plugin-decorations';
|
|
5
5
|
interface ExpandPluginOptions extends LongPressSelectionPluginOptions {
|
|
6
6
|
allowInsertion?: boolean;
|
|
@@ -9,7 +9,7 @@ interface ExpandPluginOptions extends LongPressSelectionPluginOptions {
|
|
|
9
9
|
declare const expandPlugin: NextEditorPlugin<'expand', {
|
|
10
10
|
pluginConfiguration: ExpandPluginOptions | undefined;
|
|
11
11
|
dependencies: [
|
|
12
|
-
|
|
12
|
+
FeatureFlagsPlugin,
|
|
13
13
|
typeof decorationsPlugin
|
|
14
14
|
];
|
|
15
15
|
}>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
2
|
-
import type
|
|
2
|
+
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
3
3
|
type Config = {
|
|
4
4
|
takeFullWidth: boolean;
|
|
5
5
|
twoLineEditorToolbar: boolean;
|
|
@@ -7,7 +7,7 @@ type Config = {
|
|
|
7
7
|
export declare const findReplacePlugin: NextEditorPlugin<'findReplace', {
|
|
8
8
|
pluginConfiguration: Config;
|
|
9
9
|
dependencies: [
|
|
10
|
-
|
|
10
|
+
FeatureFlagsPlugin
|
|
11
11
|
];
|
|
12
12
|
}>;
|
|
13
13
|
export default findReplacePlugin;
|
|
@@ -4,7 +4,7 @@ import type { EmojiPlugin } from '@atlaskit/editor-plugin-emoji';
|
|
|
4
4
|
import type datePlugin from '../date';
|
|
5
5
|
import type { tablesPlugin } from '@atlaskit/editor-plugin-table';
|
|
6
6
|
import type { hyperlinkPlugin } from '@atlaskit/editor-plugin-hyperlink';
|
|
7
|
-
import type
|
|
7
|
+
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
8
8
|
import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
9
9
|
import type mentionsPlugin from '../mentions';
|
|
10
10
|
import type quickInsertPlugin from '../quick-insert';
|
|
@@ -12,7 +12,7 @@ import type blockTypePlugin from '../block-type';
|
|
|
12
12
|
import type codeBlockPlugin from '../code-block';
|
|
13
13
|
import type panelPlugin from '../panel';
|
|
14
14
|
export type InsertBlockPluginDependencies = [
|
|
15
|
-
|
|
15
|
+
FeatureFlagsPlugin,
|
|
16
16
|
OptionalPlugin<typeof tablesPlugin>,
|
|
17
17
|
OptionalPlugin<typeof hyperlinkPlugin>,
|
|
18
18
|
OptionalPlugin<typeof datePlugin>,
|
|
@@ -8,3 +8,4 @@ export declare const removeMediaGroupNode: (state: EditorState) => import("prose
|
|
|
8
8
|
export declare const getSelectedMediaSingle: (state: EditorState) => import("prosemirror-utils/dist/types").FindResult;
|
|
9
9
|
export declare const getPixelWidthOfElement: (editorView: EditorView, pos: number, mediaWidth: number) => number;
|
|
10
10
|
export declare const calcNewLayout: (width: number, layout: RichMediaLayout, contentWidth: number, fullWidthMode?: boolean) => RichMediaLayout;
|
|
11
|
+
export declare const getMaxToolbarWidth: () => number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
2
2
|
import type { CardOptions } from '@atlaskit/editor-common/card';
|
|
3
|
-
import type
|
|
3
|
+
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
4
4
|
import type { cardPlugin } from '@atlaskit/editor-plugin-card';
|
|
5
5
|
import type betterTypeHistoryPlugin from '../better-type-history';
|
|
6
6
|
import type { listPlugin } from '@atlaskit/editor-plugin-list';
|
|
@@ -12,7 +12,7 @@ export type PastePluginOptions = {
|
|
|
12
12
|
declare const pastePlugin: NextEditorPlugin<'paste', {
|
|
13
13
|
pluginConfiguration: PastePluginOptions;
|
|
14
14
|
dependencies: [
|
|
15
|
-
|
|
15
|
+
FeatureFlagsPlugin,
|
|
16
16
|
OptionalPlugin<typeof listPlugin>,
|
|
17
17
|
typeof betterTypeHistoryPlugin,
|
|
18
18
|
OptionalPlugin<typeof cardPlugin>,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
2
|
-
import type
|
|
2
|
+
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
3
3
|
declare const rulePlugin: NextEditorPlugin<'rule', {
|
|
4
4
|
pluginConfiguration: undefined;
|
|
5
5
|
dependencies: [
|
|
6
|
-
|
|
6
|
+
FeatureFlagsPlugin
|
|
7
7
|
];
|
|
8
8
|
}>;
|
|
9
9
|
export default rulePlugin;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
2
|
-
import type
|
|
2
|
+
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
3
3
|
import type { TextColorPluginConfig, TextColorPluginState } from './pm-plugins/main';
|
|
4
4
|
import { pluginKey as textColorPluginKey } from './pm-plugins/main';
|
|
5
5
|
type Config = TextColorPluginConfig | boolean;
|
|
6
6
|
declare const textColorPlugin: NextEditorPlugin<'textColor', {
|
|
7
7
|
pluginConfiguration: Config | undefined;
|
|
8
8
|
dependencies: [
|
|
9
|
-
|
|
9
|
+
FeatureFlagsPlugin
|
|
10
10
|
];
|
|
11
11
|
}>;
|
|
12
12
|
export { textColorPluginKey };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "187.35.
|
|
3
|
+
"version": "187.35.3",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"@atlaskit/editor-plugin-decorations": "^0.2.0",
|
|
68
68
|
"@atlaskit/editor-plugin-editor-disabled": "^0.2.0",
|
|
69
69
|
"@atlaskit/editor-plugin-emoji": "^0.3.0",
|
|
70
|
-
"@atlaskit/editor-plugin-feature-flags": "^0.
|
|
70
|
+
"@atlaskit/editor-plugin-feature-flags": "^1.0.0",
|
|
71
71
|
"@atlaskit/editor-plugin-floating-toolbar": "^0.4.0",
|
|
72
72
|
"@atlaskit/editor-plugin-focus": "^0.2.0",
|
|
73
73
|
"@atlaskit/editor-plugin-grid": "^0.2.0",
|