@atlaskit/editor-core 194.3.6 → 194.3.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/dist/cjs/composable-editor/editor.js +3 -2
- package/dist/cjs/composable-editor/hooks/useEditorMeasuresConstructor.js +2 -1
- package/dist/cjs/composable-editor/hooks/useMeasureEditorMountTime.js +4 -4
- package/dist/cjs/create-editor/ReactEditorView.js +3 -2
- package/dist/cjs/presets/universal.js +7 -2
- package/dist/cjs/utils/performance/instrumented-plugin.js +3 -3
- package/dist/cjs/utils/performance/track-transactions.js +3 -2
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/composable-editor/editor.js +2 -1
- package/dist/es2019/composable-editor/hooks/useEditorMeasuresConstructor.js +2 -1
- package/dist/es2019/composable-editor/hooks/useMeasureEditorMountTime.js +1 -1
- package/dist/es2019/create-editor/ReactEditorView.js +2 -1
- package/dist/es2019/presets/universal.js +7 -2
- package/dist/es2019/utils/performance/instrumented-plugin.js +1 -1
- package/dist/es2019/utils/performance/track-transactions.js +2 -1
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/composable-editor/editor.js +2 -1
- package/dist/esm/composable-editor/hooks/useEditorMeasuresConstructor.js +2 -1
- package/dist/esm/composable-editor/hooks/useMeasureEditorMountTime.js +1 -1
- package/dist/esm/create-editor/ReactEditorView.js +2 -1
- package/dist/esm/presets/universal.js +7 -2
- package/dist/esm/utils/performance/instrumented-plugin.js +1 -1
- package/dist/esm/utils/performance/track-transactions.js +2 -1
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/create-editor/create-preset.d.ts +2 -0
- package/dist/types/presets/default.d.ts +4 -0
- package/dist/types/presets/universal.d.ts +2 -0
- package/dist/types/presets/useUniversalPreset.d.ts +2 -0
- package/dist/types-ts4.5/create-editor/create-preset.d.ts +2 -0
- package/dist/types-ts4.5/presets/default.d.ts +4 -0
- package/dist/types-ts4.5/presets/universal.d.ts +2 -0
- package/dist/types-ts4.5/presets/useUniversalPreset.d.ts +2 -0
- package/package.json +6 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 194.3.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#121678](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/121678)
|
|
8
|
+
[`9ca02c9c7c5ce`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/9ca02c9c7c5ce) -
|
|
9
|
+
created new entrypoint for startMeasure,stopMeasure,clearMeasure, deprecated those functions in
|
|
10
|
+
editor-common/utils
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
13
|
+
## 194.3.9
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- [#121871](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/121871)
|
|
18
|
+
[`61163aa3e3a70`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/61163aa3e3a70) -
|
|
19
|
+
ED-24145: Turned on table drag and drop in comment editor
|
|
20
|
+
- [`3b20c735bc9ee`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/3b20c735bc9ee) -
|
|
21
|
+
[ux] Insert full-width table in comment editor when table resizing is enabled.
|
|
22
|
+
|
|
3
23
|
## 194.3.6
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
|
@@ -15,6 +15,7 @@ var _analyticsNamespacedContext = require("@atlaskit/analytics-namespaced-contex
|
|
|
15
15
|
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
16
16
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
17
17
|
var _hooks = require("@atlaskit/editor-common/hooks");
|
|
18
|
+
var _performanceMeasures = require("@atlaskit/editor-common/performance-measures");
|
|
18
19
|
var _ufo = require("@atlaskit/editor-common/ufo");
|
|
19
20
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
20
21
|
var _actions = _interopRequireDefault(require("../actions"));
|
|
@@ -79,9 +80,9 @@ function Editor(passedProps) {
|
|
|
79
80
|
if (onEditorReady) {
|
|
80
81
|
var _performanceTracking$;
|
|
81
82
|
var measureEditorReady = (performanceTracking === null || performanceTracking === void 0 || (_performanceTracking$ = performanceTracking.onEditorReadyCallbackTracking) === null || _performanceTracking$ === void 0 ? void 0 : _performanceTracking$.enabled) || (featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.ufo);
|
|
82
|
-
measureEditorReady && (0,
|
|
83
|
+
measureEditorReady && (0, _performanceMeasures.startMeasure)(_measureEnum.default.ON_EDITOR_READY_CALLBACK);
|
|
83
84
|
onEditorReady(editorActions);
|
|
84
|
-
measureEditorReady && (0,
|
|
85
|
+
measureEditorReady && (0, _performanceMeasures.stopMeasure)(_measureEnum.default.ON_EDITOR_READY_CALLBACK, (0, _sendDurationAnalytics.default)(_analytics.ACTION.ON_EDITOR_READY_CALLBACK, {
|
|
85
86
|
contextIdentifierProvider: contextIdentifierProvider,
|
|
86
87
|
featureFlags: featureFlags
|
|
87
88
|
}, getExperienceStore, createAnalyticsEvent));
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = useEditorConstructor;
|
|
8
8
|
var _hooks = require("@atlaskit/editor-common/hooks");
|
|
9
|
+
var _performanceMeasures = require("@atlaskit/editor-common/performance-measures");
|
|
9
10
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
10
11
|
var _measureEnum = _interopRequireDefault(require("../../utils/performance/measure-enum"));
|
|
11
12
|
var _editorMeasureTTICallback = _interopRequireDefault(require("../utils/editorMeasureTTICallback"));
|
|
@@ -25,7 +26,7 @@ var _editorMeasureTTICallback = _interopRequireDefault(require("../utils/editorM
|
|
|
25
26
|
function useEditorConstructor(performanceTracking, featureFlags, getExperienceStore, createAnalyticsEvent) {
|
|
26
27
|
(0, _hooks.useConstructor)(function () {
|
|
27
28
|
var _performanceTracking$;
|
|
28
|
-
(0,
|
|
29
|
+
(0, _performanceMeasures.startMeasure)(_measureEnum.default.EDITOR_MOUNTED);
|
|
29
30
|
if (performanceTracking !== null && performanceTracking !== void 0 && (_performanceTracking$ = performanceTracking.ttiTracking) !== null && _performanceTracking$ !== void 0 && _performanceTracking$.enabled || featureFlags !== null && featureFlags !== void 0 && featureFlags.ufo) {
|
|
30
31
|
var _performanceTracking$2, _performanceTracking$3;
|
|
31
32
|
(0, _utils.measureTTI)(function (tti, ttiFromInvocation, canceled, distortedDuration) {
|
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.default = useMeasureEditorMountTime;
|
|
8
8
|
var _react = require("react");
|
|
9
9
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
10
|
-
var
|
|
10
|
+
var _performanceMeasures = require("@atlaskit/editor-common/performance-measures");
|
|
11
11
|
var _measureEnum = _interopRequireDefault(require("../../utils/performance/measure-enum"));
|
|
12
12
|
var _sendDurationAnalytics = _interopRequireDefault(require("../utils/sendDurationAnalytics"));
|
|
13
13
|
var _useEditorMeasuresConstructor = _interopRequireDefault(require("./useEditorMeasuresConstructor"));
|
|
@@ -25,11 +25,11 @@ var _useEditorMeasuresConstructor = _interopRequireDefault(require("./useEditorM
|
|
|
25
25
|
function useMeasureEditorMountTime(props, getExperienceStore, createAnalyticsEvent) {
|
|
26
26
|
(0, _useEditorMeasuresConstructor.default)(props.performanceTracking, props.featureFlags, getExperienceStore, createAnalyticsEvent);
|
|
27
27
|
(0, _react.useEffect)(function () {
|
|
28
|
-
(0,
|
|
28
|
+
(0, _performanceMeasures.stopMeasure)(_measureEnum.default.EDITOR_MOUNTED, (0, _sendDurationAnalytics.default)(_analytics.ACTION.EDITOR_MOUNTED, props, getExperienceStore, createAnalyticsEvent));
|
|
29
29
|
return function () {
|
|
30
30
|
var _props$performanceTra, _props$featureFlags;
|
|
31
|
-
(0,
|
|
32
|
-
(props === null || props === void 0 || (_props$performanceTra = props.performanceTracking) === null || _props$performanceTra === void 0 || (_props$performanceTra = _props$performanceTra.onEditorReadyCallbackTracking) === null || _props$performanceTra === void 0 ? void 0 : _props$performanceTra.enabled) && (0,
|
|
31
|
+
(0, _performanceMeasures.clearMeasure)(_measureEnum.default.EDITOR_MOUNTED);
|
|
32
|
+
(props === null || props === void 0 || (_props$performanceTra = props.performanceTracking) === null || _props$performanceTra === void 0 || (_props$performanceTra = _props$performanceTra.onEditorReadyCallbackTracking) === null || _props$performanceTra === void 0 ? void 0 : _props$performanceTra.enabled) && (0, _performanceMeasures.clearMeasure)(_measureEnum.default.ON_EDITOR_READY_CALLBACK);
|
|
33
33
|
if ((_props$featureFlags = props.featureFlags) !== null && _props$featureFlags !== void 0 && _props$featureFlags.ufo) {
|
|
34
34
|
var _getExperienceStore;
|
|
35
35
|
(_getExperienceStore = getExperienceStore()) === null || _getExperienceStore === void 0 || _getExperienceStore.abortAll({
|
|
@@ -19,6 +19,7 @@ var _reactIntlNext = require("react-intl-next");
|
|
|
19
19
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
20
20
|
var _coreUtils = require("@atlaskit/editor-common/core-utils");
|
|
21
21
|
var _normalizeFeatureFlags = require("@atlaskit/editor-common/normalize-feature-flags");
|
|
22
|
+
var _performanceMeasures = require("@atlaskit/editor-common/performance-measures");
|
|
22
23
|
var _preset = require("@atlaskit/editor-common/preset");
|
|
23
24
|
var _ufo = require("@atlaskit/editor-common/ufo");
|
|
24
25
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
@@ -262,14 +263,14 @@ var ReactEditorView = exports.ReactEditorView = /*#__PURE__*/function (_React$Co
|
|
|
262
263
|
newEditorState = _ref2.newEditorState;
|
|
263
264
|
var trackinEnabled = _this.transactionTracking.enabled;
|
|
264
265
|
_this.config.onEditorViewStateUpdatedCallbacks.forEach(function (entry) {
|
|
265
|
-
trackinEnabled && (0,
|
|
266
|
+
trackinEnabled && (0, _performanceMeasures.startMeasure)("\uD83E\uDD89 ".concat(entry.pluginName, "::onEditorViewStateUpdated"));
|
|
266
267
|
entry.callback({
|
|
267
268
|
originalTransaction: originalTransaction,
|
|
268
269
|
transactions: transactions,
|
|
269
270
|
oldEditorState: oldEditorState,
|
|
270
271
|
newEditorState: newEditorState
|
|
271
272
|
});
|
|
272
|
-
trackinEnabled && (0,
|
|
273
|
+
trackinEnabled && (0, _performanceMeasures.stopMeasure)("\uD83E\uDD89 ".concat(entry.pluginName, "::onEditorViewStateUpdated"));
|
|
273
274
|
});
|
|
274
275
|
});
|
|
275
276
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "trackValidTransactions", function () {
|
|
@@ -130,14 +130,19 @@ function createUniversalPreset(appearance, props, featureFlags, prevAppearance,
|
|
|
130
130
|
}], Boolean(props.mentionProvider)).maybeAdd(_emoji.emojiPlugin, Boolean(props.emojiProvider)).maybeAdd([_table.tablesPlugin, {
|
|
131
131
|
tableOptions: !props.allowTables || typeof props.allowTables === 'boolean' ? {} : props.allowTables,
|
|
132
132
|
tableResizingEnabled: isFullPage || isComment && (0, _platformFeatureFlags.fg)('platform_editor_table_support_in_comment'),
|
|
133
|
-
dragAndDropEnabled: (featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.tableDragAndDrop) && isFullPage
|
|
133
|
+
dragAndDropEnabled: (featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.tableDragAndDrop) && isFullPage ||
|
|
134
|
+
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
135
|
+
isComment && (featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.tableDragAndDrop) &&
|
|
136
|
+
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
137
|
+
(0, _platformFeatureFlags.fg)('platform_editor_table_support_in_comment'),
|
|
134
138
|
isTableScalingEnabled: (featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.tablePreserveWidth) && isFullPage,
|
|
135
139
|
allowContextualMenu: !isMobile,
|
|
136
140
|
fullWidthEnabled: appearance === 'full-width',
|
|
137
141
|
wasFullWidthEnabled: prevAppearance && prevAppearance === 'full-width',
|
|
138
142
|
getEditorFeatureFlags: getEditorFeatureFlags,
|
|
139
143
|
isTableAlignmentEnabled: (0, _platformFeatureFlags.fg)('platform.editor.table.allow-table-alignment') && isFullPage,
|
|
140
|
-
isNewColumnResizingEnabled: (featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.tableNewColumnResizing) && isFullPage
|
|
144
|
+
isNewColumnResizingEnabled: (featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.tableNewColumnResizing) && isFullPage,
|
|
145
|
+
isCommentEditor: isComment
|
|
141
146
|
}], Boolean(props.allowTables)).maybeAdd([_tasksAndDecisions.tasksAndDecisionsPlugin, {
|
|
142
147
|
allowNestedTasks: props.allowNestedTasks,
|
|
143
148
|
consumeTabs: isFullPage,
|
|
@@ -11,8 +11,8 @@ var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/hel
|
|
|
11
11
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
12
12
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
13
13
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
14
|
+
var _performanceMeasures = require("@atlaskit/editor-common/performance-measures");
|
|
14
15
|
var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
15
|
-
var _utils = require("@atlaskit/editor-common/utils");
|
|
16
16
|
var _saferTransactions = require("./safer-transactions");
|
|
17
17
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
18
18
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
@@ -69,11 +69,11 @@ var InstrumentedPlugin = exports.InstrumentedPlugin = /*#__PURE__*/function (_Sa
|
|
|
69
69
|
view.update = function (view, state) {
|
|
70
70
|
var shouldTrack = uiTrackingSamplingRate && uiTrackingSamplingCounter === 0;
|
|
71
71
|
if (shouldTrack) {
|
|
72
|
-
(0,
|
|
72
|
+
(0, _performanceMeasures.startMeasure)(measure);
|
|
73
73
|
}
|
|
74
74
|
originalUpdate(view, state);
|
|
75
75
|
if (shouldTrack) {
|
|
76
|
-
(0,
|
|
76
|
+
(0, _performanceMeasures.stopMeasure)(measure, function () {});
|
|
77
77
|
}
|
|
78
78
|
uiTrackingSamplingCounter++;
|
|
79
79
|
if (uiTrackingSamplingRate && uiTrackingSamplingCounter >= uiTrackingSamplingRate) {
|
|
@@ -8,6 +8,7 @@ exports.TransactionTracker = exports.EVENT_NAME_VIEW_STATE_UPDATED = exports.EVE
|
|
|
8
8
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
9
9
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
10
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
+
var _performanceMeasures = require("@atlaskit/editor-common/performance-measures");
|
|
11
12
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
12
13
|
var EVENT_NAME_STATE_APPLY = exports.EVENT_NAME_STATE_APPLY = "\uD83E\uDD89 EditorView::state::apply";
|
|
13
14
|
var EVENT_NAME_UPDATE_STATE = exports.EVENT_NAME_UPDATE_STATE = "\uD83E\uDD89 EditorView::updateState";
|
|
@@ -48,8 +49,8 @@ var TransactionTracker = exports.TransactionTracker = /*#__PURE__*/function () {
|
|
|
48
49
|
};
|
|
49
50
|
}
|
|
50
51
|
return {
|
|
51
|
-
startMeasure: usePerformanceMarks ?
|
|
52
|
-
stopMeasure: usePerformanceMarks ?
|
|
52
|
+
startMeasure: usePerformanceMarks ? _performanceMeasures.startMeasure : _this.startMeasureSimple,
|
|
53
|
+
stopMeasure: usePerformanceMarks ? _performanceMeasures.stopMeasure : _this.stopMeasureSimple
|
|
53
54
|
};
|
|
54
55
|
});
|
|
55
56
|
(0, _defineProperty2.default)(this, "startMeasureSimple", function (measureName) {
|
|
@@ -10,8 +10,9 @@ import { FabricEditorAnalyticsContext } from '@atlaskit/analytics-namespaced-con
|
|
|
10
10
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
11
11
|
import { ACTION, fireAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
12
12
|
import { useConstructor } from '@atlaskit/editor-common/hooks';
|
|
13
|
+
import { startMeasure, stopMeasure } from '@atlaskit/editor-common/performance-measures';
|
|
13
14
|
import { EditorExperience, ExperienceStore } from '@atlaskit/editor-common/ufo';
|
|
14
|
-
import { getAnalyticsAppearance
|
|
15
|
+
import { getAnalyticsAppearance } from '@atlaskit/editor-common/utils';
|
|
15
16
|
import EditorActions from '../actions';
|
|
16
17
|
import { createFeatureFlagsFromProps } from '../create-editor/feature-flags-from-props';
|
|
17
18
|
import { useEditorContext } from '../ui/EditorContext';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
|
|
3
3
|
import { useConstructor } from '@atlaskit/editor-common/hooks';
|
|
4
|
-
import {
|
|
4
|
+
import { startMeasure } from '@atlaskit/editor-common/performance-measures';
|
|
5
|
+
import { measureTTI } from '@atlaskit/editor-common/utils';
|
|
5
6
|
import measurements from '../../utils/performance/measure-enum';
|
|
6
7
|
import editorMeasureTTICallback from '../utils/editorMeasureTTICallback';
|
|
7
8
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { useEffect } from 'react';
|
|
3
3
|
import { ACTION } from '@atlaskit/editor-common/analytics';
|
|
4
|
-
import { clearMeasure, stopMeasure } from '@atlaskit/editor-common/
|
|
4
|
+
import { clearMeasure, stopMeasure } from '@atlaskit/editor-common/performance-measures';
|
|
5
5
|
import measurements from '../../utils/performance/measure-enum';
|
|
6
6
|
import sendDurationAnalytics from '../utils/sendDurationAnalytics';
|
|
7
7
|
import useEditorConstructor from './useEditorMeasuresConstructor';
|
|
@@ -5,10 +5,11 @@ import { injectIntl } from 'react-intl-next';
|
|
|
5
5
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, fireAnalyticsEvent, FULL_WIDTH_MODE, getAnalyticsEventsFromTransaction, PLATFORMS } from '@atlaskit/editor-common/analytics';
|
|
6
6
|
import { getDocStructure } from '@atlaskit/editor-common/core-utils';
|
|
7
7
|
import { getEnabledFeatureFlagKeys } from '@atlaskit/editor-common/normalize-feature-flags';
|
|
8
|
+
import { startMeasure, stopMeasure } from '@atlaskit/editor-common/performance-measures';
|
|
8
9
|
import { EditorPluginInjectionAPI } from '@atlaskit/editor-common/preset';
|
|
9
10
|
import { EditorExperience, ExperienceStore, RELIABILITY_INTERVAL } from '@atlaskit/editor-common/ufo';
|
|
10
11
|
import { EDIT_AREA_ID } from '@atlaskit/editor-common/ui';
|
|
11
|
-
import { analyticsEventKey, browser, countNodes, findChangedNodesFromTransaction, getAnalyticsEventSeverity, getResponseEndTime, measureRender, processRawValue, shouldForceTracking,
|
|
12
|
+
import { analyticsEventKey, browser, countNodes, findChangedNodesFromTransaction, getAnalyticsEventSeverity, getResponseEndTime, measureRender, processRawValue, shouldForceTracking, validateNodes, validNode } from '@atlaskit/editor-common/utils';
|
|
12
13
|
import { EditorState, Selection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
13
14
|
import { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
14
15
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
@@ -119,14 +119,19 @@ export default function createUniversalPreset(appearance, props, featureFlags, p
|
|
|
119
119
|
}], Boolean(props.mentionProvider)).maybeAdd(emojiPlugin, Boolean(props.emojiProvider)).maybeAdd([tablesPlugin, {
|
|
120
120
|
tableOptions: !props.allowTables || typeof props.allowTables === 'boolean' ? {} : props.allowTables,
|
|
121
121
|
tableResizingEnabled: isFullPage || isComment && fg('platform_editor_table_support_in_comment'),
|
|
122
|
-
dragAndDropEnabled: (featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.tableDragAndDrop) && isFullPage
|
|
122
|
+
dragAndDropEnabled: (featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.tableDragAndDrop) && isFullPage ||
|
|
123
|
+
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
124
|
+
isComment && (featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.tableDragAndDrop) &&
|
|
125
|
+
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
126
|
+
fg('platform_editor_table_support_in_comment'),
|
|
123
127
|
isTableScalingEnabled: (featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.tablePreserveWidth) && isFullPage,
|
|
124
128
|
allowContextualMenu: !isMobile,
|
|
125
129
|
fullWidthEnabled: appearance === 'full-width',
|
|
126
130
|
wasFullWidthEnabled: prevAppearance && prevAppearance === 'full-width',
|
|
127
131
|
getEditorFeatureFlags,
|
|
128
132
|
isTableAlignmentEnabled: fg('platform.editor.table.allow-table-alignment') && isFullPage,
|
|
129
|
-
isNewColumnResizingEnabled: (featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.tableNewColumnResizing) && isFullPage
|
|
133
|
+
isNewColumnResizingEnabled: (featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.tableNewColumnResizing) && isFullPage,
|
|
134
|
+
isCommentEditor: isComment
|
|
130
135
|
}], Boolean(props.allowTables)).maybeAdd([tasksAndDecisionsPlugin, {
|
|
131
136
|
allowNestedTasks: props.allowNestedTasks,
|
|
132
137
|
consumeTabs: isFullPage,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { startMeasure, stopMeasure } from '@atlaskit/editor-common/performance-measures';
|
|
1
2
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
|
-
import { startMeasure, stopMeasure } from '@atlaskit/editor-common/utils';
|
|
3
3
|
import { freezeUnsafeTransactionProperties } from './safer-transactions';
|
|
4
4
|
export class InstrumentedPlugin extends SafePlugin {
|
|
5
5
|
constructor(spec, options = {}, transactionTracker) {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
import {
|
|
2
|
+
import { startMeasure, stopMeasure } from '@atlaskit/editor-common/performance-measures';
|
|
3
|
+
import { getTimeSince, isPerformanceAPIAvailable } from '@atlaskit/editor-common/utils';
|
|
3
4
|
export const EVENT_NAME_STATE_APPLY = `🦉 EditorView::state::apply`;
|
|
4
5
|
export const EVENT_NAME_UPDATE_STATE = `🦉 EditorView::updateState`;
|
|
5
6
|
export const EVENT_NAME_VIEW_STATE_UPDATED = `🦉 EditorView::onEditorViewStateUpdated`;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = "@atlaskit/editor-core";
|
|
2
|
-
export const version = "194.3.
|
|
2
|
+
export const version = "194.3.10";
|
|
@@ -10,8 +10,9 @@ import { FabricEditorAnalyticsContext } from '@atlaskit/analytics-namespaced-con
|
|
|
10
10
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
11
11
|
import { ACTION, fireAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
12
12
|
import { useConstructor } from '@atlaskit/editor-common/hooks';
|
|
13
|
+
import { startMeasure, stopMeasure } from '@atlaskit/editor-common/performance-measures';
|
|
13
14
|
import { EditorExperience, ExperienceStore } from '@atlaskit/editor-common/ufo';
|
|
14
|
-
import { getAnalyticsAppearance
|
|
15
|
+
import { getAnalyticsAppearance } from '@atlaskit/editor-common/utils';
|
|
15
16
|
import EditorActions from '../actions';
|
|
16
17
|
import { createFeatureFlagsFromProps } from '../create-editor/feature-flags-from-props';
|
|
17
18
|
import { useEditorContext } from '../ui/EditorContext';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
|
|
3
3
|
import { useConstructor } from '@atlaskit/editor-common/hooks';
|
|
4
|
-
import {
|
|
4
|
+
import { startMeasure } from '@atlaskit/editor-common/performance-measures';
|
|
5
|
+
import { measureTTI } from '@atlaskit/editor-common/utils';
|
|
5
6
|
import measurements from '../../utils/performance/measure-enum';
|
|
6
7
|
import editorMeasureTTICallback from '../utils/editorMeasureTTICallback';
|
|
7
8
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { useEffect } from 'react';
|
|
3
3
|
import { ACTION } from '@atlaskit/editor-common/analytics';
|
|
4
|
-
import { clearMeasure, stopMeasure } from '@atlaskit/editor-common/
|
|
4
|
+
import { clearMeasure, stopMeasure } from '@atlaskit/editor-common/performance-measures';
|
|
5
5
|
import measurements from '../../utils/performance/measure-enum';
|
|
6
6
|
import sendDurationAnalytics from '../utils/sendDurationAnalytics';
|
|
7
7
|
import useEditorConstructor from './useEditorMeasuresConstructor';
|
|
@@ -16,10 +16,11 @@ import { injectIntl } from 'react-intl-next';
|
|
|
16
16
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, fireAnalyticsEvent, FULL_WIDTH_MODE, getAnalyticsEventsFromTransaction, PLATFORMS } from '@atlaskit/editor-common/analytics';
|
|
17
17
|
import { getDocStructure } from '@atlaskit/editor-common/core-utils';
|
|
18
18
|
import { getEnabledFeatureFlagKeys } from '@atlaskit/editor-common/normalize-feature-flags';
|
|
19
|
+
import { startMeasure, stopMeasure } from '@atlaskit/editor-common/performance-measures';
|
|
19
20
|
import { EditorPluginInjectionAPI } from '@atlaskit/editor-common/preset';
|
|
20
21
|
import { EditorExperience, ExperienceStore, RELIABILITY_INTERVAL } from '@atlaskit/editor-common/ufo';
|
|
21
22
|
import { EDIT_AREA_ID } from '@atlaskit/editor-common/ui';
|
|
22
|
-
import { analyticsEventKey, browser, countNodes as _countNodes, findChangedNodesFromTransaction, getAnalyticsEventSeverity, getResponseEndTime, measureRender, processRawValue, shouldForceTracking,
|
|
23
|
+
import { analyticsEventKey, browser, countNodes as _countNodes, findChangedNodesFromTransaction, getAnalyticsEventSeverity, getResponseEndTime, measureRender, processRawValue, shouldForceTracking, validateNodes, validNode } from '@atlaskit/editor-common/utils';
|
|
23
24
|
import { EditorState, Selection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
24
25
|
import { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
25
26
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
@@ -122,14 +122,19 @@ export default function createUniversalPreset(appearance, props, featureFlags, p
|
|
|
122
122
|
}], Boolean(props.mentionProvider)).maybeAdd(emojiPlugin, Boolean(props.emojiProvider)).maybeAdd([tablesPlugin, {
|
|
123
123
|
tableOptions: !props.allowTables || typeof props.allowTables === 'boolean' ? {} : props.allowTables,
|
|
124
124
|
tableResizingEnabled: isFullPage || isComment && fg('platform_editor_table_support_in_comment'),
|
|
125
|
-
dragAndDropEnabled: (featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.tableDragAndDrop) && isFullPage
|
|
125
|
+
dragAndDropEnabled: (featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.tableDragAndDrop) && isFullPage ||
|
|
126
|
+
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
127
|
+
isComment && (featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.tableDragAndDrop) &&
|
|
128
|
+
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
129
|
+
fg('platform_editor_table_support_in_comment'),
|
|
126
130
|
isTableScalingEnabled: (featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.tablePreserveWidth) && isFullPage,
|
|
127
131
|
allowContextualMenu: !isMobile,
|
|
128
132
|
fullWidthEnabled: appearance === 'full-width',
|
|
129
133
|
wasFullWidthEnabled: prevAppearance && prevAppearance === 'full-width',
|
|
130
134
|
getEditorFeatureFlags: getEditorFeatureFlags,
|
|
131
135
|
isTableAlignmentEnabled: fg('platform.editor.table.allow-table-alignment') && isFullPage,
|
|
132
|
-
isNewColumnResizingEnabled: (featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.tableNewColumnResizing) && isFullPage
|
|
136
|
+
isNewColumnResizingEnabled: (featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.tableNewColumnResizing) && isFullPage,
|
|
137
|
+
isCommentEditor: isComment
|
|
133
138
|
}], Boolean(props.allowTables)).maybeAdd([tasksAndDecisionsPlugin, {
|
|
134
139
|
allowNestedTasks: props.allowNestedTasks,
|
|
135
140
|
consumeTabs: isFullPage,
|
|
@@ -6,8 +6,8 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstruct
|
|
|
6
6
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
7
7
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
8
8
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
9
|
+
import { startMeasure, stopMeasure } from '@atlaskit/editor-common/performance-measures';
|
|
9
10
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
10
|
-
import { startMeasure, stopMeasure } from '@atlaskit/editor-common/utils';
|
|
11
11
|
import { freezeUnsafeTransactionProperties } from './safer-transactions';
|
|
12
12
|
export var InstrumentedPlugin = /*#__PURE__*/function (_SafePlugin) {
|
|
13
13
|
_inherits(InstrumentedPlugin, _SafePlugin);
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
3
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
|
-
import {
|
|
4
|
+
import { startMeasure, stopMeasure } from '@atlaskit/editor-common/performance-measures';
|
|
5
|
+
import { getTimeSince, isPerformanceAPIAvailable } from '@atlaskit/editor-common/utils';
|
|
5
6
|
export var EVENT_NAME_STATE_APPLY = "\uD83E\uDD89 EditorView::state::apply";
|
|
6
7
|
export var EVENT_NAME_UPDATE_STATE = "\uD83E\uDD89 EditorView::updateState";
|
|
7
8
|
export var EVENT_NAME_VIEW_STATE_UPDATED = "\uD83E\uDD89 EditorView::onEditorViewStateUpdated";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export var name = "@atlaskit/editor-core";
|
|
2
|
-
export var version = "194.3.
|
|
2
|
+
export var version = "194.3.10";
|
|
@@ -3626,6 +3626,8 @@ export declare function createPreset(props: EditorProps, prevProps?: EditorProps
|
|
|
3626
3626
|
};
|
|
3627
3627
|
commands: {
|
|
3628
3628
|
showLinkToolbar: import("@atlaskit/editor-plugin-hyperlink").ShowLinkToolbar;
|
|
3629
|
+
updateLink: (href: string, text: string) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
3630
|
+
removeLink: () => import("@atlaskit/editor-common/types").EditorCommand;
|
|
3629
3631
|
};
|
|
3630
3632
|
sharedState: import("@atlaskit/editor-common/link").HyperlinkState | undefined;
|
|
3631
3633
|
}, import("@atlaskit/editor-common/types").HyperlinkPluginOptions | undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"selectionToolbar", {
|
|
@@ -862,6 +862,8 @@ export declare function createDefaultPreset(options: DefaultPresetPluginOptions)
|
|
|
862
862
|
};
|
|
863
863
|
commands: {
|
|
864
864
|
showLinkToolbar: import("@atlaskit/editor-plugins/hyperlink").ShowLinkToolbar;
|
|
865
|
+
updateLink: (href: string, text: string) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
866
|
+
removeLink: () => import("@atlaskit/editor-common/types").EditorCommand;
|
|
865
867
|
};
|
|
866
868
|
sharedState: import("@atlaskit/editor-common/link").HyperlinkState | undefined;
|
|
867
869
|
}, HyperlinkPluginOptions | undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"selectionToolbar", {
|
|
@@ -2545,6 +2547,8 @@ export declare function useDefaultPreset(props: DefaultPresetPluginOptions): Edi
|
|
|
2545
2547
|
};
|
|
2546
2548
|
commands: {
|
|
2547
2549
|
showLinkToolbar: import("@atlaskit/editor-plugins/hyperlink").ShowLinkToolbar;
|
|
2550
|
+
updateLink: (href: string, text: string) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
2551
|
+
removeLink: () => import("@atlaskit/editor-common/types").EditorCommand;
|
|
2548
2552
|
};
|
|
2549
2553
|
sharedState: import("@atlaskit/editor-common/link").HyperlinkState | undefined;
|
|
2550
2554
|
}, HyperlinkPluginOptions | undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"selectionToolbar", {
|
|
@@ -3643,6 +3643,8 @@ export default function createUniversalPreset(appearance: EditorAppearance | und
|
|
|
3643
3643
|
};
|
|
3644
3644
|
commands: {
|
|
3645
3645
|
showLinkToolbar: import("@atlaskit/editor-plugin-hyperlink").ShowLinkToolbar;
|
|
3646
|
+
updateLink: (href: string, text: string) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
3647
|
+
removeLink: () => import("@atlaskit/editor-common/types").EditorCommand;
|
|
3646
3648
|
};
|
|
3647
3649
|
sharedState: import("@atlaskit/editor-common/link").HyperlinkState | undefined;
|
|
3648
3650
|
}, import("@atlaskit/editor-common/types").HyperlinkPluginOptions | undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"selectionToolbar", {
|
|
@@ -3629,6 +3629,8 @@ export default function useUniversalPreset({ props }: PresetProps): import("@atl
|
|
|
3629
3629
|
};
|
|
3630
3630
|
commands: {
|
|
3631
3631
|
showLinkToolbar: import("@atlaskit/editor-plugin-hyperlink").ShowLinkToolbar;
|
|
3632
|
+
updateLink: (href: string, text: string) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
3633
|
+
removeLink: () => import("@atlaskit/editor-common/types").EditorCommand;
|
|
3632
3634
|
};
|
|
3633
3635
|
sharedState: import("@atlaskit/editor-common/link").HyperlinkState | undefined;
|
|
3634
3636
|
}, import("@atlaskit/editor-common/types").HyperlinkPluginOptions | undefined>, import("@atlaskit/editor-plugin-clear-marks-on-empty-doc").ClearMarksOnEmptyDocPlugin<"selectionToolbar", {
|
|
@@ -4519,6 +4519,8 @@ export declare function createPreset(props: EditorProps, prevProps?: EditorProps
|
|
|
4519
4519
|
};
|
|
4520
4520
|
commands: {
|
|
4521
4521
|
showLinkToolbar: import("@atlaskit/editor-plugin-hyperlink").ShowLinkToolbar;
|
|
4522
|
+
updateLink: (href: string, text: string) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
4523
|
+
removeLink: () => import("@atlaskit/editor-common/types").EditorCommand;
|
|
4522
4524
|
};
|
|
4523
4525
|
sharedState: import("@atlaskit/editor-common/link").HyperlinkState | undefined;
|
|
4524
4526
|
}, import("@atlaskit/editor-common/types").HyperlinkPluginOptions | undefined>,
|
|
@@ -1082,6 +1082,8 @@ export declare function createDefaultPreset(options: DefaultPresetPluginOptions)
|
|
|
1082
1082
|
};
|
|
1083
1083
|
commands: {
|
|
1084
1084
|
showLinkToolbar: import("@atlaskit/editor-plugins/hyperlink").ShowLinkToolbar;
|
|
1085
|
+
updateLink: (href: string, text: string) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
1086
|
+
removeLink: () => import("@atlaskit/editor-common/types").EditorCommand;
|
|
1085
1087
|
};
|
|
1086
1088
|
sharedState: import("@atlaskit/editor-common/link").HyperlinkState | undefined;
|
|
1087
1089
|
}, HyperlinkPluginOptions | undefined>,
|
|
@@ -3181,6 +3183,8 @@ export declare function useDefaultPreset(props: DefaultPresetPluginOptions): Edi
|
|
|
3181
3183
|
};
|
|
3182
3184
|
commands: {
|
|
3183
3185
|
showLinkToolbar: import("@atlaskit/editor-plugins/hyperlink").ShowLinkToolbar;
|
|
3186
|
+
updateLink: (href: string, text: string) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
3187
|
+
removeLink: () => import("@atlaskit/editor-common/types").EditorCommand;
|
|
3184
3188
|
};
|
|
3185
3189
|
sharedState: import("@atlaskit/editor-common/link").HyperlinkState | undefined;
|
|
3186
3190
|
}, HyperlinkPluginOptions | undefined>,
|
|
@@ -4536,6 +4536,8 @@ export default function createUniversalPreset(appearance: EditorAppearance | und
|
|
|
4536
4536
|
};
|
|
4537
4537
|
commands: {
|
|
4538
4538
|
showLinkToolbar: import("@atlaskit/editor-plugin-hyperlink").ShowLinkToolbar;
|
|
4539
|
+
updateLink: (href: string, text: string) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
4540
|
+
removeLink: () => import("@atlaskit/editor-common/types").EditorCommand;
|
|
4539
4541
|
};
|
|
4540
4542
|
sharedState: import("@atlaskit/editor-common/link").HyperlinkState | undefined;
|
|
4541
4543
|
}, import("@atlaskit/editor-common/types").HyperlinkPluginOptions | undefined>,
|
|
@@ -4522,6 +4522,8 @@ export default function useUniversalPreset({ props }: PresetProps): import("@atl
|
|
|
4522
4522
|
};
|
|
4523
4523
|
commands: {
|
|
4524
4524
|
showLinkToolbar: import("@atlaskit/editor-plugin-hyperlink").ShowLinkToolbar;
|
|
4525
|
+
updateLink: (href: string, text: string) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
4526
|
+
removeLink: () => import("@atlaskit/editor-common/types").EditorCommand;
|
|
4525
4527
|
};
|
|
4526
4528
|
sharedState: import("@atlaskit/editor-common/link").HyperlinkState | undefined;
|
|
4527
4529
|
}, import("@atlaskit/editor-common/types").HyperlinkPluginOptions | undefined>,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "194.3.
|
|
3
|
+
"version": "194.3.10",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"@atlaskit/analytics-next": "^9.3.0",
|
|
46
46
|
"@atlaskit/analytics-next-stable-react-context": "1.0.1",
|
|
47
47
|
"@atlaskit/button": "^19.0.0",
|
|
48
|
-
"@atlaskit/editor-common": "^86.
|
|
48
|
+
"@atlaskit/editor-common": "^86.3.0",
|
|
49
49
|
"@atlaskit/editor-plugins": "^3.4.0",
|
|
50
50
|
"@atlaskit/editor-prosemirror": "4.0.1",
|
|
51
51
|
"@atlaskit/editor-shared-styles": "^2.13.0",
|
|
@@ -329,6 +329,10 @@
|
|
|
329
329
|
"type": "boolean",
|
|
330
330
|
"referenceOnly": true
|
|
331
331
|
},
|
|
332
|
+
"react_18_color_picker_concurrent_mode": {
|
|
333
|
+
"type": "boolean",
|
|
334
|
+
"referenceOnly": true
|
|
335
|
+
},
|
|
332
336
|
"linking-platform-contenteditable-false-live-view": {
|
|
333
337
|
"type": "boolean",
|
|
334
338
|
"referenceOnly": true
|