@atlaskit/editor-common 79.5.0 → 79.6.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 79.6.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#98727](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/98727)
8
+ [`057b3d93e3d4`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/057b3d93e3d4) -
9
+ The `usePreset` hook from editor-core previously required the EditorContext in order to have a
10
+ valid editorApi as a return value (otherwise it is undefined). This is confusing to developers
11
+ so this improvement allows the API value to be resolved without EditorContext - simplifying what
12
+ is required to setup the editor.
13
+
14
+ ### Patch Changes
15
+
16
+ - [#99242](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/99242)
17
+ [`854acdf04f29`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/854acdf04f29) -
18
+ Adjust tooltip text for editor toolbar buttons
19
+
3
20
  ## 79.5.0
4
21
 
5
22
  ### Minor Changes
@@ -10,5 +10,10 @@ var textColorMessages = exports.textColorMessages = (0, _reactIntlNext.defineMes
10
10
  id: 'fabric.editor.textColor',
11
11
  defaultMessage: '{selectedColorName} Text color',
12
12
  description: 'Label of menu that provides access to various colors of text. For example: green Text color, dark blue Text color'
13
+ },
14
+ textColorTooltip: {
15
+ id: 'fabric.editor.textColorTooltip',
16
+ defaultMessage: 'Text color',
17
+ description: 'Toolip of menu that provides access to various colors of text.'
13
18
  }
14
19
  });
@@ -86,6 +86,11 @@ var toolbarMessages = exports.toolbarMessages = (0, _reactIntlNext.defineMessage
86
86
  defaultMessage: '{blockTypeName} Text styles',
87
87
  description: 'Menu label that provides access to various heading styles or normal text. For example: normal text styles, heading 1 text styles.'
88
88
  },
89
+ textStylesTooltip: {
90
+ id: 'fabric.editor.textStylesTooltip',
91
+ defaultMessage: 'Text styles',
92
+ description: 'Tooltip text for menu that provides access to various heading styles or normal text.'
93
+ },
89
94
  textFormattingOff: {
90
95
  id: 'fabric.editor.text.formatting.off',
91
96
  defaultMessage: 'Text formatting Off',
@@ -16,7 +16,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
16
16
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
17
17
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
18
18
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
19
- var packageVersion = "79.5.0";
19
+ var packageVersion = "79.6.0";
20
20
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
21
21
  // Remove URL as it has UGC
22
22
  // TODO: Sanitise the URL instead of just removing it
@@ -12,7 +12,13 @@ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/cl
12
12
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
13
13
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
14
14
  var EditorPresetBuilder = exports.EditorPresetBuilder = /*#__PURE__*/function () {
15
+ /**
16
+ * Returns the editor API when resolved.
17
+ * This occurs when the preset is initially built.
18
+ */
19
+
15
20
  function EditorPresetBuilder() {
21
+ var _this = this;
16
22
  (0, _classCallCheck2.default)(this, EditorPresetBuilder);
17
23
  (0, _defineProperty2.default)(this, "safeEntry", function (plugin) {
18
24
  return Array.isArray(plugin) ? plugin : [plugin, undefined];
@@ -21,6 +27,9 @@ var EditorPresetBuilder = exports.EditorPresetBuilder = /*#__PURE__*/function ()
21
27
  more[_key] = arguments[_key];
22
28
  }
23
29
  this.data = [].concat(more) || [];
30
+ this.apiPromise = new Promise(function (r) {
31
+ return _this.resolver = r;
32
+ });
24
33
  }
25
34
  (0, _createClass2.default)(EditorPresetBuilder, [{
26
35
  key: "add",
@@ -73,6 +82,10 @@ var EditorPresetBuilder = exports.EditorPresetBuilder = /*#__PURE__*/function ()
73
82
  pluginInjectionAPI: pluginInjectionAPI,
74
83
  excludePlugins: excludePlugins
75
84
  });
85
+ if (pluginInjectionAPI) {
86
+ var _this$resolver;
87
+ (_this$resolver = this.resolver) === null || _this$resolver === void 0 || _this$resolver.call(this, pluginInjectionAPI.api());
88
+ }
76
89
  return this.removeExcludedPlugins(editorPlugins, excludePlugins);
77
90
  }
78
91
  }, {
@@ -94,17 +107,17 @@ var EditorPresetBuilder = exports.EditorPresetBuilder = /*#__PURE__*/function ()
94
107
  }, {
95
108
  key: "processEditorPlugins",
96
109
  value: function processEditorPlugins(_ref4) {
97
- var _this = this;
110
+ var _this2 = this;
98
111
  var pluginInjectionAPI = _ref4.pluginInjectionAPI,
99
112
  excludePlugins = _ref4.excludePlugins;
100
113
  this.verifyDuplicatedPlugins();
101
114
  var seen = new Set();
102
115
  var pluginsDataCopy = this.data.slice();
103
116
  var plugins = pluginsDataCopy.reverse().filter(Boolean).map(function (entry) {
104
- var _this$safeEntry = _this.safeEntry(entry),
105
- _this$safeEntry2 = (0, _slicedToArray2.default)(_this$safeEntry, 2),
106
- fn = _this$safeEntry2[0],
107
- config = _this$safeEntry2[1];
117
+ var _this2$safeEntry = _this2.safeEntry(entry),
118
+ _this2$safeEntry2 = (0, _slicedToArray2.default)(_this2$safeEntry, 2),
119
+ fn = _this2$safeEntry2[0],
120
+ config = _this2$safeEntry2[1];
108
121
  if (seen.has(fn)) {
109
122
  return null;
110
123
  }
@@ -239,6 +239,7 @@ var SharedStateAPI = exports.SharedStateAPI = /*#__PURE__*/function () {
239
239
  }]);
240
240
  return SharedStateAPI;
241
241
  }();
242
+ var editorAPICache = new WeakMap();
242
243
  var EditorPluginInjectionAPI = exports.EditorPluginInjectionAPI = /*#__PURE__*/function () {
243
244
  function EditorPluginInjectionAPI(_ref6) {
244
245
  var _this2 = this;
@@ -284,8 +285,8 @@ var EditorPluginInjectionAPI = exports.EditorPluginInjectionAPI = /*#__PURE__*/f
284
285
  }));
285
286
  }
286
287
  (0, _createClass2.default)(EditorPluginInjectionAPI, [{
287
- key: "api",
288
- value: function api() {
288
+ key: "createAPI",
289
+ value: function createAPI() {
289
290
  var sharedStateAPI = this.sharedStateAPI,
290
291
  actionsAPI = this.actionsAPI,
291
292
  commandsAPI = this.commandsAPI,
@@ -313,6 +314,14 @@ var EditorPluginInjectionAPI = exports.EditorPluginInjectionAPI = /*#__PURE__*/f
313
314
  }
314
315
  });
315
316
  }
317
+ }, {
318
+ key: "api",
319
+ value: function api() {
320
+ if (!editorAPICache.get(this)) {
321
+ editorAPICache.set(this, this.createAPI());
322
+ }
323
+ return editorAPICache.get(this);
324
+ }
316
325
  }]);
317
326
  return EditorPluginInjectionAPI;
318
327
  }();
@@ -20,7 +20,7 @@ var _Layer = _interopRequireDefault(require("../Layer"));
20
20
  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); }; }
21
21
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** @jsx jsx */
22
22
  var packageName = "@atlaskit/editor-common";
23
- var packageVersion = "79.5.0";
23
+ var packageVersion = "79.6.0";
24
24
  var halfFocusRing = 1;
25
25
  var dropOffset = '0, 8';
26
26
  var DropList = /*#__PURE__*/function (_Component) {
@@ -4,5 +4,10 @@ export const textColorMessages = defineMessages({
4
4
  id: 'fabric.editor.textColor',
5
5
  defaultMessage: '{selectedColorName} Text color',
6
6
  description: 'Label of menu that provides access to various colors of text. For example: green Text color, dark blue Text color'
7
+ },
8
+ textColorTooltip: {
9
+ id: 'fabric.editor.textColorTooltip',
10
+ defaultMessage: 'Text color',
11
+ description: 'Toolip of menu that provides access to various colors of text.'
7
12
  }
8
13
  });
@@ -80,6 +80,11 @@ export const toolbarMessages = defineMessages({
80
80
  defaultMessage: '{blockTypeName} Text styles',
81
81
  description: 'Menu label that provides access to various heading styles or normal text. For example: normal text styles, heading 1 text styles.'
82
82
  },
83
+ textStylesTooltip: {
84
+ id: 'fabric.editor.textStylesTooltip',
85
+ defaultMessage: 'Text styles',
86
+ description: 'Tooltip text for menu that provides access to various heading styles or normal text.'
87
+ },
83
88
  textFormattingOff: {
84
89
  id: 'fabric.editor.text.formatting.off',
85
90
  defaultMessage: 'Text formatting Off',
@@ -1,6 +1,6 @@
1
1
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
2
2
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
3
- const packageVersion = "79.5.0";
3
+ const packageVersion = "79.6.0";
4
4
  const sanitiseSentryEvents = (data, _hint) => {
5
5
  // Remove URL as it has UGC
6
6
  // TODO: Sanitise the URL instead of just removing it
@@ -1,8 +1,14 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  export class EditorPresetBuilder {
3
+ /**
4
+ * Returns the editor API when resolved.
5
+ * This occurs when the preset is initially built.
6
+ */
7
+
3
8
  constructor(...more) {
4
9
  _defineProperty(this, "safeEntry", plugin => Array.isArray(plugin) ? plugin : [plugin, undefined]);
5
10
  this.data = [...more] || [];
11
+ this.apiPromise = new Promise(r => this.resolver = r);
6
12
  }
7
13
  add(nextOrTuple) {
8
14
  return new EditorPresetBuilder(
@@ -47,6 +53,10 @@ export class EditorPresetBuilder {
47
53
  pluginInjectionAPI,
48
54
  excludePlugins
49
55
  });
56
+ if (pluginInjectionAPI) {
57
+ var _this$resolver;
58
+ (_this$resolver = this.resolver) === null || _this$resolver === void 0 ? void 0 : _this$resolver.call(this, pluginInjectionAPI.api());
59
+ }
50
60
  return this.removeExcludedPlugins(editorPlugins, excludePlugins);
51
61
  }
52
62
  verifyDuplicatedPlugins() {
@@ -159,6 +159,7 @@ export class SharedStateAPI {
159
159
  this.updatesToNotifyQueue.clear();
160
160
  }
161
161
  }
162
+ const editorAPICache = new WeakMap();
162
163
  export class EditorPluginInjectionAPI {
163
164
  constructor({
164
165
  getEditorState,
@@ -204,7 +205,7 @@ export class EditorPluginInjectionAPI {
204
205
  }
205
206
  }));
206
207
  }
207
- api() {
208
+ createAPI() {
208
209
  const {
209
210
  sharedStateAPI,
210
211
  actionsAPI,
@@ -234,4 +235,10 @@ export class EditorPluginInjectionAPI {
234
235
  }
235
236
  });
236
237
  }
238
+ api() {
239
+ if (!editorAPICache.get(this)) {
240
+ editorAPICache.set(this, this.createAPI());
241
+ }
242
+ return editorAPICache.get(this);
243
+ }
237
244
  }
@@ -7,7 +7,7 @@ import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@
7
7
  import { N0, N50A, N60A, N900 } from '@atlaskit/theme/colors';
8
8
  import Layer from '../Layer';
9
9
  const packageName = "@atlaskit/editor-common";
10
- const packageVersion = "79.5.0";
10
+ const packageVersion = "79.6.0";
11
11
  const halfFocusRing = 1;
12
12
  const dropOffset = '0, 8';
13
13
  class DropList extends Component {
@@ -4,5 +4,10 @@ export var textColorMessages = defineMessages({
4
4
  id: 'fabric.editor.textColor',
5
5
  defaultMessage: '{selectedColorName} Text color',
6
6
  description: 'Label of menu that provides access to various colors of text. For example: green Text color, dark blue Text color'
7
+ },
8
+ textColorTooltip: {
9
+ id: 'fabric.editor.textColorTooltip',
10
+ defaultMessage: 'Text color',
11
+ description: 'Toolip of menu that provides access to various colors of text.'
7
12
  }
8
13
  });
@@ -80,6 +80,11 @@ export var toolbarMessages = defineMessages({
80
80
  defaultMessage: '{blockTypeName} Text styles',
81
81
  description: 'Menu label that provides access to various heading styles or normal text. For example: normal text styles, heading 1 text styles.'
82
82
  },
83
+ textStylesTooltip: {
84
+ id: 'fabric.editor.textStylesTooltip',
85
+ defaultMessage: 'Text styles',
86
+ description: 'Tooltip text for menu that provides access to various heading styles or normal text.'
87
+ },
83
88
  textFormattingOff: {
84
89
  id: 'fabric.editor.text.formatting.off',
85
90
  defaultMessage: 'Text formatting Off',
@@ -6,7 +6,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
6
6
  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) { _defineProperty(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; }
7
7
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
8
8
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
9
- var packageVersion = "79.5.0";
9
+ var packageVersion = "79.6.0";
10
10
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
11
11
  // Remove URL as it has UGC
12
12
  // TODO: Sanitise the URL instead of just removing it
@@ -5,7 +5,13 @@ import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
5
5
  import _createClass from "@babel/runtime/helpers/createClass";
6
6
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
7
7
  export var EditorPresetBuilder = /*#__PURE__*/function () {
8
+ /**
9
+ * Returns the editor API when resolved.
10
+ * This occurs when the preset is initially built.
11
+ */
12
+
8
13
  function EditorPresetBuilder() {
14
+ var _this = this;
9
15
  _classCallCheck(this, EditorPresetBuilder);
10
16
  _defineProperty(this, "safeEntry", function (plugin) {
11
17
  return Array.isArray(plugin) ? plugin : [plugin, undefined];
@@ -14,6 +20,9 @@ export var EditorPresetBuilder = /*#__PURE__*/function () {
14
20
  more[_key] = arguments[_key];
15
21
  }
16
22
  this.data = [].concat(more) || [];
23
+ this.apiPromise = new Promise(function (r) {
24
+ return _this.resolver = r;
25
+ });
17
26
  }
18
27
  _createClass(EditorPresetBuilder, [{
19
28
  key: "add",
@@ -66,6 +75,10 @@ export var EditorPresetBuilder = /*#__PURE__*/function () {
66
75
  pluginInjectionAPI: pluginInjectionAPI,
67
76
  excludePlugins: excludePlugins
68
77
  });
78
+ if (pluginInjectionAPI) {
79
+ var _this$resolver;
80
+ (_this$resolver = this.resolver) === null || _this$resolver === void 0 || _this$resolver.call(this, pluginInjectionAPI.api());
81
+ }
69
82
  return this.removeExcludedPlugins(editorPlugins, excludePlugins);
70
83
  }
71
84
  }, {
@@ -87,17 +100,17 @@ export var EditorPresetBuilder = /*#__PURE__*/function () {
87
100
  }, {
88
101
  key: "processEditorPlugins",
89
102
  value: function processEditorPlugins(_ref4) {
90
- var _this = this;
103
+ var _this2 = this;
91
104
  var pluginInjectionAPI = _ref4.pluginInjectionAPI,
92
105
  excludePlugins = _ref4.excludePlugins;
93
106
  this.verifyDuplicatedPlugins();
94
107
  var seen = new Set();
95
108
  var pluginsDataCopy = this.data.slice();
96
109
  var plugins = pluginsDataCopy.reverse().filter(Boolean).map(function (entry) {
97
- var _this$safeEntry = _this.safeEntry(entry),
98
- _this$safeEntry2 = _slicedToArray(_this$safeEntry, 2),
99
- fn = _this$safeEntry2[0],
100
- config = _this$safeEntry2[1];
110
+ var _this2$safeEntry = _this2.safeEntry(entry),
111
+ _this2$safeEntry2 = _slicedToArray(_this2$safeEntry, 2),
112
+ fn = _this2$safeEntry2[0],
113
+ config = _this2$safeEntry2[1];
101
114
  if (seen.has(fn)) {
102
115
  return null;
103
116
  }
@@ -232,6 +232,7 @@ export var SharedStateAPI = /*#__PURE__*/function () {
232
232
  }]);
233
233
  return SharedStateAPI;
234
234
  }();
235
+ var editorAPICache = new WeakMap();
235
236
  export var EditorPluginInjectionAPI = /*#__PURE__*/function () {
236
237
  function EditorPluginInjectionAPI(_ref6) {
237
238
  var _this2 = this;
@@ -277,8 +278,8 @@ export var EditorPluginInjectionAPI = /*#__PURE__*/function () {
277
278
  }));
278
279
  }
279
280
  _createClass(EditorPluginInjectionAPI, [{
280
- key: "api",
281
- value: function api() {
281
+ key: "createAPI",
282
+ value: function createAPI() {
282
283
  var sharedStateAPI = this.sharedStateAPI,
283
284
  actionsAPI = this.actionsAPI,
284
285
  commandsAPI = this.commandsAPI,
@@ -306,6 +307,14 @@ export var EditorPluginInjectionAPI = /*#__PURE__*/function () {
306
307
  }
307
308
  });
308
309
  }
310
+ }, {
311
+ key: "api",
312
+ value: function api() {
313
+ if (!editorAPICache.get(this)) {
314
+ editorAPICache.set(this, this.createAPI());
315
+ }
316
+ return editorAPICache.get(this);
317
+ }
309
318
  }]);
310
319
  return EditorPluginInjectionAPI;
311
320
  }();
@@ -15,7 +15,7 @@ import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@
15
15
  import { N0, N50A, N60A, N900 } from '@atlaskit/theme/colors';
16
16
  import Layer from '../Layer';
17
17
  var packageName = "@atlaskit/editor-common";
18
- var packageVersion = "79.5.0";
18
+ var packageVersion = "79.6.0";
19
19
  var halfFocusRing = 1;
20
20
  var dropOffset = '0, 8';
21
21
  var DropList = /*#__PURE__*/function (_Component) {
@@ -4,4 +4,9 @@ export declare const textColorMessages: {
4
4
  defaultMessage: string;
5
5
  description: string;
6
6
  };
7
+ textColorTooltip: {
8
+ id: string;
9
+ defaultMessage: string;
10
+ description: string;
11
+ };
7
12
  };
@@ -79,6 +79,11 @@ export declare const toolbarMessages: {
79
79
  defaultMessage: string;
80
80
  description: string;
81
81
  };
82
+ textStylesTooltip: {
83
+ id: string;
84
+ defaultMessage: string;
85
+ description: string;
86
+ };
82
87
  textFormattingOff: {
83
88
  id: string;
84
89
  defaultMessage: string;
@@ -1,4 +1,4 @@
1
- import type { AllEditorPresetPluginTypes, ExtractPluginNameFromAllBuilderPlugins, MaybePlugin, MaybePluginName, PresetPlugin, SafePresetCheck } from '../types';
1
+ import type { AllEditorPresetPluginTypes, ExtractPluginNameFromAllBuilderPlugins, MaybePlugin, MaybePluginName, PresetPlugin, PublicPluginAPI, SafePresetCheck } from '../types';
2
2
  import type { EditorPlugin } from '../types/editor-plugin';
3
3
  import type { EditorPluginInjectionAPI } from './plugin-injection-api';
4
4
  interface ProcessProps {
@@ -13,6 +13,12 @@ type OldAndDeprecatedAddFunction<T> = (pluginToAdd: T, builder: EditorPresetBuil
13
13
  type AllPluginNames = string | MaybePluginName<string>;
14
14
  export declare class EditorPresetBuilder<PluginNames extends AllPluginNames[] = [], StackPlugins extends AllEditorPresetPluginTypes[] = []> {
15
15
  private readonly data;
16
+ /**
17
+ * Returns the editor API when resolved.
18
+ * This occurs when the preset is initially built.
19
+ */
20
+ apiPromise: Promise<PublicPluginAPI<any>>;
21
+ private resolver;
16
22
  constructor(...more: [...StackPlugins]);
17
23
  add<NewPlugin extends PresetPlugin>(nextOrTuple: SafePresetCheck<NewPlugin, StackPlugins>): EditorPresetBuilder<[
18
24
  ExtractPluginNameFromAllBuilderPlugins<NewPlugin>,
@@ -39,6 +39,7 @@ export declare class EditorPluginInjectionAPI implements PluginInjectionAPIDefin
39
39
  private commandsAPI;
40
40
  private plugins;
41
41
  constructor({ getEditorState, getEditorView }: PluginInjectionAPIProps);
42
+ private createAPI;
42
43
  api<T extends NextEditorPlugin<any, any>>(): import("../types/next-editor-plugin").PublicPluginAPI<[NextEditorPlugin<T extends import("../types/next-editor-plugin").NextEditorPluginFunctionOptionalConfigDefinition<infer Name extends string, any, any> ? Name : never, T extends NextEditorPlugin<any, infer Metadata extends import("../types/next-editor-plugin").NextEditorPluginMetadata> ? Metadata : never>, ..."dependencies" extends keyof (T extends NextEditorPlugin<any, infer Metadata extends import("../types/next-editor-plugin").NextEditorPluginMetadata> ? Metadata : never) ? (T extends NextEditorPlugin<any, infer Metadata extends import("../types/next-editor-plugin").NextEditorPluginMetadata> ? Metadata : never)["dependencies"] extends (import("../types/next-editor-plugin").NextEditorPluginFunctionOptionalConfigDefinition<any, any, any> | import("../types/next-editor-plugin").OptionalPlugin<import("../types/next-editor-plugin").NextEditorPluginFunctionOptionalConfigDefinition<any, any, any>>)[] ? Exclude<(T extends NextEditorPlugin<any, infer Metadata extends import("../types/next-editor-plugin").NextEditorPluginMetadata> ? Metadata : never)["dependencies"], undefined> : [] : []]>;
43
44
  onEditorViewUpdated: ({ newEditorState, oldEditorState, }: EditorStateDiff) => void;
44
45
  onEditorPluginInitialized: (plugin: NextEditorPluginInitializedType) => void;
@@ -4,4 +4,9 @@ export declare const textColorMessages: {
4
4
  defaultMessage: string;
5
5
  description: string;
6
6
  };
7
+ textColorTooltip: {
8
+ id: string;
9
+ defaultMessage: string;
10
+ description: string;
11
+ };
7
12
  };
@@ -79,6 +79,11 @@ export declare const toolbarMessages: {
79
79
  defaultMessage: string;
80
80
  description: string;
81
81
  };
82
+ textStylesTooltip: {
83
+ id: string;
84
+ defaultMessage: string;
85
+ description: string;
86
+ };
82
87
  textFormattingOff: {
83
88
  id: string;
84
89
  defaultMessage: string;
@@ -1,4 +1,4 @@
1
- import type { AllEditorPresetPluginTypes, ExtractPluginNameFromAllBuilderPlugins, MaybePlugin, MaybePluginName, PresetPlugin, SafePresetCheck } from '../types';
1
+ import type { AllEditorPresetPluginTypes, ExtractPluginNameFromAllBuilderPlugins, MaybePlugin, MaybePluginName, PresetPlugin, PublicPluginAPI, SafePresetCheck } from '../types';
2
2
  import type { EditorPlugin } from '../types/editor-plugin';
3
3
  import type { EditorPluginInjectionAPI } from './plugin-injection-api';
4
4
  interface ProcessProps {
@@ -15,6 +15,12 @@ export declare class EditorPresetBuilder<PluginNames extends AllPluginNames[] =
15
15
  ], StackPlugins extends AllEditorPresetPluginTypes[] = [
16
16
  ]> {
17
17
  private readonly data;
18
+ /**
19
+ * Returns the editor API when resolved.
20
+ * This occurs when the preset is initially built.
21
+ */
22
+ apiPromise: Promise<PublicPluginAPI<any>>;
23
+ private resolver;
18
24
  constructor(...more: [
19
25
  ...StackPlugins
20
26
  ]);
@@ -39,6 +39,7 @@ export declare class EditorPluginInjectionAPI implements PluginInjectionAPIDefin
39
39
  private commandsAPI;
40
40
  private plugins;
41
41
  constructor({ getEditorState, getEditorView }: PluginInjectionAPIProps);
42
+ private createAPI;
42
43
  api<T extends NextEditorPlugin<any, any>>(): import("../types/next-editor-plugin").PublicPluginAPI<[
43
44
  NextEditorPlugin<T extends import("../types/next-editor-plugin").NextEditorPluginFunctionOptionalConfigDefinition<infer Name extends string, any, any> ? Name : never, T extends NextEditorPlugin<any, infer Metadata extends import("../types/next-editor-plugin").NextEditorPluginMetadata> ? Metadata : never>,
44
45
  ..."dependencies" extends keyof (T extends NextEditorPlugin<any, infer Metadata extends import("../types/next-editor-plugin").NextEditorPluginMetadata> ? Metadata : never) ? (T extends NextEditorPlugin<any, infer Metadata extends import("../types/next-editor-plugin").NextEditorPluginMetadata> ? Metadata : never)["dependencies"] extends (import("../types/next-editor-plugin").NextEditorPluginFunctionOptionalConfigDefinition<any, any, any> | import("../types/next-editor-plugin").OptionalPlugin<import("../types/next-editor-plugin").NextEditorPluginFunctionOptionalConfigDefinition<any, any, any>>)[] ? Exclude<(T extends NextEditorPlugin<any, infer Metadata extends import("../types/next-editor-plugin").NextEditorPluginMetadata> ? Metadata : never)["dependencies"], undefined> : [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "79.5.0",
3
+ "version": "79.6.0",
4
4
  "description": "A package that contains common classes and components for editor and renderer",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"