@atlaskit/editor-core 203.16.1 → 203.16.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 203.16.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#112607](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/112607)
8
+ [`aae2efdae0ebe`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/aae2efdae0ebe) -
9
+ Fixed regression where editor analytics stopped firing
10
+
11
+ ## 203.16.2
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies
16
+
3
17
  ## 203.16.1
4
18
 
5
19
  ### Patch Changes
@@ -9,6 +9,7 @@ var _state = require("@atlaskit/editor-prosemirror/state");
9
9
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
10
10
  var key = new _state.PluginKey('editorStateNotificationPlugin');
11
11
  var createEditorStateNotificationPlugin = exports.createEditorStateNotificationPlugin = function createEditorStateNotificationPlugin(onEditorStateUpdated, onEditorViewStateUpdatedCallbacks) {
12
+ var transactions = [];
12
13
  return new _safePlugin.SafePlugin({
13
14
  key: key,
14
15
  state: {
@@ -18,6 +19,7 @@ var createEditorStateNotificationPlugin = exports.createEditorStateNotificationP
18
19
  };
19
20
  },
20
21
  apply: function apply(tr) {
22
+ transactions.push(tr);
21
23
  return {
22
24
  latestTransaction: tr
23
25
  };
@@ -32,11 +34,12 @@ var createEditorStateNotificationPlugin = exports.createEditorStateNotificationP
32
34
  onEditorViewStateUpdatedCallbacks.forEach(function (entry) {
33
35
  entry.callback({
34
36
  originalTransaction: originalTransaction,
35
- transactions: [originalTransaction],
37
+ transactions: transactions,
36
38
  oldEditorState: oldEditorState,
37
39
  newEditorState: view.state
38
40
  });
39
41
  });
42
+ transactions = [];
40
43
  }
41
44
  onEditorStateUpdated({
42
45
  oldEditorState: oldEditorState,
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -5,4 +5,4 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.version = exports.name = void 0;
7
7
  var name = exports.name = "@atlaskit/editor-core";
8
- var version = exports.version = "203.16.1";
8
+ var version = exports.version = "203.16.3";
@@ -2,40 +2,45 @@ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
2
  import { PluginKey } from '@atlaskit/editor-prosemirror/state';
3
3
  import { fg } from '@atlaskit/platform-feature-flags';
4
4
  const key = new PluginKey('editorStateNotificationPlugin');
5
- export const createEditorStateNotificationPlugin = (onEditorStateUpdated, onEditorViewStateUpdatedCallbacks) => new SafePlugin({
6
- key: key,
7
- state: {
8
- init() {
9
- return {
10
- latestTransaction: undefined
11
- };
5
+ export const createEditorStateNotificationPlugin = (onEditorStateUpdated, onEditorViewStateUpdatedCallbacks) => {
6
+ let transactions = [];
7
+ return new SafePlugin({
8
+ key: key,
9
+ state: {
10
+ init() {
11
+ return {
12
+ latestTransaction: undefined
13
+ };
14
+ },
15
+ apply(tr) {
16
+ transactions.push(tr);
17
+ return {
18
+ latestTransaction: tr
19
+ };
20
+ }
12
21
  },
13
- apply(tr) {
22
+ view: () => {
14
23
  return {
15
- latestTransaction: tr
16
- };
17
- }
18
- },
19
- view: () => {
20
- return {
21
- update: (view, oldEditorState) => {
22
- var _key$getState;
23
- const originalTransaction = (_key$getState = key.getState(view.state)) === null || _key$getState === void 0 ? void 0 : _key$getState.latestTransaction;
24
- if (originalTransaction && fg('platform_editor_migrate_state_updates')) {
25
- onEditorViewStateUpdatedCallbacks.forEach(entry => {
26
- entry.callback({
27
- originalTransaction,
28
- transactions: [originalTransaction],
29
- oldEditorState,
30
- newEditorState: view.state
24
+ update: (view, oldEditorState) => {
25
+ var _key$getState;
26
+ const originalTransaction = (_key$getState = key.getState(view.state)) === null || _key$getState === void 0 ? void 0 : _key$getState.latestTransaction;
27
+ if (originalTransaction && fg('platform_editor_migrate_state_updates')) {
28
+ onEditorViewStateUpdatedCallbacks.forEach(entry => {
29
+ entry.callback({
30
+ originalTransaction,
31
+ transactions: transactions,
32
+ oldEditorState,
33
+ newEditorState: view.state
34
+ });
31
35
  });
36
+ transactions = [];
37
+ }
38
+ onEditorStateUpdated({
39
+ oldEditorState,
40
+ newEditorState: view.state
32
41
  });
33
42
  }
34
- onEditorStateUpdated({
35
- oldEditorState,
36
- newEditorState: view.state
37
- });
38
- }
39
- };
40
- }
41
- });
43
+ };
44
+ }
45
+ });
46
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -31,6 +31,7 @@ import { undoRedoPlugin } from '@atlaskit/editor-plugins/undo-redo';
31
31
  import { unsupportedContentPlugin } from '@atlaskit/editor-plugins/unsupported-content';
32
32
  import { widthPlugin } from '@atlaskit/editor-plugins/width';
33
33
  import { isFullPage as fullPageCheck } from '../utils/is-full-page';
34
+
34
35
  // #endregion
35
36
 
36
37
  /**
@@ -1,2 +1,2 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "203.16.1";
2
+ export const version = "203.16.3";
@@ -3,6 +3,7 @@ import { PluginKey } from '@atlaskit/editor-prosemirror/state';
3
3
  import { fg } from '@atlaskit/platform-feature-flags';
4
4
  var key = new PluginKey('editorStateNotificationPlugin');
5
5
  export var createEditorStateNotificationPlugin = function createEditorStateNotificationPlugin(onEditorStateUpdated, onEditorViewStateUpdatedCallbacks) {
6
+ var transactions = [];
6
7
  return new SafePlugin({
7
8
  key: key,
8
9
  state: {
@@ -12,6 +13,7 @@ export var createEditorStateNotificationPlugin = function createEditorStateNotif
12
13
  };
13
14
  },
14
15
  apply: function apply(tr) {
16
+ transactions.push(tr);
15
17
  return {
16
18
  latestTransaction: tr
17
19
  };
@@ -26,11 +28,12 @@ export var createEditorStateNotificationPlugin = function createEditorStateNotif
26
28
  onEditorViewStateUpdatedCallbacks.forEach(function (entry) {
27
29
  entry.callback({
28
30
  originalTransaction: originalTransaction,
29
- transactions: [originalTransaction],
31
+ transactions: transactions,
30
32
  oldEditorState: oldEditorState,
31
33
  newEditorState: view.state
32
34
  });
33
35
  });
36
+ transactions = [];
34
37
  }
35
38
  onEditorStateUpdated({
36
39
  oldEditorState: oldEditorState,
@@ -0,0 +1 @@
1
+ export {};
@@ -34,6 +34,7 @@ import { undoRedoPlugin } from '@atlaskit/editor-plugins/undo-redo';
34
34
  import { unsupportedContentPlugin } from '@atlaskit/editor-plugins/unsupported-content';
35
35
  import { widthPlugin } from '@atlaskit/editor-plugins/width';
36
36
  import { isFullPage as fullPageCheck } from '../utils/is-full-page';
37
+
37
38
  // #endregion
38
39
 
39
40
  /**
@@ -1,2 +1,2 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "203.16.1";
2
+ export var version = "203.16.3";
@@ -5,7 +5,7 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
5
5
  props: EditorProps;
6
6
  prevProps?: EditorProps;
7
7
  initialPluginConfiguration?: InitialPluginConfiguration;
8
- }): import("@atlaskit/editor-common/preset").EditorPresetBuilder<["codeBidiWarning", "pasteOptionsToolbarPlugin", import("@atlaskit/editor-common/preset").MaybePluginName<"fragmentPlugin">, import("@atlaskit/editor-common/preset").MaybePluginName<"border">, import("@atlaskit/editor-common/preset").MaybePluginName<"findReplace">, "avatarGroup", import("@atlaskit/editor-common/preset").MaybePluginName<"beforePrimaryToolbar">, "insertBlock", "toolbarListsIndentation", import("@atlaskit/editor-common/preset").MaybePluginName<"scrollIntoView">, import("@atlaskit/editor-common/preset").MaybePluginName<"indentation">, import("@atlaskit/editor-common/preset").MaybePluginName<"status">, import("@atlaskit/editor-common/preset").MaybePluginName<"customAutoformat">, import("@atlaskit/editor-common/preset").MaybePluginName<"card">, import("@atlaskit/editor-common/preset").MaybePluginName<"layout">, import("@atlaskit/editor-common/preset").MaybePluginName<"placeholderText">, import("@atlaskit/editor-common/preset").MaybePluginName<"date">, import("@atlaskit/editor-common/preset").MaybePluginName<"annotation">, import("@atlaskit/editor-common/preset").MaybePluginName<"extension">, import("@atlaskit/editor-common/preset").MaybePluginName<"contextPanel">, import("@atlaskit/editor-common/preset").MaybePluginName<"panel">, import("@atlaskit/editor-common/preset").MaybePluginName<"maxContentSize">, import("@atlaskit/editor-common/preset").MaybePluginName<"collabEdit">, import("@atlaskit/editor-common/preset").MaybePluginName<"media">, import("@atlaskit/editor-common/preset").MaybePluginName<"imageUpload">, import("@atlaskit/editor-common/preset").MaybePluginName<"saveOnEnter">, import("@atlaskit/editor-common/preset").MaybePluginName<"helpDialog">, import("@atlaskit/editor-common/preset").MaybePluginName<"feedbackDialog">, import("@atlaskit/editor-common/preset").MaybePluginName<"taskDecision">, import("@atlaskit/editor-common/preset").MaybePluginName<"table">, import("@atlaskit/editor-common/preset").MaybePluginName<"emoji">, import("@atlaskit/editor-common/preset").MaybePluginName<"mention">, import("@atlaskit/editor-common/preset").MaybePluginName<"caption">, import("@atlaskit/editor-common/preset").MaybePluginName<"mediaInsert">, import("@atlaskit/editor-common/preset").MaybePluginName<"media">, import("@atlaskit/editor-common/preset").MaybePluginName<"annotation">, import("@atlaskit/editor-common/preset").MaybePluginName<"grid">, import("@atlaskit/editor-common/preset").MaybePluginName<"guideline">, import("@atlaskit/editor-common/preset").MaybePluginName<"expand">, import("@atlaskit/editor-common/preset").MaybePluginName<"rule">, "list", import("@atlaskit/editor-common/preset").MaybePluginName<"textColor">, import("@atlaskit/editor-common/preset").MaybePluginName<"alignment">, import("@atlaskit/editor-common/preset").MaybePluginName<"breakout">, "batchAttributeUpdates", "contentInsertion", "accessibilityUtils", "dataConsumer", "ufo", "codeBlock", "selection", "floatingToolbar", "copyButton", "submitEditor", "editorDisabled", "unsupportedContent", "placeholder", "quickInsert", "width", "textFormatting", "hyperlink", "selectionToolbar", "clearMarksOnEmptyDoc", "blockType", import("@atlaskit/editor-common/preset").MaybePluginName<"undoRedoPlugin">, "primaryToolbar", import("@atlaskit/editor-common/preset").MaybePluginName<"history">, "typeAhead", "decorations", "base", "contextIdentifier", "composition", "focus", "clipboard", "paste", "betterTypeHistory", import("@atlaskit/editor-common/preset").MaybePluginName<"analytics">, "featureFlags"], [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"codeBidiWarning", {
8
+ }): import("@atlaskit/editor-common/preset").EditorPresetBuilder<["codeBidiWarning", "pasteOptionsToolbarPlugin", import("@atlaskit/editor-common/preset").MaybePluginName<"fragmentPlugin">, import("@atlaskit/editor-common/preset").MaybePluginName<"border">, import("@atlaskit/editor-common/preset").MaybePluginName<"findReplace">, "avatarGroup", import("@atlaskit/editor-common/preset").MaybePluginName<"beforePrimaryToolbar">, "insertBlock", "toolbarListsIndentation", import("@atlaskit/editor-common/preset").MaybePluginName<"scrollIntoView">, import("@atlaskit/editor-common/preset").MaybePluginName<"indentation">, import("@atlaskit/editor-common/preset").MaybePluginName<"status">, import("@atlaskit/editor-common/preset").MaybePluginName<"customAutoformat">, import("@atlaskit/editor-common/preset").MaybePluginName<"card">, import("@atlaskit/editor-common/preset").MaybePluginName<"layout">, import("@atlaskit/editor-common/preset").MaybePluginName<"placeholderText">, import("@atlaskit/editor-common/preset").MaybePluginName<"date">, import("@atlaskit/editor-common/preset").MaybePluginName<"annotation">, import("@atlaskit/editor-common/preset").MaybePluginName<"extension">, import("@atlaskit/editor-common/preset").MaybePluginName<"contextPanel">, import("@atlaskit/editor-common/preset").MaybePluginName<"panel">, import("@atlaskit/editor-common/preset").MaybePluginName<"maxContentSize">, import("@atlaskit/editor-common/preset").MaybePluginName<"collabEdit">, import("@atlaskit/editor-common/preset").MaybePluginName<"media">, import("@atlaskit/editor-common/preset").MaybePluginName<"imageUpload">, import("@atlaskit/editor-common/preset").MaybePluginName<"saveOnEnter">, import("@atlaskit/editor-common/preset").MaybePluginName<"helpDialog">, import("@atlaskit/editor-common/preset").MaybePluginName<"feedbackDialog">, import("@atlaskit/editor-common/preset").MaybePluginName<"taskDecision">, import("@atlaskit/editor-common/preset").MaybePluginName<"table">, import("@atlaskit/editor-common/preset").MaybePluginName<"emoji">, import("@atlaskit/editor-common/preset").MaybePluginName<"mention">, import("@atlaskit/editor-common/preset").MaybePluginName<"caption">, import("@atlaskit/editor-common/preset").MaybePluginName<"mediaInsert">, import("@atlaskit/editor-common/preset").MaybePluginName<"media">, import("@atlaskit/editor-common/preset").MaybePluginName<"annotation">, import("@atlaskit/editor-common/preset").MaybePluginName<"grid">, import("@atlaskit/editor-common/preset").MaybePluginName<"guideline">, import("@atlaskit/editor-common/preset").MaybePluginName<"expand">, import("@atlaskit/editor-common/preset").MaybePluginName<"rule">, "list", import("@atlaskit/editor-common/preset").MaybePluginName<"textColor">, import("@atlaskit/editor-common/preset").MaybePluginName<"alignment">, import("@atlaskit/editor-common/preset").MaybePluginName<"breakout">, "batchAttributeUpdates", "contentInsertion", "accessibilityUtils", "dataConsumer", "ufo", "codeBlock", "selection", "floatingToolbar", "copyButton", "submitEditor", "editorDisabled", "unsupportedContent", "placeholder", "quickInsert", "width", "textFormatting", "hyperlink", "selectionToolbar", "clearMarksOnEmptyDoc", "blockType", string, "primaryToolbar", string, "typeAhead", "decorations", "base", "contextIdentifier", "composition", "focus", "clipboard", "paste", "betterTypeHistory", string, "featureFlags"], [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"codeBidiWarning", {
9
9
  pluginConfiguration: {
10
10
  appearance?: import("@atlaskit/editor-common/types").EditorAppearance | undefined;
11
11
  } | undefined;
@@ -435,8 +435,9 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
435
435
  pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
436
436
  sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
437
437
  }, import("@atlaskit/editor-common/types").FeatureFlags>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"connectivity", {
438
- sharedState: {
439
- mode: "offline" | "online";
438
+ sharedState: import("packages/editor/editor-plugin-connectivity/dist/types/connectivityPluginType").PublicPluginState;
439
+ commands: {
440
+ setMode: (mode: import("@atlaskit/editor-plugins/connectivity").Mode | null) => import("@atlaskit/editor-common/types").EditorCommand;
440
441
  };
441
442
  }, undefined>>];
442
443
  sharedState: import("@atlaskit/editor-plugins/type-ahead").TypeAheadPluginSharedState;
@@ -487,8 +488,9 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
487
488
  pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
488
489
  sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
489
490
  }, import("@atlaskit/editor-common/types").FeatureFlags>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"connectivity", {
490
- sharedState: {
491
- mode: "offline" | "online";
491
+ sharedState: import("packages/editor/editor-plugin-connectivity/dist/types/connectivityPluginType").PublicPluginState;
492
+ commands: {
493
+ setMode: (mode: import("@atlaskit/editor-plugins/connectivity").Mode | null) => import("@atlaskit/editor-common/types").EditorCommand;
492
494
  };
493
495
  }, undefined>>];
494
496
  sharedState: import("@atlaskit/editor-plugins/type-ahead").TypeAheadPluginSharedState;
@@ -519,8 +521,9 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
519
521
  }) => (tr: import("prosemirror-state").Transaction) => boolean;
520
522
  };
521
523
  }, import("@atlaskit/editor-plugins/type-ahead").TypeAheadPluginOptions | undefined>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"connectivity", {
522
- sharedState: {
523
- mode: "offline" | "online";
524
+ sharedState: import("packages/editor/editor-plugin-connectivity/dist/types/connectivityPluginType").PublicPluginState;
525
+ commands: {
526
+ setMode: (mode: import("@atlaskit/editor-plugins/connectivity").Mode | null) => import("@atlaskit/editor-common/types").EditorCommand;
524
527
  };
525
528
  }, undefined>>];
526
529
  sharedState: import("@atlaskit/editor-plugin-quick-insert").QuickInsertSharedState | null;
@@ -666,8 +669,9 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
666
669
  pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
667
670
  sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
668
671
  }, import("@atlaskit/editor-common/types").FeatureFlags>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"connectivity", {
669
- sharedState: {
670
- mode: "offline" | "online";
672
+ sharedState: import("packages/editor/editor-plugin-connectivity/dist/types/connectivityPluginType").PublicPluginState;
673
+ commands: {
674
+ setMode: (mode: import("@atlaskit/editor-plugins/connectivity").Mode | null) => import("@atlaskit/editor-common/types").EditorCommand;
671
675
  };
672
676
  }, undefined>>];
673
677
  sharedState: import("@atlaskit/editor-plugins/type-ahead").TypeAheadPluginSharedState;
@@ -736,8 +740,9 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
736
740
  pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
737
741
  sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
738
742
  }, import("@atlaskit/editor-common/types").FeatureFlags>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"connectivity", {
739
- sharedState: {
740
- mode: "offline" | "online";
743
+ sharedState: import("packages/editor/editor-plugin-connectivity/dist/types/connectivityPluginType").PublicPluginState;
744
+ commands: {
745
+ setMode: (mode: import("@atlaskit/editor-plugins/connectivity").Mode | null) => import("@atlaskit/editor-common/types").EditorCommand;
741
746
  };
742
747
  }, undefined>>];
743
748
  sharedState: import("@atlaskit/editor-plugins/type-ahead").TypeAheadPluginSharedState;
@@ -0,0 +1,67 @@
1
+ import type { EditorPresetBuilder } from '@atlaskit/editor-common/preset';
2
+ import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
3
+ import type { AnalyticsPlugin } from '@atlaskit/editor-plugins/analytics';
4
+ import type { BasePlugin } from '@atlaskit/editor-plugins/base';
5
+ import type { BetterTypeHistoryPlugin } from '@atlaskit/editor-plugins/better-type-history';
6
+ import type { BlockTypePlugin } from '@atlaskit/editor-plugins/block-type';
7
+ import type { ClearMarksOnEmptyDocPlugin } from '@atlaskit/editor-plugins/clear-marks-on-empty-doc';
8
+ import type { ClipboardPlugin } from '@atlaskit/editor-plugins/clipboard';
9
+ import type { CodeBlockPlugin } from '@atlaskit/editor-plugins/code-block';
10
+ import type { CompositionPlugin } from '@atlaskit/editor-plugins/composition';
11
+ import type { ContextIdentifierPlugin } from '@atlaskit/editor-plugins/context-identifier';
12
+ import type { CopyButtonPlugin } from '@atlaskit/editor-plugins/copy-button';
13
+ import type { DecorationsPlugin } from '@atlaskit/editor-plugins/decorations';
14
+ import type { EditorDisabledPlugin } from '@atlaskit/editor-plugins/editor-disabled';
15
+ import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugins/feature-flags';
16
+ import type { FloatingToolbarPlugin } from '@atlaskit/editor-plugins/floating-toolbar';
17
+ import type { FocusPlugin } from '@atlaskit/editor-plugins/focus';
18
+ import type { HistoryPlugin } from '@atlaskit/editor-plugins/history';
19
+ import type { HyperlinkPlugin } from '@atlaskit/editor-plugins/hyperlink';
20
+ import type { PastePlugin } from '@atlaskit/editor-plugins/paste';
21
+ import type { PlaceholderPlugin } from '@atlaskit/editor-plugins/placeholder';
22
+ import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugins/primary-toolbar';
23
+ import type { QuickInsertPlugin } from '@atlaskit/editor-plugins/quick-insert';
24
+ import type { SelectionPlugin } from '@atlaskit/editor-plugins/selection';
25
+ import type { SelectionToolbarPlugin } from '@atlaskit/editor-plugins/selection-toolbar';
26
+ import type { SubmitEditorPlugin } from '@atlaskit/editor-plugins/submit-editor';
27
+ import type { TextFormattingPlugin } from '@atlaskit/editor-plugins/text-formatting';
28
+ import type { TypeAheadPlugin } from '@atlaskit/editor-plugins/type-ahead';
29
+ import type { UndoRedoPlugin } from '@atlaskit/editor-plugins/undo-redo';
30
+ import type { UnsupportedContentPlugin } from '@atlaskit/editor-plugins/unsupported-content';
31
+ import type { WidthPlugin } from '@atlaskit/editor-plugins/width';
32
+ type ExtractPluginName<Plugin> = Plugin extends NextEditorPlugin<infer PluginName, any> | undefined ? PluginName : never;
33
+ export type DefaultPresetPlugins = [
34
+ CodeBlockPlugin,
35
+ SelectionPlugin,
36
+ FloatingToolbarPlugin,
37
+ CopyButtonPlugin,
38
+ SubmitEditorPlugin,
39
+ EditorDisabledPlugin,
40
+ UnsupportedContentPlugin,
41
+ PlaceholderPlugin,
42
+ QuickInsertPlugin,
43
+ WidthPlugin,
44
+ TextFormattingPlugin,
45
+ HyperlinkPlugin,
46
+ SelectionToolbarPlugin,
47
+ ClearMarksOnEmptyDocPlugin,
48
+ BlockTypePlugin,
49
+ UndoRedoPlugin | undefined,
50
+ PrimaryToolbarPlugin,
51
+ HistoryPlugin | undefined,
52
+ TypeAheadPlugin,
53
+ DecorationsPlugin,
54
+ BasePlugin,
55
+ ContextIdentifierPlugin,
56
+ CompositionPlugin,
57
+ FocusPlugin,
58
+ ClipboardPlugin,
59
+ PastePlugin,
60
+ BetterTypeHistoryPlugin,
61
+ AnalyticsPlugin | undefined,
62
+ FeatureFlagsPlugin
63
+ ];
64
+ type ExtractPluginNames<PluginList extends (NextEditorPlugin<any, any> | undefined)[]> = PluginList extends [infer Head, ...infer Tail] ? Tail extends (NextEditorPlugin<any, any> | undefined)[] ? [ExtractPluginName<Head>, ...ExtractPluginNames<Tail>] : [] : [];
65
+ type DefaultPresetPluginNames = ExtractPluginNames<DefaultPresetPlugins>;
66
+ export type DefaultPresetBuilder = EditorPresetBuilder<DefaultPresetPluginNames, DefaultPresetPlugins>;
67
+ export {};