@atlaskit/editor-core 193.28.5 → 193.28.10
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 +20 -0
- package/architecture/0003-explicit-plugin-dependencies.md +1 -1
- package/dist/cjs/presets/default.js +5 -1
- package/dist/cjs/test-utils.js +1 -3
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/presets/default.js +4 -1
- package/dist/es2019/test-utils.js +1 -3
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/presets/default.js +5 -1
- package/dist/esm/test-utils.js +1 -3
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/composable-editor/editor-internal.d.ts +2 -1
- package/dist/types/create-editor/ReactEditorView.d.ts +2 -2
- package/dist/types/create-editor/create-preset.d.ts +46 -46
- package/dist/types/presets/context.d.ts +2 -2
- package/dist/types/presets/default.d.ts +18 -18
- package/dist/types/presets/universal.d.ts +46 -46
- package/dist/types/presets/useUniversalPreset.d.ts +46 -46
- package/dist/types/test-utils.d.ts +2 -2
- package/dist/types/types/editor-props.d.ts +3 -3
- package/dist/types/use-preset.d.ts +5 -6
- package/dist/types-ts4.5/composable-editor/editor-internal.d.ts +2 -1
- package/dist/types-ts4.5/create-editor/ReactEditorView.d.ts +2 -2
- package/dist/types-ts4.5/create-editor/create-preset.d.ts +122 -122
- package/dist/types-ts4.5/presets/context.d.ts +2 -2
- package/dist/types-ts4.5/presets/default.d.ts +30 -30
- package/dist/types-ts4.5/presets/universal.d.ts +122 -122
- package/dist/types-ts4.5/presets/useUniversalPreset.d.ts +122 -122
- package/dist/types-ts4.5/test-utils.d.ts +2 -2
- package/dist/types-ts4.5/types/editor-props.d.ts +3 -3
- package/dist/types-ts4.5/use-preset.d.ts +5 -10
- package/package.json +8 -12
- package/tsconfig.json +1 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 193.28.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#113338](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/113338)
|
|
8
|
+
[`6b5439f51eab4`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/6b5439f51eab4) -
|
|
9
|
+
ECA11Y-5 remove FF from codebase
|
|
10
|
+
- [#115170](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/115170)
|
|
11
|
+
[`84489f16bb385`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/84489f16bb385) -
|
|
12
|
+
Adds a pm-plugin to register contentMoved event as an alternative to DnD feature.
|
|
13
|
+
|
|
14
|
+
## 193.28.6
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- [#110942](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/110942)
|
|
19
|
+
[`aa339aee9aa7d`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/aa339aee9aa7d) -
|
|
20
|
+
[ED-23431] Fix EditorPluginAPI type system
|
|
21
|
+
- Updated dependencies
|
|
22
|
+
|
|
3
23
|
## 193.28.5
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
|
@@ -43,7 +43,7 @@ gained from the initial table plugin extraction.
|
|
|
43
43
|
|
|
44
44
|
Linting errors will now be present for any new code that gets added, where we continue to attempt
|
|
45
45
|
importing from one plugin into another. (See `ELR101`, `ELR102` in
|
|
46
|
-
`
|
|
46
|
+
`https://hello.atlassian.net/wiki/spaces/AF/pages/2634573964/Editor+Lint`).
|
|
47
47
|
|
|
48
48
|
### Other resources
|
|
49
49
|
|
|
@@ -38,6 +38,7 @@ var _undoRedo = require("@atlaskit/editor-plugins/undo-redo");
|
|
|
38
38
|
var _unsupportedContent = require("@atlaskit/editor-plugins/unsupported-content");
|
|
39
39
|
var _width = require("@atlaskit/editor-plugins/width");
|
|
40
40
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
41
|
+
var _isFullPage = require("../utils/is-full-page");
|
|
41
42
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
42
43
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } // #region Imports
|
|
43
44
|
// #endregion
|
|
@@ -49,10 +50,13 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
49
50
|
function createDefaultPreset(options) {
|
|
50
51
|
var _options$featureFlags, _options$featureFlags2;
|
|
51
52
|
var isMobile = options.appearance === 'mobile';
|
|
53
|
+
var isFullPage = (0, _isFullPage.isFullPage)(options.appearance);
|
|
52
54
|
var preset = new _preset.EditorPresetBuilder().add([_featureFlags.featureFlagsPlugin, options.featureFlags || {}]).maybeAdd([_analytics.analyticsPlugin, {
|
|
53
55
|
createAnalyticsEvent: options.createAnalyticsEvent,
|
|
54
56
|
performanceTracking: options.performanceTracking
|
|
55
|
-
}], Boolean(options.allowAnalyticsGASV3)).add(_betterTypeHistory.betterTypeHistoryPlugin).add([_paste.pastePlugin, _objectSpread({}, options === null || options === void 0 ? void 0 : options.paste)
|
|
57
|
+
}], Boolean(options.allowAnalyticsGASV3)).add(_betterTypeHistory.betterTypeHistoryPlugin).add([_paste.pastePlugin, _objectSpread(_objectSpread({}, options === null || options === void 0 ? void 0 : options.paste), {}, {
|
|
58
|
+
isFullPage: isFullPage
|
|
59
|
+
})]).add(_clipboard.clipboardPlugin).add(_focus.focusPlugin).add(_composition.compositionPlugin).add([_contextIdentifier.contextIdentifierPlugin, {
|
|
56
60
|
contextIdentifierProvider: options.contextIdentifierProvider
|
|
57
61
|
}]).add([_base.basePlugin, options.base]).add(_decorations.decorationsPlugin).add([_typeAhead.typeAheadPlugin, options.typeAhead]).maybeAdd(_history.historyPlugin, Boolean(isMobile || options.allowUndoRedoButtons)).maybeAdd(_primaryToolbar.primaryToolbarPlugin, function () {
|
|
58
62
|
return !!(0, _platformFeatureFlags.getBooleanFF)('platform.editor.primary-toolbar-ordering');
|
package/dist/cjs/test-utils.js
CHANGED
|
@@ -94,9 +94,7 @@ var createPMSchemaAndPlugins = exports.createPMSchemaAndPlugins = function creat
|
|
|
94
94
|
// we are ignoring the below because while this logic knows if
|
|
95
95
|
// basePlugin is in the inputPreset, the type system does not
|
|
96
96
|
// so it marks it as a duplicate plugin :) - this is fine
|
|
97
|
-
var preset = inputPreset.has(_base.basePlugin) ? inputPreset :
|
|
98
|
-
// @ts-expect-error
|
|
99
|
-
inputPreset.add(_base.basePlugin);
|
|
97
|
+
var preset = inputPreset.has(_base.basePlugin) ? inputPreset : inputPreset.add(_base.basePlugin);
|
|
100
98
|
editorPlugins = preset.build({
|
|
101
99
|
pluginInjectionAPI: pluginFactoryParams.pluginInjectionAPI
|
|
102
100
|
});
|
|
@@ -31,6 +31,7 @@ import { undoRedoPlugin } from '@atlaskit/editor-plugins/undo-redo';
|
|
|
31
31
|
import { unsupportedContentPlugin } from '@atlaskit/editor-plugins/unsupported-content';
|
|
32
32
|
import { widthPlugin } from '@atlaskit/editor-plugins/width';
|
|
33
33
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
34
|
+
import { isFullPage as fullPageCheck } from '../utils/is-full-page';
|
|
34
35
|
// #endregion
|
|
35
36
|
|
|
36
37
|
/**
|
|
@@ -40,11 +41,13 @@ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
|
40
41
|
export function createDefaultPreset(options) {
|
|
41
42
|
var _options$featureFlags, _options$featureFlags2;
|
|
42
43
|
const isMobile = options.appearance === 'mobile';
|
|
44
|
+
const isFullPage = fullPageCheck(options.appearance);
|
|
43
45
|
const preset = new EditorPresetBuilder().add([featureFlagsPlugin, options.featureFlags || {}]).maybeAdd([analyticsPlugin, {
|
|
44
46
|
createAnalyticsEvent: options.createAnalyticsEvent,
|
|
45
47
|
performanceTracking: options.performanceTracking
|
|
46
48
|
}], Boolean(options.allowAnalyticsGASV3)).add(betterTypeHistoryPlugin).add([pastePlugin, {
|
|
47
|
-
...(options === null || options === void 0 ? void 0 : options.paste)
|
|
49
|
+
...(options === null || options === void 0 ? void 0 : options.paste),
|
|
50
|
+
isFullPage
|
|
48
51
|
}]).add(clipboardPlugin).add(focusPlugin).add(compositionPlugin).add([contextIdentifierPlugin, {
|
|
49
52
|
contextIdentifierProvider: options.contextIdentifierProvider
|
|
50
53
|
}]).add([basePlugin, options.base]).add(decorationsPlugin).add([typeAheadPlugin, options.typeAhead]).maybeAdd(historyPlugin, Boolean(isMobile || options.allowUndoRedoButtons)).maybeAdd(primaryToolbarPlugin, () => !!getBooleanFF('platform.editor.primary-toolbar-ordering')).maybeAdd(undoRedoPlugin, Boolean((_options$featureFlags = (_options$featureFlags2 = options.featureFlags) === null || _options$featureFlags2 === void 0 ? void 0 : _options$featureFlags2.undoRedoButtons) !== null && _options$featureFlags !== void 0 ? _options$featureFlags : options.allowUndoRedoButtons)).add([blockTypePlugin, options.blockType]).add(clearMarksOnEmptyDocPlugin).maybeAdd([selectionToolbarPlugin, {
|
|
@@ -57,9 +57,7 @@ export const createPMSchemaAndPlugins = (inputPreset = new EditorPresetBuilder()
|
|
|
57
57
|
// we are ignoring the below because while this logic knows if
|
|
58
58
|
// basePlugin is in the inputPreset, the type system does not
|
|
59
59
|
// so it marks it as a duplicate plugin :) - this is fine
|
|
60
|
-
const preset = inputPreset.has(basePlugin) ? inputPreset :
|
|
61
|
-
// @ts-expect-error
|
|
62
|
-
inputPreset.add(basePlugin);
|
|
60
|
+
const preset = inputPreset.has(basePlugin) ? inputPreset : inputPreset.add(basePlugin);
|
|
63
61
|
editorPlugins = preset.build({
|
|
64
62
|
pluginInjectionAPI: pluginFactoryParams.pluginInjectionAPI
|
|
65
63
|
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = "@atlaskit/editor-core";
|
|
2
|
-
export const version = "193.28.
|
|
2
|
+
export const version = "193.28.10";
|
|
@@ -34,6 +34,7 @@ import { undoRedoPlugin } from '@atlaskit/editor-plugins/undo-redo';
|
|
|
34
34
|
import { unsupportedContentPlugin } from '@atlaskit/editor-plugins/unsupported-content';
|
|
35
35
|
import { widthPlugin } from '@atlaskit/editor-plugins/width';
|
|
36
36
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
37
|
+
import { isFullPage as fullPageCheck } from '../utils/is-full-page';
|
|
37
38
|
// #endregion
|
|
38
39
|
|
|
39
40
|
/**
|
|
@@ -43,10 +44,13 @@ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
|
43
44
|
export function createDefaultPreset(options) {
|
|
44
45
|
var _options$featureFlags, _options$featureFlags2;
|
|
45
46
|
var isMobile = options.appearance === 'mobile';
|
|
47
|
+
var isFullPage = fullPageCheck(options.appearance);
|
|
46
48
|
var preset = new EditorPresetBuilder().add([featureFlagsPlugin, options.featureFlags || {}]).maybeAdd([analyticsPlugin, {
|
|
47
49
|
createAnalyticsEvent: options.createAnalyticsEvent,
|
|
48
50
|
performanceTracking: options.performanceTracking
|
|
49
|
-
}], Boolean(options.allowAnalyticsGASV3)).add(betterTypeHistoryPlugin).add([pastePlugin, _objectSpread({}, options === null || options === void 0 ? void 0 : options.paste)
|
|
51
|
+
}], Boolean(options.allowAnalyticsGASV3)).add(betterTypeHistoryPlugin).add([pastePlugin, _objectSpread(_objectSpread({}, options === null || options === void 0 ? void 0 : options.paste), {}, {
|
|
52
|
+
isFullPage: isFullPage
|
|
53
|
+
})]).add(clipboardPlugin).add(focusPlugin).add(compositionPlugin).add([contextIdentifierPlugin, {
|
|
50
54
|
contextIdentifierProvider: options.contextIdentifierProvider
|
|
51
55
|
}]).add([basePlugin, options.base]).add(decorationsPlugin).add([typeAheadPlugin, options.typeAhead]).maybeAdd(historyPlugin, Boolean(isMobile || options.allowUndoRedoButtons)).maybeAdd(primaryToolbarPlugin, function () {
|
|
52
56
|
return !!getBooleanFF('platform.editor.primary-toolbar-ordering');
|
package/dist/esm/test-utils.js
CHANGED
|
@@ -66,9 +66,7 @@ export var createPMSchemaAndPlugins = function createPMSchemaAndPlugins() {
|
|
|
66
66
|
// we are ignoring the below because while this logic knows if
|
|
67
67
|
// basePlugin is in the inputPreset, the type system does not
|
|
68
68
|
// so it marks it as a duplicate plugin :) - this is fine
|
|
69
|
-
var preset = inputPreset.has(basePlugin) ? inputPreset :
|
|
70
|
-
// @ts-expect-error
|
|
71
|
-
inputPreset.add(basePlugin);
|
|
69
|
+
var preset = inputPreset.has(basePlugin) ? inputPreset : inputPreset.add(basePlugin);
|
|
72
70
|
editorPlugins = preset.build({
|
|
73
71
|
pluginInjectionAPI: pluginFactoryParams.pluginInjectionAPI
|
|
74
72
|
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export var name = "@atlaskit/editor-core";
|
|
2
|
-
export var version = "193.28.
|
|
2
|
+
export var version = "193.28.10";
|
|
@@ -3,8 +3,9 @@ import { jsx } from '@emotion/react';
|
|
|
3
3
|
import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
4
4
|
import type { FireAnalyticsCallback } from '@atlaskit/editor-common/analytics';
|
|
5
5
|
import type { EditorPresetBuilder } from '@atlaskit/editor-common/preset';
|
|
6
|
+
import type { AllEditorPresetPluginTypes } from '@atlaskit/editor-common/preset';
|
|
6
7
|
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
7
|
-
import type {
|
|
8
|
+
import type { Transformer } from '@atlaskit/editor-common/types';
|
|
8
9
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
9
10
|
import type EditorActions from '../actions';
|
|
10
11
|
import type { EventDispatcher } from '../event-dispatcher';
|
|
@@ -5,10 +5,10 @@ import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
|
5
5
|
import { FULL_WIDTH_MODE } from '@atlaskit/editor-common/analytics';
|
|
6
6
|
import type { AnalyticsEventPayload, DispatchAnalyticsEvent, FireAnalyticsCallback } from '@atlaskit/editor-common/analytics';
|
|
7
7
|
import type { LegacyPortalProviderAPI } from '@atlaskit/editor-common/portal-provider';
|
|
8
|
-
import type { EditorPresetBuilder } from '@atlaskit/editor-common/preset';
|
|
8
|
+
import type { AllEditorPresetPluginTypes, EditorPresetBuilder } from '@atlaskit/editor-common/preset';
|
|
9
9
|
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
10
10
|
import type { PortalProviderAPI } from '@atlaskit/editor-common/src/portal';
|
|
11
|
-
import type {
|
|
11
|
+
import type { Transformer } from '@atlaskit/editor-common/types';
|
|
12
12
|
import { ExperienceStore } from '@atlaskit/editor-common/ufo';
|
|
13
13
|
import type { ErrorReporter, SEVERITY } from '@atlaskit/editor-common/utils';
|
|
14
14
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|