@atlaskit/editor-core 184.0.0 → 185.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (201) hide show
  1. package/.eslintrc.js +7 -3
  2. package/CHANGELOG.md +44 -0
  3. package/dist/cjs/create-editor/feature-flags-from-props.js +1 -2
  4. package/dist/cjs/editor-next/index.js +41 -34
  5. package/dist/cjs/editor.js +30 -269
  6. package/dist/cjs/i18n/en_ZZ.js +32 -6
  7. package/dist/cjs/index.js +0 -7
  8. package/dist/cjs/labs/next/presets/default.js +2 -1
  9. package/dist/cjs/plugins/base/index.js +0 -12
  10. package/dist/cjs/plugins/card/nodeviews/blockCard.js +7 -0
  11. package/dist/cjs/plugins/card/nodeviews/embedCard.js +7 -0
  12. package/dist/cjs/plugins/card/nodeviews/inlineCard.js +5 -1
  13. package/dist/cjs/plugins/card/pm-plugins/doc.js +1 -2
  14. package/dist/cjs/plugins/card/toolbar.js +11 -9
  15. package/dist/cjs/plugins/card/ui/LinkToolbarAppearance.js +4 -4
  16. package/dist/cjs/plugins/code-block/index.js +7 -5
  17. package/dist/cjs/plugins/code-block/toolbar.js +5 -5
  18. package/dist/cjs/plugins/copy-button/commands.js +2 -3
  19. package/dist/cjs/plugins/copy-button/toolbar.js +7 -8
  20. package/dist/cjs/plugins/expand/index.js +1 -1
  21. package/dist/cjs/plugins/expand/toolbar.js +40 -39
  22. package/dist/cjs/plugins/extension/index.js +1 -1
  23. package/dist/cjs/plugins/extension/toolbar.js +5 -5
  24. package/dist/cjs/plugins/floating-toolbar/index.js +3 -2
  25. package/dist/cjs/plugins/floating-toolbar/ui/Toolbar.js +2 -4
  26. package/dist/cjs/plugins/layout/index.js +8 -4
  27. package/dist/cjs/plugins/layout/toolbar.js +5 -6
  28. package/dist/cjs/plugins/media/toolbar/index.js +31 -24
  29. package/dist/cjs/plugins/panel/index.js +2 -1
  30. package/dist/cjs/plugins/panel/toolbar.js +7 -7
  31. package/dist/cjs/plugins/placeholder-text/index.js +7 -5
  32. package/dist/cjs/plugins/type-ahead/ui/TypeAheadPopup.js +19 -0
  33. package/dist/cjs/ui/CollapsedEditor/index.js +1 -2
  34. package/dist/cjs/ui/ColorPickerButton/index.js +2 -2
  35. package/dist/cjs/ui/ConfigPanel/Fields/ColorPicker.js +6 -10
  36. package/dist/cjs/ui/ElementBrowser/components/StatelessElementBrowser.js +5 -3
  37. package/dist/cjs/ui/styles.js +6 -0
  38. package/dist/cjs/version-wrapper.js +1 -1
  39. package/dist/cjs/version.json +1 -1
  40. package/dist/es2019/create-editor/feature-flags-from-props.js +1 -2
  41. package/dist/es2019/editor-next/index.js +39 -30
  42. package/dist/es2019/editor.js +29 -232
  43. package/dist/es2019/i18n/en_ZZ.js +32 -6
  44. package/dist/es2019/index.js +1 -2
  45. package/dist/es2019/labs/next/presets/default.js +2 -1
  46. package/dist/es2019/plugins/base/index.js +0 -7
  47. package/dist/es2019/plugins/card/nodeviews/blockCard.js +8 -0
  48. package/dist/es2019/plugins/card/nodeviews/embedCard.js +8 -0
  49. package/dist/es2019/plugins/card/nodeviews/inlineCard.js +5 -1
  50. package/dist/es2019/plugins/card/pm-plugins/doc.js +1 -2
  51. package/dist/es2019/plugins/card/toolbar.js +8 -6
  52. package/dist/es2019/plugins/card/ui/LinkToolbarAppearance.js +2 -2
  53. package/dist/es2019/plugins/code-block/index.js +7 -5
  54. package/dist/es2019/plugins/code-block/toolbar.js +5 -6
  55. package/dist/es2019/plugins/copy-button/commands.js +2 -3
  56. package/dist/es2019/plugins/copy-button/toolbar.js +7 -8
  57. package/dist/es2019/plugins/expand/index.js +1 -1
  58. package/dist/es2019/plugins/expand/toolbar.js +5 -6
  59. package/dist/es2019/plugins/extension/index.js +1 -1
  60. package/dist/es2019/plugins/extension/toolbar.js +5 -6
  61. package/dist/es2019/plugins/floating-toolbar/index.js +3 -2
  62. package/dist/es2019/plugins/floating-toolbar/ui/Toolbar.js +2 -4
  63. package/dist/es2019/plugins/layout/index.js +8 -5
  64. package/dist/es2019/plugins/layout/toolbar.js +5 -6
  65. package/dist/es2019/plugins/media/toolbar/index.js +35 -24
  66. package/dist/es2019/plugins/panel/index.js +2 -2
  67. package/dist/es2019/plugins/panel/toolbar.js +7 -8
  68. package/dist/es2019/plugins/placeholder-text/index.js +7 -5
  69. package/dist/es2019/plugins/type-ahead/ui/TypeAheadPopup.js +21 -0
  70. package/dist/es2019/ui/CollapsedEditor/index.js +1 -2
  71. package/dist/es2019/ui/ColorPickerButton/index.js +2 -2
  72. package/dist/es2019/ui/ConfigPanel/Fields/ColorPicker.js +5 -10
  73. package/dist/es2019/ui/ElementBrowser/components/StatelessElementBrowser.js +5 -3
  74. package/dist/es2019/ui/styles.js +6 -0
  75. package/dist/es2019/version-wrapper.js +1 -1
  76. package/dist/es2019/version.json +1 -1
  77. package/dist/esm/create-editor/feature-flags-from-props.js +1 -2
  78. package/dist/esm/editor-next/index.js +42 -33
  79. package/dist/esm/editor.js +29 -270
  80. package/dist/esm/i18n/en_ZZ.js +32 -6
  81. package/dist/esm/index.js +1 -2
  82. package/dist/esm/labs/next/presets/default.js +2 -1
  83. package/dist/esm/plugins/base/index.js +0 -9
  84. package/dist/esm/plugins/card/nodeviews/blockCard.js +7 -0
  85. package/dist/esm/plugins/card/nodeviews/embedCard.js +7 -0
  86. package/dist/esm/plugins/card/nodeviews/inlineCard.js +5 -1
  87. package/dist/esm/plugins/card/pm-plugins/doc.js +1 -2
  88. package/dist/esm/plugins/card/toolbar.js +7 -6
  89. package/dist/esm/plugins/card/ui/LinkToolbarAppearance.js +2 -2
  90. package/dist/esm/plugins/code-block/index.js +7 -5
  91. package/dist/esm/plugins/code-block/toolbar.js +5 -5
  92. package/dist/esm/plugins/copy-button/commands.js +2 -3
  93. package/dist/esm/plugins/copy-button/toolbar.js +7 -8
  94. package/dist/esm/plugins/expand/index.js +1 -1
  95. package/dist/esm/plugins/expand/toolbar.js +40 -39
  96. package/dist/esm/plugins/extension/index.js +1 -1
  97. package/dist/esm/plugins/extension/toolbar.js +5 -5
  98. package/dist/esm/plugins/floating-toolbar/index.js +3 -2
  99. package/dist/esm/plugins/floating-toolbar/ui/Toolbar.js +2 -4
  100. package/dist/esm/plugins/layout/index.js +8 -4
  101. package/dist/esm/plugins/layout/toolbar.js +5 -6
  102. package/dist/esm/plugins/media/toolbar/index.js +31 -24
  103. package/dist/esm/plugins/panel/index.js +2 -1
  104. package/dist/esm/plugins/panel/toolbar.js +7 -7
  105. package/dist/esm/plugins/placeholder-text/index.js +7 -5
  106. package/dist/esm/plugins/type-ahead/ui/TypeAheadPopup.js +19 -0
  107. package/dist/esm/ui/CollapsedEditor/index.js +1 -2
  108. package/dist/esm/ui/ColorPickerButton/index.js +2 -2
  109. package/dist/esm/ui/ConfigPanel/Fields/ColorPicker.js +5 -10
  110. package/dist/esm/ui/ElementBrowser/components/StatelessElementBrowser.js +5 -3
  111. package/dist/esm/ui/styles.js +6 -0
  112. package/dist/esm/version-wrapper.js +1 -1
  113. package/dist/esm/version.json +1 -1
  114. package/dist/types/editor-next/index.d.ts +0 -6
  115. package/dist/types/editor.d.ts +1 -137
  116. package/dist/types/i18n/en_ZZ.d.ts +28 -2
  117. package/dist/types/index.d.ts +0 -1
  118. package/dist/types/labs/next/presets/cxhtml.d.ts +106 -0
  119. package/dist/types/labs/next/presets/default.d.ts +212 -0
  120. package/dist/types/labs/next/presets/mobile.d.ts +106 -0
  121. package/dist/types/plugins/base/index.d.ts +0 -4
  122. package/dist/types/plugins/card/index.d.ts +2 -2
  123. package/dist/types/plugins/card/nodeviews/blockCard.d.ts +3 -0
  124. package/dist/types/plugins/card/nodeviews/embedCard.d.ts +3 -0
  125. package/dist/types/plugins/card/nodeviews/inlineCard.d.ts +1 -0
  126. package/dist/types/plugins/card/pm-plugins/doc.d.ts +1 -1
  127. package/dist/types/plugins/card/pm-plugins/keymap.d.ts +1 -1
  128. package/dist/types/plugins/card/pm-plugins/main.d.ts +1 -2
  129. package/dist/types/plugins/card/toolbar.d.ts +1 -2
  130. package/dist/types/plugins/card/types.d.ts +1 -1
  131. package/dist/types/plugins/card/ui/EditLinkToolbar.d.ts +1 -2
  132. package/dist/types/plugins/card/ui/link-toolbar-button-group-options.d.ts +1 -1
  133. package/dist/types/plugins/card/ui/types.d.ts +1 -1
  134. package/dist/types/plugins/code-block/index.d.ts +7 -1
  135. package/dist/types/plugins/code-block/toolbar.d.ts +2 -1
  136. package/dist/types/plugins/copy-button/commands.d.ts +2 -1
  137. package/dist/types/plugins/copy-button/toolbar.d.ts +3 -2
  138. package/dist/types/plugins/expand/index.d.ts +2 -1
  139. package/dist/types/plugins/expand/toolbar.d.ts +2 -1
  140. package/dist/types/plugins/extension/index.d.ts +7 -2
  141. package/dist/types/plugins/extension/toolbar.d.ts +2 -1
  142. package/dist/types/plugins/floating-toolbar/index.d.ts +2 -1
  143. package/dist/types/plugins/floating-toolbar/ui/Toolbar.d.ts +3 -1
  144. package/dist/types/plugins/layout/index.d.ts +7 -1
  145. package/dist/types/plugins/layout/toolbar.d.ts +2 -1
  146. package/dist/types/plugins/media/index.d.ts +3 -1
  147. package/dist/types/plugins/panel/index.d.ts +2 -0
  148. package/dist/types/plugins/panel/toolbar.d.ts +3 -2
  149. package/dist/types/plugins/placeholder-text/index.d.ts +3 -1
  150. package/dist/types/ui/CollapsedEditor/index.d.ts +1 -2
  151. package/dist/types/ui/ColorPickerButton/index.d.ts +2 -2
  152. package/dist/types-ts4.5/editor-next/index.d.ts +0 -6
  153. package/dist/types-ts4.5/editor.d.ts +1 -137
  154. package/dist/types-ts4.5/i18n/en_ZZ.d.ts +28 -2
  155. package/dist/types-ts4.5/index.d.ts +0 -1
  156. package/dist/types-ts4.5/labs/next/presets/cxhtml.d.ts +122 -0
  157. package/dist/types-ts4.5/labs/next/presets/default.d.ts +244 -0
  158. package/dist/types-ts4.5/labs/next/presets/mobile.d.ts +122 -0
  159. package/dist/types-ts4.5/plugins/base/index.d.ts +0 -4
  160. package/dist/types-ts4.5/plugins/card/index.d.ts +2 -2
  161. package/dist/types-ts4.5/plugins/card/nodeviews/blockCard.d.ts +3 -0
  162. package/dist/types-ts4.5/plugins/card/nodeviews/embedCard.d.ts +3 -0
  163. package/dist/types-ts4.5/plugins/card/nodeviews/inlineCard.d.ts +1 -0
  164. package/dist/types-ts4.5/plugins/card/pm-plugins/doc.d.ts +1 -1
  165. package/dist/types-ts4.5/plugins/card/pm-plugins/keymap.d.ts +1 -1
  166. package/dist/types-ts4.5/plugins/card/pm-plugins/main.d.ts +1 -2
  167. package/dist/types-ts4.5/plugins/card/toolbar.d.ts +1 -2
  168. package/dist/types-ts4.5/plugins/card/types.d.ts +1 -1
  169. package/dist/types-ts4.5/plugins/card/ui/EditLinkToolbar.d.ts +1 -2
  170. package/dist/types-ts4.5/plugins/card/ui/link-toolbar-button-group-options.d.ts +1 -1
  171. package/dist/types-ts4.5/plugins/card/ui/types.d.ts +1 -1
  172. package/dist/types-ts4.5/plugins/code-block/index.d.ts +7 -1
  173. package/dist/types-ts4.5/plugins/code-block/toolbar.d.ts +2 -1
  174. package/dist/types-ts4.5/plugins/copy-button/commands.d.ts +2 -1
  175. package/dist/types-ts4.5/plugins/copy-button/toolbar.d.ts +3 -2
  176. package/dist/types-ts4.5/plugins/expand/index.d.ts +3 -1
  177. package/dist/types-ts4.5/plugins/expand/toolbar.d.ts +2 -1
  178. package/dist/types-ts4.5/plugins/extension/index.d.ts +4 -2
  179. package/dist/types-ts4.5/plugins/extension/toolbar.d.ts +2 -1
  180. package/dist/types-ts4.5/plugins/floating-toolbar/index.d.ts +3 -1
  181. package/dist/types-ts4.5/plugins/floating-toolbar/ui/Toolbar.d.ts +3 -1
  182. package/dist/types-ts4.5/plugins/layout/index.d.ts +7 -1
  183. package/dist/types-ts4.5/plugins/layout/toolbar.d.ts +2 -1
  184. package/dist/types-ts4.5/plugins/media/index.d.ts +3 -1
  185. package/dist/types-ts4.5/plugins/panel/index.d.ts +4 -0
  186. package/dist/types-ts4.5/plugins/panel/toolbar.d.ts +3 -2
  187. package/dist/types-ts4.5/plugins/placeholder-text/index.d.ts +5 -1
  188. package/dist/types-ts4.5/ui/CollapsedEditor/index.d.ts +1 -2
  189. package/dist/types-ts4.5/ui/ColorPickerButton/index.d.ts +2 -2
  190. package/package.json +23 -18
  191. package/report.api.md +5 -93
  192. package/dist/cjs/editor-next/editor-migration-component.js +0 -54
  193. package/dist/cjs/plugins/base/pm-plugins/decoration.js +0 -122
  194. package/dist/es2019/editor-next/editor-migration-component.js +0 -30
  195. package/dist/es2019/plugins/base/pm-plugins/decoration.js +0 -111
  196. package/dist/esm/editor-next/editor-migration-component.js +0 -47
  197. package/dist/esm/plugins/base/pm-plugins/decoration.js +0 -113
  198. package/dist/types/editor-next/editor-migration-component.d.ts +0 -6
  199. package/dist/types/plugins/base/pm-plugins/decoration.d.ts +0 -24
  200. package/dist/types-ts4.5/editor-next/editor-migration-component.d.ts +0 -6
  201. package/dist/types-ts4.5/plugins/base/pm-plugins/decoration.d.ts +0 -24
@@ -12,13 +12,14 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
12
12
  /** @jsx jsx */
13
13
 
14
14
  import { WithCreateAnalyticsEvent } from '@atlaskit/editor-common/ui';
15
- import { getAnalyticsAppearance } from '@atlaskit/editor-common/utils';
15
+ // import { getAnalyticsAppearance } from '@atlaskit/editor-common/utils';
16
16
  import { jsx } from '@emotion/react';
17
17
  import PropTypes from 'prop-types';
18
18
  import React from 'react';
19
- import { name, version } from '../version-wrapper';
20
- import { FabricEditorAnalyticsContext } from '@atlaskit/analytics-namespaced-context';
21
- import uuid from 'uuid/v4';
19
+ // import { name, version } from '../version-wrapper';
20
+
21
+ // import { FabricEditorAnalyticsContext } from '@atlaskit/analytics-namespaced-context';
22
+ // import uuid from 'uuid/v4';
22
23
  import EditorActions from '../actions';
23
24
  import { fireAnalyticsEvent } from '@atlaskit/editor-common/analytics';
24
25
  import EditorInternal from './editor-internal';
@@ -31,6 +32,8 @@ import { basePlugin } from '../plugins';
31
32
  var EditorNext = /*#__PURE__*/function (_React$Component) {
32
33
  _inherits(EditorNext, _React$Component);
33
34
  var _super = _createSuper(EditorNext);
35
+ // private editorSessionId: string;
36
+
34
37
  function EditorNext(props, context) {
35
38
  var _this;
36
39
  _classCallCheck(this, EditorNext);
@@ -50,7 +53,7 @@ var EditorNext = /*#__PURE__*/function (_React$Component) {
50
53
  });
51
54
  deprecationWarnings(props);
52
55
  _this.editorActions = (context || {}).editorActions || new EditorActions();
53
- _this.editorSessionId = uuid();
56
+ // this.editorSessionId = uuid();
54
57
  _this.startTime = performance.now();
55
58
  _this.onEditorCreated = _this.onEditorCreated.bind(_assertThisInitialized(_this));
56
59
  _this.onEditorDestroyed = _this.onEditorDestroyed.bind(_assertThisInitialized(_this));
@@ -93,38 +96,44 @@ var EditorNext = /*#__PURE__*/function (_React$Component) {
93
96
  key: "render",
94
97
  value: function render() {
95
98
  var _this3 = this;
96
- return jsx(FabricEditorAnalyticsContext, {
97
- data: {
98
- packageName: name,
99
- packageVersion: version,
100
- componentName: 'editorCore',
101
- appearance: getAnalyticsAppearance(this.props.appearance),
102
- editorSessionId: this.editorSessionId
103
- }
104
- }, jsx(WithCreateAnalyticsEvent, {
105
- render: function render(createAnalyticsEvent) {
106
- return (_this3.createAnalyticsEvent = createAnalyticsEvent) && jsx(EditorInternal, {
107
- props: _this3.props,
108
- handleAnalyticsEvent: _this3.handleAnalyticsEvent,
109
- createAnalyticsEvent: _this3.createAnalyticsEvent,
110
- preset: _this3.props.preset,
111
- handleSave: _this3.handleSave,
112
- editorActions: _this3.editorActions,
113
- getExperienceStore: _this3.getExperienceStore,
114
- onEditorCreated: _this3.onEditorCreated,
115
- onEditorDestroyed: _this3.onEditorDestroyed
116
- });
117
- }
118
- }));
99
+ // TODO: https://product-fabric.atlassian.net/browse/ED-16979
100
+ // Move `FabricEditorAnalyticsContext` back into `EditorNext`
101
+ // This was moved out here to workaround the issue that the analytics
102
+ // context does not wrap the Preset (and therefore does not pass this context
103
+ // information to analytics calls within plugins). After this cleanup task ^ we will
104
+ // not have to generate the `createAnalyticsEvent` outside the Preset
105
+ // and we can move this back into `EditorNext`.
106
+ return (
107
+ // <FabricEditorAnalyticsContext
108
+ // data={{
109
+ // packageName: name,
110
+ // packageVersion: version,
111
+ // componentName: 'editorCore',
112
+ // appearance: getAnalyticsAppearance(this.props.appearance),
113
+ // editorSessionId: this.editorSessionId,
114
+ // }}
115
+ // >
116
+ jsx(WithCreateAnalyticsEvent, {
117
+ render: function render(createAnalyticsEvent) {
118
+ return (_this3.createAnalyticsEvent = createAnalyticsEvent) && jsx(EditorInternal, {
119
+ props: _this3.props,
120
+ handleAnalyticsEvent: _this3.handleAnalyticsEvent,
121
+ createAnalyticsEvent: _this3.createAnalyticsEvent,
122
+ preset: _this3.props.preset,
123
+ handleSave: _this3.handleSave,
124
+ editorActions: _this3.editorActions,
125
+ getExperienceStore: _this3.getExperienceStore,
126
+ onEditorCreated: _this3.onEditorCreated,
127
+ onEditorDestroyed: _this3.onEditorDestroyed
128
+ });
129
+ }
130
+ })
131
+ // </FabricEditorAnalyticsContext>
132
+ );
119
133
  }
120
134
  }]);
121
135
  return EditorNext;
122
136
  }(React.Component);
123
- /**
124
- * WARNING: Code should be shared between Editor + EditorNext
125
- * If you are making changes that affect both, consider making them
126
- * in editor-next/editor-internal.tsx or editor-next/editor-utils.ts
127
- */
128
137
  _defineProperty(EditorNext, "defaultProps", defaultProps);
129
138
  _defineProperty(EditorNext, "contextTypes", {
130
139
  editorActions: PropTypes.object
@@ -5,271 +5,51 @@ import _inherits from "@babel/runtime/helpers/inherits";
5
5
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
6
6
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
7
7
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
8
+ import _extends from "@babel/runtime/helpers/extends";
8
9
  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); }; }
9
10
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
10
11
  /** @jsx jsx */
11
12
  import { jsx } from '@emotion/react';
12
- import PropTypes from 'prop-types';
13
13
  import React from 'react';
14
- import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
15
- import { WithCreateAnalyticsEvent } from '@atlaskit/editor-common/ui';
16
- import { getAnalyticsAppearance } from '@atlaskit/editor-common/utils';
17
- import { name, version } from './version-wrapper';
14
+ import { defaultProps } from './editor-next/utils/editorPropTypes';
15
+ import EditorNext from './editor-next';
16
+ import useUniversalPreset from './labs/next/presets/useUniversalPreset';
18
17
  import { FabricEditorAnalyticsContext } from '@atlaskit/analytics-namespaced-context';
18
+ import { name, version } from './version-wrapper';
19
+ import { getAnalyticsAppearance } from '@atlaskit/editor-common/utils';
19
20
  import uuid from 'uuid/v4';
20
- import EditorActions from './actions';
21
- import { EditorInternalWithoutHooks as EditorInternal } from './editor-next/editor-internal';
22
- import { defaultProps, propTypes } from './editor-next/utils/editorPropTypes';
23
- import _trackEditorActions from './editor-next/utils/trackEditorActions';
24
- import _onEditorCreated from './editor-next/utils/onEditorCreated';
25
- import deprecationWarnings from './editor-next/utils/deprecationWarnings';
26
- import { createFeatureFlagsFromProps } from './create-editor/feature-flags-from-props';
27
- import { fireAnalyticsEvent } from '@atlaskit/editor-common/analytics';
28
- import prepareQuickInsertProvider from './utils/prepare-quick-insert-provider';
29
- import prepareExtensionProvider from './utils/prepare-extension-provider';
30
- import handleProviders from './editor-next/utils/handleProviders';
31
- import getProvidersFromEditorProps from './editor-next/utils/getProvidersFromEditorProps';
32
- import { startMeasure, clearMeasure, stopMeasure, measureTTI } from '@atlaskit/editor-common/utils';
33
- import measurements from './utils/performance/measure-enum';
34
- import editorMeasureTTICallback from './editor-next/utils/editorMeasureTTICallback';
35
- import { ACTION } from '@atlaskit/editor-common/analytics';
36
- import sendDurationAnalytics from './editor-next/utils/sendDurationAnalytics';
37
- import { createPreset } from './create-editor/create-plugins-list';
38
- import { shouldRecreatePreset } from './create-editor/preset-utils';
21
+ var EditorNextWrapper = function EditorNextWrapper(_ref) {
22
+ var props = _ref.props;
23
+ var preset = useUniversalPreset({
24
+ props: props
25
+ });
26
+ return jsx(EditorNext, _extends({
27
+ preset: preset
28
+ }, props));
29
+ };
39
30
  var Editor = /*#__PURE__*/function (_React$Component) {
40
31
  _inherits(Editor, _React$Component);
41
32
  var _super = _createSuper(Editor);
42
- function Editor(props, context) {
43
- var _props$performanceTra, _props$performanceTra2, _props$featureFlags;
33
+ function Editor() {
44
34
  var _this;
45
35
  _classCallCheck(this, Editor);
46
- _this = _super.call(this, props);
47
- /**
48
- * @private
49
- * @deprecated - Do not override this at all, this is an antipattern.
50
- * Please reach out to the Editor team if you were previously using this
51
- * and need to find a workaround.
52
- */
53
- _defineProperty(_assertThisInitialized(_this), "prepareExtensionProvider", prepareExtensionProvider(function () {
54
- return _this.editorActions;
55
- }));
56
- /**
57
- * @private
58
- * @deprecated - Do not override this at all, this is an antipattern.
59
- * Please reach out to the Editor team if you were previously using this
60
- * and need to find a workaround.
61
- */
62
- _defineProperty(_assertThisInitialized(_this), "prepareQuickInsertProvider", function (extensionProvider, quickInsert) {
63
- return prepareQuickInsertProvider(_this.editorActions, extensionProvider, quickInsert, _this.createAnalyticsEvent);
64
- });
65
- /**
66
- * @private
67
- * @deprecated - Do not override this at all, this is an antipattern.
68
- * Please reach out to the Editor team if you were previously using this
69
- * and need to find a workaround.
70
- */
71
- _defineProperty(_assertThisInitialized(_this), "handleSave", function (view) {
72
- var _this$props$onSave, _this$props;
73
- return (_this$props$onSave = (_this$props = _this.props).onSave) === null || _this$props$onSave === void 0 ? void 0 : _this$props$onSave.call(_this$props, view);
74
- });
75
- /**
76
- * @private
77
- * @deprecated - Do not override this at all, this is an antipattern.
78
- * Please reach out to the Editor team if you were previously using this
79
- * and need to find a workaround.
80
- */
81
- _defineProperty(_assertThisInitialized(_this), "handleAnalyticsEvent", function (data) {
82
- return fireAnalyticsEvent(_this.createAnalyticsEvent)(data);
83
- });
84
- _defineProperty(_assertThisInitialized(_this), "getFeatureFlags", function () {
85
- return createFeatureFlagsFromProps(_this.props);
86
- });
87
- _defineProperty(_assertThisInitialized(_this), "getExperienceStore", function () {
88
- return _this.experienceStore;
89
- });
90
- _this.providerFactory = new ProviderFactory();
91
- deprecationWarnings(props);
92
- _this.editorActions = (context || {}).editorActions || new EditorActions();
93
- _this.editorSessionId = uuid();
94
- _this.startTime = performance.now();
95
- _this.onEditorCreated = _this.onEditorCreated.bind(_assertThisInitialized(_this));
96
- _this.onEditorDestroyed = _this.onEditorDestroyed.bind(_assertThisInitialized(_this));
97
- _this.getExperienceStore = _this.getExperienceStore.bind(_assertThisInitialized(_this));
98
- _this.trackEditorActions(_this.editorActions, props);
99
-
100
- /**
101
- * Consider any changes here to corresponding file for `EditorNext` in
102
- * `useEditorConstructor` (editor-next/hooks/useEditorMeasuresConstructor.ts)
103
- */
104
- startMeasure(measurements.EDITOR_MOUNTED);
105
- if ((_props$performanceTra = props.performanceTracking) !== null && _props$performanceTra !== void 0 && (_props$performanceTra2 = _props$performanceTra.ttiTracking) !== null && _props$performanceTra2 !== void 0 && _props$performanceTra2.enabled || (_props$featureFlags = props.featureFlags) !== null && _props$featureFlags !== void 0 && _props$featureFlags.ufo) {
106
- var _props$performanceTra3, _props$performanceTra4, _props$performanceTra5, _props$performanceTra6;
107
- measureTTI(function (tti, ttiFromInvocation, canceled) {
108
- editorMeasureTTICallback(tti, ttiFromInvocation, canceled, _this.props.performanceTracking, _this.props.featureFlags, _this.createAnalyticsEvent, _this.experienceStore);
109
- }, (_props$performanceTra3 = props.performanceTracking) === null || _props$performanceTra3 === void 0 ? void 0 : (_props$performanceTra4 = _props$performanceTra3.ttiTracking) === null || _props$performanceTra4 === void 0 ? void 0 : _props$performanceTra4.ttiIdleThreshold, (_props$performanceTra5 = props.performanceTracking) === null || _props$performanceTra5 === void 0 ? void 0 : (_props$performanceTra6 = _props$performanceTra5.ttiTracking) === null || _props$performanceTra6 === void 0 ? void 0 : _props$performanceTra6.ttiCancelTimeout);
36
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
37
+ args[_key] = arguments[_key];
110
38
  }
111
-
112
- /**
113
- * Consider any changes here to corresponding file for `EditorNext` in
114
- * `useProviderFactory` (editor-next/hooks/useProviderFactory.ts)
115
- */
116
- var _extensionProvider = _this.prepareExtensionProvider(props.extensionProviders);
117
- var quickInsertProvider = _this.prepareQuickInsertProvider(_extensionProvider, props.quickInsert);
118
- var preset = createPreset(props, undefined, _this.createAnalyticsEvent);
119
- _this.state = {
120
- extensionProvider: _extensionProvider,
121
- quickInsertProvider: quickInsertProvider,
122
- preset: preset
123
- };
39
+ _this = _super.call.apply(_super, [this].concat(args));
40
+ _defineProperty(_assertThisInitialized(_this), "editorSessionId", uuid());
124
41
  return _this;
125
42
  }
126
-
127
- /**
128
- * Consider any changes here to corresponding file for `EditorNext` in
129
- * `useProviderFactory` (editor-next/hooks/useProviderFactory.ts) and
130
- * `useMeasureEditorMountTime` (editor-next/hooks/useMeasureEditorMountTime.ts)
131
- */
132
43
  _createClass(Editor, [{
133
- key: "componentDidMount",
134
- value: function componentDidMount() {
135
- stopMeasure(measurements.EDITOR_MOUNTED, sendDurationAnalytics(ACTION.EDITOR_MOUNTED, this.props, this.getExperienceStore, this.createAnalyticsEvent));
136
- handleProviders(this.providerFactory, getProvidersFromEditorProps(this.props), this.state.extensionProvider, this.state.quickInsertProvider);
137
- }
138
-
139
- /**
140
- * Consider any changes here to corresponding file for `EditorNext` in
141
- * `useProviderFactory` (editor-next/hooks/useProviderFactory.ts)
142
- */
143
- }, {
144
- key: "componentDidUpdate",
145
- value: function componentDidUpdate(prevProps) {
146
- var _this2 = this;
147
- var needsANewPreset = shouldRecreatePreset(prevProps, this.props);
148
- var preset = needsANewPreset ? createPreset(this.props, prevProps, this.createAnalyticsEvent) : this.state.preset;
149
- var _this$props2 = this.props,
150
- extensionProviders = _this$props2.extensionProviders,
151
- quickInsert = _this$props2.quickInsert;
152
- if (extensionProviders && extensionProviders !== prevProps.extensionProviders ||
153
- // Though this will introduce some performance regression related to quick insert
154
- // loading but we can remove it soon when Forge will move to new API.
155
- // quickInsert={Promise.resolve(consumerQuickInsert)} is one of the main reason behind this performance issue.
156
- quickInsert && quickInsert !== prevProps.quickInsert) {
157
- var extensionProvider = this.prepareExtensionProvider(extensionProviders);
158
- var quickInsertProvider = this.prepareQuickInsertProvider(extensionProvider, quickInsert);
159
- this.setState({
160
- extensionProvider: extensionProvider,
161
- quickInsertProvider: quickInsertProvider,
162
- preset: preset
163
- }, function () {
164
- return handleProviders(_this2.providerFactory, getProvidersFromEditorProps(_this2.props), _this2.state.extensionProvider, _this2.state.quickInsertProvider);
165
- });
166
- return;
167
- }
168
- if (needsANewPreset) {
169
- this.setState({
170
- preset: preset
171
- });
172
- return;
173
- }
174
- handleProviders(this.providerFactory, getProvidersFromEditorProps(this.props), this.state.extensionProvider, this.state.quickInsertProvider);
175
- }
176
-
177
- /**
178
- * Consider any changes here to corresponding file for `EditorNext` in
179
- * `useProviderFactory` (editor-next/hooks/useProviderFactory.ts) and
180
- * `useMeasureEditorMountTime` (editor-next/hooks/useMeasureEditorMountTime.ts)
181
- */
182
- }, {
183
- key: "componentWillUnmount",
184
- value: function componentWillUnmount() {
185
- var _this$props3, _this$props3$performa, _this$props3$performa2, _this$props$featureFl;
186
- this.unregisterEditorFromActions();
187
- this.providerFactory.destroy();
188
- clearMeasure(measurements.EDITOR_MOUNTED);
189
- ((_this$props3 = this.props) === null || _this$props3 === void 0 ? void 0 : (_this$props3$performa = _this$props3.performanceTracking) === null || _this$props3$performa === void 0 ? void 0 : (_this$props3$performa2 = _this$props3$performa.onEditorReadyCallbackTracking) === null || _this$props3$performa2 === void 0 ? void 0 : _this$props3$performa2.enabled) && clearMeasure(measurements.ON_EDITOR_READY_CALLBACK);
190
- if ((_this$props$featureFl = this.props.featureFlags) !== null && _this$props$featureFl !== void 0 && _this$props$featureFl.ufo) {
191
- var _this$experienceStore;
192
- (_this$experienceStore = this.experienceStore) === null || _this$experienceStore === void 0 ? void 0 : _this$experienceStore.abortAll({
193
- reason: 'editor component unmounted'
194
- });
195
- }
196
- }
197
-
198
- /**
199
- * @private
200
- * @deprecated - Do not override this at all, this is an anti-pattern.
201
- * Please reach out to the Editor team if you were previously using this
202
- * and need to find a workaround.
203
- */
204
- }, {
205
- key: "trackEditorActions",
206
- value: function trackEditorActions(editorActions, props) {
207
- var _this3 = this;
208
- return _trackEditorActions(editorActions, props.performanceTracking, function (value) {
209
- return _this3.handleAnalyticsEvent(value);
210
- });
211
- }
212
- }, {
213
- key: "onEditorCreated",
214
- value:
215
- /**
216
- * @private
217
- * @deprecated - Do not override this at all, this is an antipattern.
218
- * Please reach out to the Editor team if you were previously using this
219
- * and need to find a workaround.
220
- */
221
- function onEditorCreated(instance) {
222
- var _this4 = this;
223
- _onEditorCreated(instance, this.props, function (experienceStore) {
224
- return _this4.experienceStore = experienceStore;
225
- }, this.getExperienceStore, function () {
226
- return _this4.createAnalyticsEvent;
227
- }, this.editorActions, this.startTime, function (view, dispatcher, transformerForActions) {
228
- return _this4.registerEditorForActions(view, dispatcher, transformerForActions);
229
- });
230
- }
231
-
232
- /**
233
- * @private
234
- * @deprecated - Do not override this at all, this is an antipattern.
235
- * Please reach out to the Editor team if you were previously using this
236
- * and need to find a workaround.
237
- */
238
- }, {
239
- key: "onEditorDestroyed",
240
- value: function onEditorDestroyed(_instance) {
241
- var _this$props$onDestroy, _this$props4;
242
- this.unregisterEditorFromActions();
243
- (_this$props$onDestroy = (_this$props4 = this.props).onDestroy) === null || _this$props$onDestroy === void 0 ? void 0 : _this$props$onDestroy.call(_this$props4);
244
- }
245
- }, {
246
- key: "registerEditorForActions",
247
- value:
248
- /**
249
- * @private
250
- * @deprecated - Do not override this at all, this is an antipattern.
251
- * Please reach out to the Editor team if you were previously using this
252
- * and need to find a workaround.
253
- */
254
- function registerEditorForActions(editorView, eventDispatcher, contentTransformer) {
255
- this.editorActions._privateRegisterEditor(editorView, eventDispatcher, contentTransformer, this.getFeatureFlags);
256
- }
257
- }, {
258
- key: "unregisterEditorFromActions",
259
- value:
260
- /**
261
- * @private
262
- * @deprecated - Do not override this at all, this is an antipattern.
263
- * Please reach out to the Editor team if you were previously using this
264
- * and need to find a workaround.
265
- */
266
- function unregisterEditorFromActions() {
267
- this.editorActions._privateUnregisterEditor();
268
- }
269
- }, {
270
44
  key: "render",
271
45
  value: function render() {
272
- var _this5 = this;
46
+ // TODO: https://product-fabric.atlassian.net/browse/ED-16979
47
+ // Move `FabricEditorAnalyticsContext` back into `EditorNext`
48
+ // This was moved out here to workaround the issue that the analytics
49
+ // context does not wrap the Preset (and therefore does not pass this context
50
+ // information to analytics calls within plugins). After this cleanup task ^ we will
51
+ // not have to generate the `createAnalyticsEvent` outside the Preset
52
+ // and we can move this back into `EditorNext`.
273
53
  return jsx(FabricEditorAnalyticsContext, {
274
54
  data: {
275
55
  packageName: name,
@@ -278,33 +58,12 @@ var Editor = /*#__PURE__*/function (_React$Component) {
278
58
  appearance: getAnalyticsAppearance(this.props.appearance),
279
59
  editorSessionId: this.editorSessionId
280
60
  }
281
- }, jsx(WithCreateAnalyticsEvent, {
282
- render: function render(createAnalyticsEvent) {
283
- return (_this5.createAnalyticsEvent = createAnalyticsEvent) && jsx(EditorInternal, {
284
- props: _this5.props,
285
- handleAnalyticsEvent: _this5.handleAnalyticsEvent,
286
- createAnalyticsEvent: _this5.createAnalyticsEvent,
287
- preset: _this5.state.preset,
288
- handleSave: _this5.handleSave,
289
- editorActions: _this5.editorActions,
290
- providerFactory: _this5.providerFactory,
291
- onEditorCreated: _this5.onEditorCreated,
292
- onEditorDestroyed: _this5.onEditorDestroyed
293
- });
294
- }
61
+ }, jsx(EditorNextWrapper, {
62
+ props: this.props
295
63
  }));
296
64
  }
297
65
  }]);
298
66
  return Editor;
299
67
  }(React.Component);
300
- /**
301
- * WARNING: Code should be shared between Editor + EditorNext
302
- * If you are making changes that affect both, consider making them
303
- * in editor-next/editor-internal.tsx or editor-next/editor-utils.ts
304
- */
305
68
  _defineProperty(Editor, "defaultProps", defaultProps);
306
- _defineProperty(Editor, "contextTypes", {
307
- editorActions: PropTypes.object
308
- });
309
- _defineProperty(Editor, "propTypes", propTypes('minHeight only supports editor appearance chromeless and comment for Editor'));
310
69
  export { Editor as default };
@@ -8,13 +8,13 @@
8
8
  //
9
9
  export default {
10
10
  'fabric.editor.addAltText': '⁣⁢Alt text‌‍‌؜⁡؜⁡⁣⁤',
11
+ 'fabric.editor.addImageBorder': '⁣⁢Add border⁠⁠‌⁡‍⁡؜‍؜؜⁠⁣⁤',
11
12
  'fabric.editor.alignCenter': '⁣⁢Align Center؜؜؜؜⁠⁠⁠‍⁠‍⁣⁤',
12
13
  'fabric.editor.alignLeft': '⁣⁢Align left⁠؜‌‌؜⁡‍‍⁠؜⁠؜⁡⁡⁣⁤',
13
14
  'fabric.editor.alignRight': '⁣⁢Align Right⁡؜⁡⁡⁠‍‍⁠؜⁣⁤',
14
15
  'fabric.editor.alignment': '⁣⁢Text alignment؜⁠⁡‌⁠؜⁡؜⁠⁣⁤',
15
16
  'fabric.editor.altText': '⁣⁢Alt text؜⁠؜‌⁡‌⁠‍‍‍‌‌‌‌⁣⁤',
16
17
  'fabric.editor.alttext.validation': '⁣⁢Please remove any special characters in alt text.؜⁠‌‍⁡؜⁣⁤',
17
- 'fabric.editor.annotate': '⁣⁢Annotate‌⁡؜؜⁠‍⁡⁣⁤',
18
18
  'fabric.editor.annotationToolbar': '⁣⁢Annotation toolbar‍‍‍‌⁡‍⁠؜⁡‍⁠⁣⁤',
19
19
  'fabric.editor.backLink': '⁣⁢Go back‍⁡‌؜‌⁠⁣⁤',
20
20
  'fabric.editor.blockCardUnavailable': '⁣⁢The inline link is inside {node} and cannot have its view changed⁠؜⁡⁡⁠؜⁡⁠‍⁠⁠⁡‍⁣⁤',
@@ -62,6 +62,7 @@ export default {
62
62
  'fabric.editor.customPanel.description': '⁣⁢Add a note with an emoji and colored background؜؜‍‍⁠‍⁠؜⁡‌؜⁡⁣⁤',
63
63
  'fabric.editor.decisionPlaceholder': '⁣⁢Add a decision…⁡‌⁡‍؜⁡⁡⁠‍‌⁣⁤',
64
64
  'fabric.editor.defaultAltText': '⁣⁢List item⁡‍؜‌‍⁠‍⁠⁡‌⁣⁤',
65
+ 'fabric.editor.description': '⁣⁢Description⁡‍‍‍‍⁣⁤',
65
66
  'fabric.editor.displayBlock': '⁣⁢Display card‍‌؜؜⁡⁠‍؜‍‍‌⁠⁠⁣⁤',
66
67
  'fabric.editor.displayEmbed': '⁣⁢Display embed⁡⁡‍⁠⁠‌⁣⁤',
67
68
  'fabric.editor.displayInline': '⁣⁢Display inline‍⁡‌‌؜‌⁠⁣⁤',
@@ -77,6 +78,7 @@ export default {
77
78
  'fabric.editor.editStatusColor': '⁣⁢Edit Status Color‌‌⁡‌‍؜⁡‍؜⁡⁣⁤',
78
79
  'fabric.editor.editStatusText': '⁣⁢Edit Status⁡‍‌‌‍؜⁡؜‍‍؜؜⁣⁤',
79
80
  'fabric.editor.editableContentLabel': '⁣⁢Editable content⁠؜‌‍⁠⁡⁠؜⁣⁤',
81
+ 'fabric.editor.editorAssistiveLabel': '⁣⁢Main content area, start typing to enter text.‍‌⁡‌‌⁡؜؜⁣⁤',
80
82
  'fabric.editor.editorHelp': '⁣⁢Editor help‌؜‍؜؜‍‌⁠؜⁣⁤',
81
83
  'fabric.editor.editors': '⁣⁢Editors‍؜‌‍⁡‍⁠⁡؜‌‌⁡⁣⁤',
82
84
  'fabric.editor.elementBrowser.help': '⁣⁢Help⁡؜‌‍‍⁠⁠⁠⁡⁠⁣⁤',
@@ -101,14 +103,18 @@ export default {
101
103
  'fabric.editor.error': '⁣⁢Error؜‌⁡‌؜⁡‌⁣⁤',
102
104
  'fabric.editor.errorPanel': '⁣⁢Error panel⁠‍؜⁠⁠؜‍⁠⁠⁡⁣⁤',
103
105
  'fabric.editor.errorPanel.description': '⁣⁢Call out errors in a colored panel⁡⁠؜⁡‍‌‍؜‍⁣⁤',
104
- 'fabric.editor.extension.confirmDeleteLinkedModalMessage': '⁣⁢Removing this extension will break anything connected to it.⁠؜⁡‌‌‍‌⁡⁠⁡⁡⁡⁡⁣⁤',
105
- 'fabric.editor.extension.confirmDeleteLinkedModalOKButton': '⁣⁢Remove extension⁡‍‌‍⁠‌‍‍⁠⁠⁣⁤',
106
+ 'fabric.editor.extension.confirmDeleteLinkedModalMessage': '⁣⁢Deleting {nodeName} will break anything connected to it.‍‍‌؜⁠⁡⁠⁣⁤',
107
+ 'fabric.editor.extension.confirmDeleteLinkedModalOKButton': '⁣⁢Delete⁠؜‌‍⁠⁠⁣⁤',
108
+ 'fabric.editor.extension.deleteElementTitle': '⁣⁢Delete element⁠؜⁠⁡‍؜⁣⁤',
109
+ 'fabric.editor.extension.sourceNoTitledName': '⁣⁢this element‍⁠⁡؜⁡⁠؜‌⁡⁠⁣⁤',
106
110
  'fabric.editor.extensions.config-panel.save-indicator': '⁣⁢All changes are always autosaved⁠‍؜‌‌‍‍⁡‌‌‍‌‌⁣⁤',
107
111
  'fabric.editor.find': '⁣⁢Find⁠‌⁠‌⁠‍؜⁣⁤',
108
112
  'fabric.editor.findNext': '⁣⁢Find next؜‌؜‌؜⁠⁣⁤',
109
113
  'fabric.editor.findPrevious': '⁣⁢Find previous⁠⁠⁡⁡‍‍⁡⁡⁣⁤',
110
114
  'fabric.editor.findReplaceToolbarButton': '⁣⁢Find and replace؜⁠‍‌⁡⁡؜‌⁡⁠‍‌⁣⁤',
111
115
  'fabric.editor.floatingToolbar.confirmModalCancel': '⁣⁢Cancel؜⁡‌‌⁡⁡‍؜⁡؜⁣⁤',
116
+ 'fabric.editor.floatingToolbar.confirmModalCheckboxLabel': '⁣⁢Also delete connected elements؜؜؜؜؜‍⁡‍‌؜‌‌؜‍⁣⁤',
117
+ 'fabric.editor.floatingToolbar.confirmModalConnectedUnit': '{amount, plural, =0 {⁣⁢{name}⁡⁡‌⁡؜‍⁡‍‌⁣⁤} one {⁣⁢{name} (+1 connected element)⁡⁡‌‍⁡‌⁡؜⁣⁤} other {⁣⁢{name} (+{amount,number} connected elements)⁡⁡‌‍⁡‌⁡؜⁣⁤}}',
112
118
  'fabric.editor.floatingToolbar.confirmModalHeading': '⁣⁢Are you sure?⁡⁡‌‍⁡‍⁡⁠؜‌‌⁣⁤',
113
119
  'fabric.editor.floatingToolbar.confirmModalOK': '⁣⁢OK‍‌؜⁡؜⁡‍⁡⁣⁤',
114
120
  'fabric.editor.floatingToolbar.floatingToolbarAnnouncer': '⁣⁢Floating toolbar controls have been opened⁠⁠‌‌؜‍⁣⁤',
@@ -139,6 +145,12 @@ export default {
139
145
  'fabric.editor.hyperlink.searchLinkAriaDescription': '⁣⁢Suggestions will appear below as you type into the field⁠‍‍⁠‍‌؜⁡‍‍‍؜‍‌⁣⁤',
140
146
  'fabric.editor.hyperlink.searchLinkResults': '{count, plural, =0 {⁣⁢no results found⁡⁠؜؜؜؜⁣⁤} one {⁣⁢{count,number} result found؜⁠؜‌‍⁡‍⁡؜‌⁡‌⁣⁤} other {⁣⁢{count,number} results found؜⁠؜‌‍⁡‍⁡؜‌⁡‌⁣⁤}}',
141
147
  'fabric.editor.hyperlinkToolbarPlaceholder': '⁣⁢Paste or search for link‌‌‍؜‌؜‍⁡⁠⁣⁤',
148
+ 'fabric.editor.imageBorderBold': '⁣⁢Bold‍‍‍‌⁠‍⁡‌؜‍⁡‍⁣⁤',
149
+ 'fabric.editor.imageBorderColor': '⁣⁢Color⁠⁠⁠؜؜⁠⁠‍⁡؜؜⁣⁤',
150
+ 'fabric.editor.imageBorderMedium': '⁣⁢Medium⁠‌⁠؜‍⁠؜⁠؜⁣⁤',
151
+ 'fabric.editor.imageBorderOptions': '⁣⁢Border options؜‍‍؜⁠‍⁠؜‌‍‍⁣⁤',
152
+ 'fabric.editor.imageBorderSize': '⁣⁢Size⁠⁡؜⁠⁡؜‌‍⁡⁠‍؜⁠‍⁡⁣⁤',
153
+ 'fabric.editor.imageBorderSubtle': '⁣⁢Subtle⁡⁡‌⁠؜‍‌؜⁣⁤',
142
154
  'fabric.editor.improvement': '⁣⁢Improvement⁡⁡‍‍‌⁠‍⁡⁣⁤',
143
155
  'fabric.editor.indent': '⁣⁢Indent‌⁠‌⁠‍⁡⁣⁤',
144
156
  'fabric.editor.info': '⁣⁢Info⁡⁡‌⁡⁠؜؜‌‍⁠⁣⁤',
@@ -160,9 +172,12 @@ export default {
160
172
  'fabric.editor.matchCase': '⁣⁢Match case‌‌⁠⁡‍؜‍‍‌؜⁡⁡⁠‍⁣⁤',
161
173
  'fabric.editor.mediaAddLink': '⁣⁢Add link‍⁠⁠‌‍‌⁡‌؜‍⁣⁤',
162
174
  'fabric.editor.mediaGroupDeleteLabel': '⁣⁢delete‌‌⁠⁡⁠‍⁠⁣⁤',
175
+ 'fabric.editor.mentionNode.label': '⁣⁢Tagged user⁠‍⁠‌⁡⁡‍‍‌‌⁡؜⁣⁤',
163
176
  'fabric.editor.mentionsAddLabel': '⁣⁢add-icon‌‌‌؜⁡‍‍⁡⁡‍‍⁠⁣⁤',
164
177
  'fabric.editor.mentionsIconLabel': '⁣⁢Mention⁠⁠⁠⁡‌⁠؜‍؜؜⁡⁠⁠⁣⁤',
165
178
  'fabric.editor.moreFormatting': '⁣⁢More formatting‍؜‌‌⁠‍‍؜‍⁡⁣⁤',
179
+ 'fabric.editor.navigate.toolbar.editor': '⁣⁢Navigate to editor toolbar⁠؜⁡⁡⁡‍‌‌‍⁡⁣⁤',
180
+ 'fabric.editor.navigate.toolbar.floating': '⁣⁢Navigate to floating toolbar⁠‍⁠‍⁠‍‍⁣⁤',
166
181
  'fabric.editor.noResultsFound': '⁣⁢No results‍؜‌‌‌؜⁡⁣⁤',
167
182
  'fabric.editor.noSearchResults': '⁣⁢No search results؜؜‍‍‍؜‍⁡⁣⁤',
168
183
  'fabric.editor.normal': '⁣⁢Normal text⁠⁠‍⁠⁠‌⁠‍؜⁡⁠‌⁡⁠⁣⁤',
@@ -183,6 +198,7 @@ export default {
183
198
  'fabric.editor.placeholderTextPlaceholder': '⁣⁢Add placeholder text‍‌⁠⁡‍⁡؜⁠‍⁠؜‍⁣⁤',
184
199
  'fabric.editor.quickInsert': '⁣⁢Quick insert⁠⁠⁠‌؜⁠⁣⁤',
185
200
  'fabric.editor.redo': '⁣⁢Redo⁠؜⁡؜؜⁡‌‍‍⁡⁣⁤',
201
+ 'fabric.editor.removeImageBorder': '⁣⁢Remove border؜⁡‍؜⁡⁡‌⁣⁤',
186
202
  'fabric.editor.replace': '⁣⁢Replace‌⁠؜⁠⁠⁠‌⁠⁡⁠⁣⁤',
187
203
  'fabric.editor.replaceAll': '⁣⁢Replace all‌⁡؜‍⁠⁣⁤',
188
204
  'fabric.editor.replaceWith': '⁣⁢Replace with‍‍⁡؜⁡⁠⁡؜؜⁠⁠⁣⁤',
@@ -191,6 +207,7 @@ export default {
191
207
  'fabric.editor.searchResults': '{itemsLength, plural, one {⁣⁢{itemsLength,number} search result available⁡‍‍⁠‍؜⁠؜‌⁡⁣⁤} other {⁣⁢{itemsLength,number} search results available⁡‍‍⁠‍؜⁠؜‌⁡⁣⁤}}',
192
208
  'fabric.editor.selectLanguage': '⁣⁢Select language‍⁠‌؜‌⁡‍‌⁣⁤',
193
209
  'fabric.editor.settingsLinks': '⁣⁢Go to Link Preferences؜؜‌⁡‍؜⁠⁡⁠⁠‌⁠⁣⁤',
210
+ 'fabric.editor.shortcut': '⁣⁢Text shortcut‌‌‌⁠‌‍⁠‍⁡‌‌⁣⁤',
194
211
  'fabric.editor.single': '⁣⁢Single column⁡‍⁠‌؜⁡‍‌‍⁣⁤',
195
212
  'fabric.editor.statusPlaceholder': '⁣⁢Set a status⁠؜⁠⁠⁡⁡‍⁣⁤',
196
213
  'fabric.editor.story': '⁣⁢Story‌⁡⁡؜؜⁡⁡⁠⁡⁠⁣⁤',
@@ -212,9 +229,17 @@ export default {
212
229
  'fabric.editor.threeColumns': '⁣⁢Three columns؜‍‌‍‌‌‌‌⁠؜⁣⁤',
213
230
  'fabric.editor.threeColumnsWithSidebars': '⁣⁢Three columns with sidebars؜‌⁠⁠‍⁡؜‍؜؜⁣⁤',
214
231
  'fabric.editor.toolbarLabel': '⁣⁢Editor toolbar‌‍؜‍؜⁠‌⁠‍‍⁣⁤',
215
- 'fabric.editor.toolbarMediaTitle': '⁣⁢Files & images؜⁡⁡‌⁡‌⁡⁡‍⁡⁠⁡⁣⁤',
232
+ 'fabric.editor.toolbarMediaTitle': '⁣⁢Add image, video, or file‌‍‍؜‍⁠⁣⁤',
216
233
  'fabric.editor.twoColumns': '⁣⁢Two columns⁡‌‍؜‌‍؜‍‍‍⁡⁣⁤',
217
- 'fabric.editor.typeAheadResultLabel': '⁣⁢TypeAhead results⁡‌‌⁠؜⁠‍⁠⁣⁤',
234
+ 'fabric.editor.typeAhead.popupLabel': '⁣⁢Typeahead results⁠؜⁡؜⁠‍‍⁠‌⁣⁤',
235
+ 'fabric.editor.typeAhead.quickInsertInputLabel': '⁣⁢Begin typing to search or filter shortcut options⁠⁠‍‌⁡‍⁠؜⁠⁡‍⁣⁤',
236
+ 'fabric.editor.typeAhead.quickInsertPopupLabel': '⁣⁢Shortcuts for inserts and formatting⁡؜؜‌⁡‌‌‌⁣⁤',
237
+ 'fabric.editor.typeahead.emojiInputLabel': '⁣⁢Begin typing to search or filter emoji options‌‍⁠‌⁡⁠⁡⁠‍‍⁡‍⁣⁤',
238
+ 'fabric.editor.typeahead.emojiListItemLabel': '⁣⁢Emoji {name} Text Shortcut {shortcut}⁠؜⁠⁡⁡⁡‍⁡⁡‌‌⁣⁤',
239
+ 'fabric.editor.typeahead.emojiPopupLabel': '⁣⁢Emoji shortcuts؜⁠‍⁡‍⁠⁡⁠⁡‌‍؜‍⁣⁤',
240
+ 'fabric.editor.typeahead.mentionInputLabel': '⁣⁢Begin typing to search for users to tag⁡⁡‌⁠‌؜⁡‍‍⁠‍⁠⁠‌⁣⁤',
241
+ 'fabric.editor.typeahead.mentionPopupLabel': '⁣⁢Users you can tag‌‍‌؜⁡⁡؜⁡⁣⁤',
242
+ 'fabric.editor.typeahead.metionListItemLabel': '⁣⁢User {name} @{shortName}‌‍؜⁠⁡‌‌⁡⁣⁤',
218
243
  'fabric.editor.unableToOpenLink': '⁣⁢Unable to open this link⁡؜‍‌‌⁠⁡⁡‌؜⁣⁤',
219
244
  'fabric.editor.underline': '⁣⁢Underline⁠⁠‍‍‌‌⁠‍⁣⁤',
220
245
  'fabric.editor.undo': '⁣⁢Undo⁡⁡⁡‌⁠⁡‌⁡‌⁠⁡⁣⁤',
@@ -228,5 +253,6 @@ export default {
228
253
  'fabric.editor.warningPanel': '⁣⁢Warning panel⁡‍‌؜⁠‌⁡؜⁠؜⁡⁡⁠؜⁣⁤',
229
254
  'fabric.editor.warningPanel.description': '⁣⁢Add a note of caution in a colored panel‌⁠⁡‍⁠؜‍⁡⁡⁡⁣⁤',
230
255
  'fabric.editor.wrapLeft': '⁣⁢Wrap left؜‍⁡‌⁡⁠‌‌‌⁡⁣⁤',
231
- 'fabric.editor.wrapRight': '⁣⁢Wrap right‍؜؜⁡؜⁣⁤'
256
+ 'fabric.editor.wrapRight': '⁣⁢Wrap right‍؜؜⁡؜⁣⁤',
257
+ 'fabric.emoji.label': '⁣⁢Emoji‌⁠؜‌⁠‍⁠؜⁠‌؜⁡⁣⁤'
232
258
  };
package/dist/esm/index.js CHANGED
@@ -61,5 +61,4 @@ export { lightModeStatusColorPalette, darkModeStatusColorPalette } from './ui/Co
61
61
  export { DEFAULT_BORDER_COLOR } from './ui/ColorPalette/Palettes/common';
62
62
  export { default as messages, statusMessages, dateMessages } from './messages';
63
63
  export { createTypeAheadTools } from './plugins/type-ahead/api';
64
- export { createQuickInsertTools } from './plugins/quick-insert/api';
65
- export { default as EditorMigrationComponent } from './editor-next/editor-migration-component';
64
+ export { createQuickInsertTools } from './plugins/quick-insert/api';
@@ -23,6 +23,7 @@ import quickInsertPlugin from '../../../plugins/quick-insert';
23
23
  import selectionPlugin from '../../../plugins/selection';
24
24
  import codeBlockPlugin from '../../../plugins/code-block';
25
25
  import undoRedoPlugin from '../../../plugins/undo-redo';
26
+ import { decorationsPlugin } from '@atlaskit/editor-plugin-decorations';
26
27
  import { EditorPresetBuilder } from '@atlaskit/editor-common/preset';
27
28
  // #endregion
28
29
 
@@ -51,7 +52,7 @@ export function createDefaultPreset(options) {
51
52
  }]);
52
53
  }
53
54
  return builder;
54
- }).add([pastePlugin, options.paste]).add(clipboardPlugin).add([basePlugin, options.base]).maybeAdd(undoRedoPlugin, function (p, builder) {
55
+ }).add([pastePlugin, options.paste]).add(clipboardPlugin).add([basePlugin, options.base]).add(decorationsPlugin).maybeAdd(undoRedoPlugin, function (p, builder) {
55
56
  var _options$featureFlags;
56
57
  // The undo redo plugin needs to be add before the blockTypePlugin
57
58
  if ((_options$featureFlags = options.featureFlags) !== null && _options$featureFlags !== void 0 && _options$featureFlags.undoRedoButtons) {
@@ -14,7 +14,6 @@ import newlinePreserveMarksPlugin from './pm-plugins/newline-preserve-marks';
14
14
  import inlineCursorTargetPlugin from './pm-plugins/inline-cursor-target';
15
15
  import betterTypeHistoryPlugin from './pm-plugins/better-type-history';
16
16
  import { plugin as reactNodeView } from './pm-plugins/react-nodeview';
17
- import decorationPlugin, { hoverDecoration } from './pm-plugins/decoration';
18
17
  import scrollGutter from './pm-plugins/scroll-gutter';
19
18
  import { keymap } from '../../utils/keymap';
20
19
  import frozenEditor from './pm-plugins/frozen-editor';
@@ -70,11 +69,6 @@ var basePlugin = function basePlugin(options, api) {
70
69
  var dispatchAnalyticsEvent = _ref3.dispatchAnalyticsEvent;
71
70
  return options !== null && options !== void 0 && (_options$inputTrackin = options.inputTracking) !== null && _options$inputTrackin !== void 0 && _options$inputTrackin.enabled || options !== null && options !== void 0 && options.ufo ? frozenEditor(dispatchAnalyticsEvent, options.inputTracking, options.browserFreezeTracking, options.ufo) : undefined;
72
71
  }
73
- }, {
74
- name: 'decorationPlugin',
75
- plugin: function plugin() {
76
- return decorationPlugin();
77
- }
78
72
  }, {
79
73
  name: 'history',
80
74
  plugin: function plugin() {
@@ -150,9 +144,6 @@ var basePlugin = function basePlugin(options, api) {
150
144
  name: 'text',
151
145
  node: text
152
146
  }];
153
- },
154
- actions: {
155
- hoverDecoration: hoverDecoration
156
147
  }
157
148
  };
158
149
  };