@atlaskit/editor-core 187.10.8 → 187.12.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 (118) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/cjs/create-editor/ReactEditorViewInternal.js +1 -4
  3. package/dist/cjs/editor-next/editor-internal.js +0 -2
  4. package/dist/cjs/editor-next/hooks/useProviderFactory.js +2 -2
  5. package/dist/cjs/editor-next/index.js +0 -2
  6. package/dist/cjs/editor.js +6 -2
  7. package/dist/cjs/index.js +2 -94
  8. package/dist/cjs/plugins/help-dialog/ui/index.js +42 -42
  9. package/dist/cjs/plugins/paste/handlers.js +4 -6
  10. package/dist/cjs/plugins/text-formatting/actions.js +188 -0
  11. package/dist/cjs/plugins/text-formatting/commands/text-formatting.js +1 -180
  12. package/dist/cjs/plugins/text-formatting/index.js +11 -0
  13. package/dist/cjs/plugins/text-formatting/pm-plugins/keymap.js +8 -8
  14. package/dist/cjs/plugins/text-formatting/pm-plugins/main.js +8 -8
  15. package/dist/cjs/plugins/text-formatting/ui/Toolbar/hooks/clear-formatting-icon.js +2 -2
  16. package/dist/cjs/plugins/text-formatting/ui/Toolbar/hooks/formatting-icons.js +16 -16
  17. package/dist/cjs/plugins/text-formatting/ui/Toolbar/index.js +8 -8
  18. package/dist/cjs/plugins/text-formatting/utils.js +8 -36
  19. package/dist/cjs/ui/ContentStyles/index.js +8 -9
  20. package/dist/cjs/{editor-next/utils/deprecationWarnings.js → utils/editorDeprecationWarnings.js} +3 -3
  21. package/dist/cjs/version-wrapper.js +1 -1
  22. package/dist/cjs/version.json +1 -1
  23. package/dist/es2019/create-editor/ReactEditorViewInternal.js +1 -4
  24. package/dist/es2019/editor-next/editor-internal.js +0 -2
  25. package/dist/es2019/editor-next/hooks/useProviderFactory.js +2 -2
  26. package/dist/es2019/editor-next/index.js +0 -2
  27. package/dist/es2019/editor.js +5 -0
  28. package/dist/es2019/index.js +0 -2
  29. package/dist/es2019/plugins/help-dialog/ui/index.js +1 -1
  30. package/dist/es2019/plugins/paste/handlers.js +5 -7
  31. package/dist/es2019/plugins/text-formatting/actions.js +161 -0
  32. package/dist/es2019/plugins/text-formatting/commands/text-formatting.js +1 -159
  33. package/dist/es2019/plugins/text-formatting/index.js +115 -102
  34. package/dist/es2019/plugins/text-formatting/pm-plugins/keymap.js +8 -8
  35. package/dist/es2019/plugins/text-formatting/pm-plugins/main.js +1 -1
  36. package/dist/es2019/plugins/text-formatting/ui/Toolbar/hooks/clear-formatting-icon.js +1 -1
  37. package/dist/es2019/plugins/text-formatting/ui/Toolbar/hooks/formatting-icons.js +9 -9
  38. package/dist/es2019/plugins/text-formatting/ui/Toolbar/index.js +1 -1
  39. package/dist/es2019/plugins/text-formatting/utils.js +1 -29
  40. package/dist/es2019/ui/ContentStyles/index.js +2 -3
  41. package/dist/es2019/{editor-next/utils/deprecationWarnings.js → utils/editorDeprecationWarnings.js} +2 -2
  42. package/dist/es2019/version-wrapper.js +1 -1
  43. package/dist/es2019/version.json +1 -1
  44. package/dist/esm/create-editor/ReactEditorViewInternal.js +1 -4
  45. package/dist/esm/editor-next/editor-internal.js +0 -2
  46. package/dist/esm/editor-next/hooks/useProviderFactory.js +2 -2
  47. package/dist/esm/editor-next/index.js +0 -2
  48. package/dist/esm/editor.js +6 -2
  49. package/dist/esm/index.js +0 -2
  50. package/dist/esm/plugins/help-dialog/ui/index.js +1 -1
  51. package/dist/esm/plugins/paste/handlers.js +5 -7
  52. package/dist/esm/plugins/text-formatting/actions.js +168 -0
  53. package/dist/esm/plugins/text-formatting/commands/text-formatting.js +1 -166
  54. package/dist/esm/plugins/text-formatting/index.js +11 -0
  55. package/dist/esm/plugins/text-formatting/pm-plugins/keymap.js +8 -8
  56. package/dist/esm/plugins/text-formatting/pm-plugins/main.js +1 -1
  57. package/dist/esm/plugins/text-formatting/ui/Toolbar/hooks/clear-formatting-icon.js +1 -1
  58. package/dist/esm/plugins/text-formatting/ui/Toolbar/hooks/formatting-icons.js +9 -9
  59. package/dist/esm/plugins/text-formatting/ui/Toolbar/index.js +1 -1
  60. package/dist/esm/plugins/text-formatting/utils.js +6 -33
  61. package/dist/esm/ui/ContentStyles/index.js +2 -3
  62. package/dist/esm/{editor-next/utils/deprecationWarnings.js → utils/editorDeprecationWarnings.js} +2 -2
  63. package/dist/esm/version-wrapper.js +1 -1
  64. package/dist/esm/version.json +1 -1
  65. package/dist/types/create-editor/ReactEditorViewInternal.d.ts +0 -1
  66. package/dist/types/editor-next/hooks/useProviderFactory.d.ts +4 -4
  67. package/dist/types/editor.d.ts +1 -0
  68. package/dist/types/index.d.ts +6 -4
  69. package/dist/types/labs/next/presets/default.d.ts +50 -15
  70. package/dist/types/labs/next/presets/useUniversalPreset.d.ts +2 -2
  71. package/dist/types/plugins/media/ui/ResizableMediaSingle/guidelines.d.ts +1 -1
  72. package/dist/types/plugins/paste/handlers.d.ts +1 -2
  73. package/dist/types/plugins/text-formatting/actions.d.ts +22 -0
  74. package/dist/types/plugins/text-formatting/commands/text-formatting.d.ts +0 -31
  75. package/dist/types/plugins/text-formatting/index.d.ts +11 -2
  76. package/dist/types/plugins/text-formatting/pm-plugins/main.d.ts +1 -2
  77. package/dist/types/plugins/text-formatting/pm-plugins/plugin-key.d.ts +1 -1
  78. package/dist/types/plugins/text-formatting/utils.d.ts +1 -5
  79. package/dist/types/types/editor-props.d.ts +11 -12
  80. package/dist/types/ui/ContentStyles/index.d.ts +1 -1
  81. package/dist/types/utils/editorDeprecationWarnings.d.ts +2 -0
  82. package/dist/types-ts4.5/create-editor/ReactEditorViewInternal.d.ts +0 -1
  83. package/dist/types-ts4.5/editor-next/hooks/useProviderFactory.d.ts +4 -4
  84. package/dist/types-ts4.5/editor.d.ts +1 -0
  85. package/dist/types-ts4.5/index.d.ts +6 -4
  86. package/dist/types-ts4.5/labs/next/presets/default.d.ts +50 -15
  87. package/dist/types-ts4.5/labs/next/presets/useUniversalPreset.d.ts +2 -2
  88. package/dist/types-ts4.5/plugins/media/ui/ResizableMediaSingle/guidelines.d.ts +1 -1
  89. package/dist/types-ts4.5/plugins/paste/handlers.d.ts +1 -2
  90. package/dist/types-ts4.5/plugins/text-formatting/actions.d.ts +22 -0
  91. package/dist/types-ts4.5/plugins/text-formatting/commands/text-formatting.d.ts +0 -31
  92. package/dist/types-ts4.5/plugins/text-formatting/index.d.ts +11 -2
  93. package/dist/types-ts4.5/plugins/text-formatting/pm-plugins/main.d.ts +1 -2
  94. package/dist/types-ts4.5/plugins/text-formatting/pm-plugins/plugin-key.d.ts +1 -1
  95. package/dist/types-ts4.5/plugins/text-formatting/utils.d.ts +1 -5
  96. package/dist/types-ts4.5/types/editor-props.d.ts +11 -12
  97. package/dist/types-ts4.5/ui/ContentStyles/index.d.ts +1 -1
  98. package/dist/types-ts4.5/utils/editorDeprecationWarnings.d.ts +2 -0
  99. package/package.json +3 -3
  100. package/report.api.md +39 -166
  101. package/tmp/api-report-tmp.d.ts +36 -135
  102. package/dist/cjs/plugins/text-formatting/styles.js +0 -15
  103. package/dist/cjs/plugins/text-formatting/types.js +0 -5
  104. package/dist/cjs/plugins/text-formatting/ui/Toolbar/toolbar-messages.js +0 -95
  105. package/dist/es2019/plugins/text-formatting/styles.js +0 -5
  106. package/dist/es2019/plugins/text-formatting/types.js +0 -1
  107. package/dist/es2019/plugins/text-formatting/ui/Toolbar/toolbar-messages.js +0 -88
  108. package/dist/esm/plugins/text-formatting/styles.js +0 -7
  109. package/dist/esm/plugins/text-formatting/types.js +0 -1
  110. package/dist/esm/plugins/text-formatting/ui/Toolbar/toolbar-messages.js +0 -88
  111. package/dist/types/editor-next/utils/deprecationWarnings.d.ts +0 -2
  112. package/dist/types/plugins/text-formatting/styles.d.ts +0 -2
  113. package/dist/types/plugins/text-formatting/types.d.ts +0 -30
  114. package/dist/types/plugins/text-formatting/ui/Toolbar/toolbar-messages.d.ts +0 -87
  115. package/dist/types-ts4.5/editor-next/utils/deprecationWarnings.d.ts +0 -2
  116. package/dist/types-ts4.5/plugins/text-formatting/styles.d.ts +0 -2
  117. package/dist/types-ts4.5/plugins/text-formatting/types.d.ts +0 -30
  118. package/dist/types-ts4.5/plugins/text-formatting/ui/Toolbar/toolbar-messages.d.ts +0 -87
@@ -1,36 +1,5 @@
1
1
  import type { Command } from '@atlaskit/editor-common/types';
2
2
  import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
3
- import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
4
3
  export declare const moveRight: () => Command;
5
4
  export declare const moveLeft: () => Command;
6
- export type InputMethodToolbar = INPUT_METHOD.TOOLBAR;
7
- export type InputMethodBasic = InputMethodToolbar | INPUT_METHOD.SHORTCUT | INPUT_METHOD.FORMATTING;
8
- export declare const toggleEm: () => Command;
9
- export declare const toggleEmWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => ({ inputMethod }: {
10
- inputMethod: InputMethodBasic;
11
- }) => Command;
12
- export declare const toggleStrike: () => Command;
13
- export declare const toggleStrikeWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => ({ inputMethod }: {
14
- inputMethod: InputMethodBasic;
15
- }) => Command;
16
- export declare const toggleStrong: () => Command;
17
- export declare const toggleStrongWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => ({ inputMethod }: {
18
- inputMethod: InputMethodBasic;
19
- }) => Command;
20
- export declare const toggleUnderline: () => Command;
21
- export declare const toggleUnderlineWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => ({ inputMethod }: {
22
- inputMethod: InputMethodBasic;
23
- }) => Command;
24
- export declare const toggleSuperscript: () => Command;
25
- export declare const toggleSuperscriptWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => ({ inputMethod }: {
26
- inputMethod: InputMethodBasic;
27
- }) => Command;
28
- export declare const toggleSubscript: () => Command;
29
- export declare const toggleSubscriptWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => ({ inputMethod }: {
30
- inputMethod: InputMethodBasic;
31
- }) => Command;
32
- export declare const toggleCode: () => Command;
33
- export declare const toggleCodeWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => ({ inputMethod }: {
34
- inputMethod: InputMethodBasic;
35
- }) => Command;
36
5
  export declare const createInlineCodeFromTextInputWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (from: number, to: number, text: string) => Command;
@@ -1,10 +1,19 @@
1
- import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
2
- import type { TextFormattingOptions } from './types';
1
+ import type { NextEditorPlugin, OptionalPlugin, TextFormattingOptions } from '@atlaskit/editor-common/types';
3
2
  import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
3
+ import type { ToggleMarkWithAnalyticsCommand } from './actions';
4
4
  declare const textFormatting: NextEditorPlugin<'textFormatting', {
5
5
  pluginConfiguration: TextFormattingOptions | undefined;
6
6
  dependencies: [
7
7
  OptionalPlugin<typeof analyticsPlugin>
8
8
  ];
9
+ actions: {
10
+ toggleSuperscript: ToggleMarkWithAnalyticsCommand;
11
+ toggleSubscript: ToggleMarkWithAnalyticsCommand;
12
+ toggleStrike: ToggleMarkWithAnalyticsCommand;
13
+ toggleCode: ToggleMarkWithAnalyticsCommand;
14
+ toggleUnderline: ToggleMarkWithAnalyticsCommand;
15
+ toggleEm: ToggleMarkWithAnalyticsCommand;
16
+ toggleStrong: ToggleMarkWithAnalyticsCommand;
17
+ };
9
18
  }>;
10
19
  export default textFormatting;
@@ -1,8 +1,7 @@
1
1
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
2
  import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
3
- import type { TextFormattingState } from '../types';
3
+ import type { TextFormattingState } from '@atlaskit/editor-common/types';
4
4
  import { pluginKey } from './plugin-key';
5
5
  import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
6
6
  export { pluginKey };
7
- export type { TextFormattingState };
8
7
  export declare const plugin: (dispatch: Dispatch, editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => SafePlugin<TextFormattingState>;
@@ -1,3 +1,3 @@
1
1
  import { PluginKey } from '@atlaskit/editor-prosemirror/state';
2
- import type { TextFormattingState } from '../types';
2
+ import type { TextFormattingState } from '@atlaskit/editor-common/types';
3
3
  export declare const pluginKey: PluginKey<TextFormattingState>;
@@ -1,4 +1,4 @@
1
- import type { MarkType, Mark as PMMark, Mark } from '@atlaskit/editor-prosemirror/model';
1
+ import type { Mark as PMMark } from '@atlaskit/editor-prosemirror/model';
2
2
  import type { EditorState } from '@atlaskit/editor-prosemirror/state';
3
3
  import type { MenuIconItem } from './ui/Toolbar/types';
4
4
  export declare const hasCode: (state: EditorState, pos: number) => boolean;
@@ -6,10 +6,6 @@ export declare const hasCode: (state: EditorState, pos: number) => boolean;
6
6
  * Determine if a mark (with specific attribute values) exists anywhere in the selection.
7
7
  */
8
8
  export declare const markActive: (state: EditorState, mark: PMMark) => boolean;
9
- /**
10
- * Determine if a mark of a specific type exists anywhere in the selection.
11
- */
12
- export declare const anyMarkActive: (state: EditorState, markType: Mark | MarkType) => boolean;
13
9
  export declare const checkFormattingIsPresent: (state: EditorState) => boolean;
14
10
  export declare const compareItemsArrays: (items: MenuIconItem[], prevItems: MenuIconItem[]) => MenuIconItem[];
15
11
  export declare const isArrayContainsContent: (items: MenuIconItem[], content: string) => boolean;
@@ -6,7 +6,7 @@ import type { CardOptions } from '@atlaskit/editor-common/card';
6
6
  import type { ExtensionHandlers, ExtensionProvider } from '@atlaskit/editor-common/extensions';
7
7
  import type { EditorPresetBuilder } from '@atlaskit/editor-common/preset';
8
8
  import type { ContextIdentifierProvider, Providers, SearchProvider } from '@atlaskit/editor-common/provider-factory';
9
- import type { AllEditorPresetPluginTypes, Transformer, LinkingOptions } from '@atlaskit/editor-common/types';
9
+ import type { AllEditorPresetPluginTypes, Transformer, LinkingOptions, TextFormattingOptions } from '@atlaskit/editor-common/types';
10
10
  import type { ErrorReportingHandler } from '@atlaskit/editor-common/utils';
11
11
  import type { PluginConfig as TablesPluginConfig } from '@atlaskit/editor-plugin-table/types';
12
12
  import type { MentionProvider } from '@atlaskit/mention/resource';
@@ -25,7 +25,6 @@ import type { PanelPluginConfig } from '../plugins/panel/types';
25
25
  import type { PlaceholderTextOptions } from '../plugins/placeholder-text/types';
26
26
  import type { QuickInsertOptions } from '../plugins/quick-insert/types';
27
27
  import type { TextColorPluginConfig } from '../plugins/text-color/pm-plugins/main';
28
- import type { TextFormattingOptions } from '../plugins/text-formatting/types';
29
28
  import type { MenuItem } from '@atlaskit/editor-common/ui-menu';
30
29
  import type { EditorAppearance } from './editor-appearance';
31
30
  import type { EditorOnChangeHandler } from './editor-onchange';
@@ -65,7 +64,6 @@ interface EditorBaseProps {
65
64
  contextPanel?: ReactComponents;
66
65
  errorReporterHandler?: ErrorReportingHandler;
67
66
  contentTransformerProvider?: (schema: Schema) => Transformer<string>;
68
- textFormatting?: TextFormattingOptions;
69
67
  maxHeight?: number;
70
68
  minHeight?: number;
71
69
  placeholder?: string;
@@ -88,7 +86,6 @@ interface EditorBaseProps {
88
86
  inputSamplingLimit?: number;
89
87
  extensionProviders?: ExtensionProvidersProp;
90
88
  UNSAFE_useAnalyticsContext?: boolean;
91
- codeBlock?: CodeBlockOptions;
92
89
  /**
93
90
  * @default undefined
94
91
  * @description Enables valid transaction events to be tracked in analytics (at a sampled rate)
@@ -145,22 +142,16 @@ export interface EditorSharedPropsWithPlugins {
145
142
  */
146
143
  performanceTracking?: PerformanceTracking;
147
144
  sanitizePrivateContent?: boolean;
148
- allowAnalyticsGASV3?: boolean;
149
145
  media?: MediaOptions;
150
146
  collabEdit?: CollabEditOptions;
151
- insertMenuItems?: MenuItem[];
147
+ codeBlock?: CodeBlockOptions;
148
+ textFormatting?: TextFormattingOptions;
152
149
  primaryToolbarComponents?: PrimaryToolbarComponents;
153
150
  allowUndoRedoButtons?: boolean;
154
- allowTables?: boolean | TablesPluginConfig;
155
- /** @deprecated Use smartLinks instead. */
156
- UNSAFE_cards?: CardOptions;
157
- /** @deprecated Use linking instead. */
158
- smartLinks?: CardOptions;
159
151
  /**
160
152
  * Configure and extend editor linking behaviour
161
153
  */
162
154
  linking?: LinkingOptions;
163
- contextIdentifierProvider?: Promise<ContextIdentifierProvider>;
164
155
  }
165
156
  export interface EditorProps extends EditorBaseProps, EditorPluginFeatureProps, EditorSharedPropsWithPlugins, EditorProviderProps {
166
157
  /**
@@ -189,6 +180,7 @@ export interface EditorProviderProps {
189
180
  mentionProvider?: Promise<MentionProvider>;
190
181
  autoformattingProvider?: Providers['autoformattingProvider'];
191
182
  macroProvider?: Providers['macroProvider'];
183
+ contextIdentifierProvider?: Promise<ContextIdentifierProvider>;
192
184
  }
193
185
  export interface EditorPluginFeatureProps {
194
186
  allowExpand?: boolean | {
@@ -254,4 +246,11 @@ export interface EditorPluginFeatureProps {
254
246
  waitForMediaUpload?: boolean;
255
247
  extensionHandlers?: ExtensionHandlers;
256
248
  allowTextColor?: boolean | TextColorPluginConfig;
249
+ allowTables?: boolean | TablesPluginConfig;
250
+ insertMenuItems?: MenuItem[];
251
+ /** @deprecated Use smartLinks instead. */
252
+ UNSAFE_cards?: CardOptions;
253
+ /** @deprecated Use linking instead. */
254
+ smartLinks?: CardOptions;
255
+ allowAnalyticsGASV3?: boolean;
257
256
  }
@@ -1,6 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  import React from 'react';
3
- import { SerializedStyles } from '@emotion/react';
3
+ import type { SerializedStyles } from '@emotion/react';
4
4
  import type { FeatureFlags } from '../../types/feature-flags';
5
5
  export declare const linkStyles: SerializedStyles;
6
6
  type ContentStylesProps = {
@@ -0,0 +1,2 @@
1
+ import type { EditorProps } from '../types/editor-props';
2
+ export default function editorDeprecationWarnings(props: EditorProps): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "187.10.8",
3
+ "version": "187.12.0",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -55,7 +55,7 @@
55
55
  "@atlaskit/code": "^14.6.0",
56
56
  "@atlaskit/date": "^0.10.0",
57
57
  "@atlaskit/datetime-picker": "^12.7.0",
58
- "@atlaskit/editor-common": "^74.34.0",
58
+ "@atlaskit/editor-common": "^74.35.0",
59
59
  "@atlaskit/editor-json-transformer": "^8.10.0",
60
60
  "@atlaskit/editor-markdown-transformer": "^5.2.5",
61
61
  "@atlaskit/editor-palette": "1.5.1",
@@ -140,7 +140,7 @@
140
140
  "@af/editor-libra": "*",
141
141
  "@af/integration-testing": "*",
142
142
  "@atlaskit/code": "^14.6.0",
143
- "@atlaskit/collab-provider": "9.7.4",
143
+ "@atlaskit/collab-provider": "9.8.0",
144
144
  "@atlaskit/dropdown-menu": "^11.11.0",
145
145
  "@atlaskit/editor-extension-dropbox": "^0.4.0",
146
146
  "@atlaskit/editor-plugin-table": "^2.6.0",
package/report.api.md CHANGED
@@ -156,6 +156,9 @@ import { setTextSelection } from '@atlaskit/editor-common/utils';
156
156
  import type { SEVERITY } from '@atlaskit/editor-common/utils';
157
157
  import type { TaskDecisionProvider } from '@atlaskit/task-decision';
158
158
  import { TeamMentionResource } from '@atlaskit/mention/team-resource';
159
+ import { InputMethodBasic as TextFormattingInputMethodBasic } from '@atlaskit/editor-common/types';
160
+ import { InputMethodToolbar as TextFormattingInputMethodToolbar } from '@atlaskit/editor-common/types';
161
+ import type { TextFormattingOptions } from '@atlaskit/editor-common/types';
159
162
  import { ToolbarUIComponentFactory } from '@atlaskit/editor-common/types';
160
163
  import type { Transaction } from '@atlaskit/editor-prosemirror/state';
161
164
  import { TransactionTracking } from '@atlaskit/editor-common/types';
@@ -579,6 +582,7 @@ export { DropdownOptionT };
579
582
 
580
583
  // @public (undocumented)
581
584
  export class Editor extends React_2.Component<EditorProps> {
585
+ constructor(props: EditorProps);
582
586
  // (undocumented)
583
587
  static defaultProps: EditorProps;
584
588
  // (undocumented)
@@ -652,8 +656,6 @@ interface EditorBaseProps {
652
656
  // (undocumented)
653
657
  assistiveLabel?: string;
654
658
  // (undocumented)
655
- codeBlock?: CodeBlockOptions;
656
- // (undocumented)
657
659
  contentComponents?: ReactComponents;
658
660
  // (undocumented)
659
661
  contentTransformerProvider?: (schema: Schema) => Transformer_2<string>;
@@ -706,8 +708,6 @@ interface EditorBaseProps {
706
708
  secondaryToolbarComponents?: ReactComponents;
707
709
  // (undocumented)
708
710
  shouldFocus?: boolean;
709
- // (undocumented)
710
- textFormatting?: TextFormattingOptions;
711
711
  trackValidTransactions?:
712
712
  | boolean
713
713
  | {
@@ -807,6 +807,8 @@ export { EditorPlugin };
807
807
 
808
808
  // @public (undocumented)
809
809
  interface EditorPluginFeatureProps {
810
+ // (undocumented)
811
+ allowAnalyticsGASV3?: boolean;
810
812
  // (undocumented)
811
813
  allowBlockType?: BlockTypePluginOptions['allowBlockType'];
812
814
  // (undocumented)
@@ -849,6 +851,8 @@ interface EditorPluginFeatureProps {
849
851
  menuDisabled: boolean;
850
852
  };
851
853
  // (undocumented)
854
+ allowTables?: PluginConfig | boolean;
855
+ // (undocumented)
852
856
  allowTasksAndDecisions?: boolean;
853
857
  // (undocumented)
854
858
  allowTemplatePlaceholders?: PlaceholderTextOptions | boolean;
@@ -869,6 +873,8 @@ interface EditorPluginFeatureProps {
869
873
  // (undocumented)
870
874
  feedbackInfo?: FeedbackInfo;
871
875
  // (undocumented)
876
+ insertMenuItems?: MenuItem[];
877
+ // (undocumented)
872
878
  maxContentSize?: number;
873
879
  // (undocumented)
874
880
  mention?: MentionPluginConfig;
@@ -876,7 +882,11 @@ interface EditorPluginFeatureProps {
876
882
  mentionInsertDisplayName?: boolean;
877
883
  // (undocumented)
878
884
  saveOnEnter?: boolean;
885
+ // @deprecated (undocumented)
886
+ smartLinks?: CardOptions;
879
887
  UNSAFE_allowBorderMark?: boolean;
888
+ // @deprecated (undocumented)
889
+ UNSAFE_cards?: CardOptions;
880
890
  // (undocumented)
881
891
  uploadErrorHandler?: (state: MediaState) => void;
882
892
  // (undocumented)
@@ -919,6 +929,8 @@ interface EditorProviderProps {
919
929
  // (undocumented)
920
930
  collabEditProvider?: Providers['collabEditProvider'];
921
931
  // (undocumented)
932
+ contextIdentifierProvider?: Promise<ContextIdentifierProvider>;
933
+ // (undocumented)
922
934
  emojiProvider?: Providers['emojiProvider'];
923
935
  // (undocumented)
924
936
  legacyImageUploadProvider?: Providers['imageUploadProvider'];
@@ -936,18 +948,12 @@ interface EditorProviderProps {
936
948
 
937
949
  // @public (undocumented)
938
950
  interface EditorSharedPropsWithPlugins {
939
- // (undocumented)
940
- allowAnalyticsGASV3?: boolean;
941
- // (undocumented)
942
- allowTables?: PluginConfig | boolean;
943
951
  // (undocumented)
944
952
  allowUndoRedoButtons?: boolean;
945
953
  // (undocumented)
946
- collabEdit?: CollabEditOptions;
947
- // (undocumented)
948
- contextIdentifierProvider?: Promise<ContextIdentifierProvider>;
954
+ codeBlock?: CodeBlockOptions;
949
955
  // (undocumented)
950
- insertMenuItems?: MenuItem[];
956
+ collabEdit?: CollabEditOptions;
951
957
  linking?: LinkingOptions;
952
958
  // (undocumented)
953
959
  media?: MediaOptions;
@@ -958,16 +964,12 @@ interface EditorSharedPropsWithPlugins {
958
964
  primaryToolbarComponents?: PrimaryToolbarComponents;
959
965
  // (undocumented)
960
966
  sanitizePrivateContent?: boolean;
961
- // @deprecated (undocumented)
962
- smartLinks?: CardOptions;
963
- // @deprecated (undocumented)
964
- UNSAFE_cards?: CardOptions;
967
+ // (undocumented)
968
+ textFormatting?: TextFormattingOptions;
965
969
  }
966
970
 
967
971
  // @public (undocumented)
968
972
  interface EditorViewProps {
969
- // (undocumented)
970
- allowAnalyticsGASV3?: boolean;
971
973
  // (undocumented)
972
974
  createAnalyticsEvent?: CreateUIAnalyticsEvent;
973
975
  // (undocumented)
@@ -2161,77 +2163,27 @@ export type TextColorPluginState = {
2161
2163
  color: null | string;
2162
2164
  };
2163
2165
 
2164
- // @public (undocumented)
2165
- export type TextFormattingInputMethodBasic =
2166
- | INPUT_METHOD.FORMATTING
2167
- | INPUT_METHOD.SHORTCUT
2168
- | TextFormattingInputMethodToolbar;
2169
-
2170
- // @public (undocumented)
2171
- export type TextFormattingInputMethodToolbar = INPUT_METHOD.TOOLBAR;
2172
-
2173
- // @public (undocumented)
2174
- interface TextFormattingOptions {
2175
- // (undocumented)
2176
- disableCode?: boolean;
2177
- // (undocumented)
2178
- disableSmartTextCompletion?: boolean;
2179
- // (undocumented)
2180
- disableSuperscriptAndSubscript?: boolean;
2181
- // (undocumented)
2182
- disableUnderline?: boolean;
2183
- // (undocumented)
2184
- responsiveToolbarMenu?: boolean;
2185
- }
2166
+ export { TextFormattingInputMethodBasic };
2186
2167
 
2187
- // @public (undocumented)
2188
- export interface TextFormattingState {
2189
- // (undocumented)
2190
- codeActive?: boolean;
2191
- // (undocumented)
2192
- codeDisabled?: boolean;
2193
- // (undocumented)
2194
- codeHidden?: boolean;
2195
- // (undocumented)
2196
- emActive?: boolean;
2197
- // (undocumented)
2198
- emDisabled?: boolean;
2199
- // (undocumented)
2200
- emHidden?: boolean;
2201
- // (undocumented)
2202
- strikeActive?: boolean;
2203
- // (undocumented)
2204
- strikeDisabled?: boolean;
2205
- // (undocumented)
2206
- strikeHidden?: boolean;
2207
- // (undocumented)
2208
- strongActive?: boolean;
2209
- // (undocumented)
2210
- strongDisabled?: boolean;
2211
- // (undocumented)
2212
- strongHidden?: boolean;
2213
- // (undocumented)
2214
- subscriptActive?: boolean;
2215
- // (undocumented)
2216
- subscriptDisabled?: boolean;
2217
- // (undocumented)
2218
- subscriptHidden?: boolean;
2219
- // (undocumented)
2220
- superscriptActive?: boolean;
2221
- // (undocumented)
2222
- superscriptDisabled?: boolean;
2223
- // (undocumented)
2224
- superscriptHidden?: boolean;
2225
- // (undocumented)
2226
- underlineActive?: boolean;
2227
- // (undocumented)
2228
- underlineDisabled?: boolean;
2229
- // (undocumented)
2230
- underlineHidden?: boolean;
2231
- }
2168
+ export { TextFormattingInputMethodToolbar };
2232
2169
 
2233
2170
  // @public (undocumented)
2234
- export const textFormattingStateKey: PluginKey<TextFormattingState>;
2171
+ export const textFormattingPlugin: NextEditorPlugin<
2172
+ 'textFormatting',
2173
+ {
2174
+ pluginConfiguration: TextFormattingOptions | undefined;
2175
+ dependencies: [OptionalPlugin<typeof analyticsPlugin>];
2176
+ actions: {
2177
+ toggleSuperscript: ToggleMarkWithAnalyticsCommand;
2178
+ toggleSubscript: ToggleMarkWithAnalyticsCommand;
2179
+ toggleStrike: ToggleMarkWithAnalyticsCommand;
2180
+ toggleCode: ToggleMarkWithAnalyticsCommand;
2181
+ toggleUnderline: ToggleMarkWithAnalyticsCommand;
2182
+ toggleEm: ToggleMarkWithAnalyticsCommand;
2183
+ toggleStrong: ToggleMarkWithAnalyticsCommand;
2184
+ };
2185
+ }
2186
+ >;
2235
2187
 
2236
2188
  // @public (undocumented)
2237
2189
  interface TextSelectionData {
@@ -2244,86 +2196,7 @@ interface TextSelectionData {
2244
2196
  }
2245
2197
 
2246
2198
  // @public (undocumented)
2247
- export const toggleCode: () => Command_2;
2248
-
2249
- // @public (undocumented)
2250
- export const toggleCodeWithAnalytics: (
2251
- editorAnalyticsAPI: EditorAnalyticsAPI | undefined,
2252
- ) => ({
2253
- inputMethod,
2254
- }: {
2255
- inputMethod: TextFormattingInputMethodBasic;
2256
- }) => Command_2;
2257
-
2258
- // @public (undocumented)
2259
- export const toggleEm: () => Command_2;
2260
-
2261
- // @public (undocumented)
2262
- export const toggleEmWithAnalytics: (
2263
- editorAnalyticsAPI: EditorAnalyticsAPI | undefined,
2264
- ) => ({
2265
- inputMethod,
2266
- }: {
2267
- inputMethod: TextFormattingInputMethodBasic;
2268
- }) => Command_2;
2269
-
2270
- // @public (undocumented)
2271
- export const toggleStrike: () => Command_2;
2272
-
2273
- // @public (undocumented)
2274
- export const toggleStrikeWithAnalytics: (
2275
- editorAnalyticsAPI: EditorAnalyticsAPI | undefined,
2276
- ) => ({
2277
- inputMethod,
2278
- }: {
2279
- inputMethod: TextFormattingInputMethodBasic;
2280
- }) => Command_2;
2281
-
2282
- // @public (undocumented)
2283
- export const toggleStrong: () => Command_2;
2284
-
2285
- // @public (undocumented)
2286
- export const toggleStrongWithAnalytics: (
2287
- editorAnalyticsAPI: EditorAnalyticsAPI | undefined,
2288
- ) => ({
2289
- inputMethod,
2290
- }: {
2291
- inputMethod: TextFormattingInputMethodBasic;
2292
- }) => Command_2;
2293
-
2294
- // @public (undocumented)
2295
- export const toggleSubscript: () => Command_2;
2296
-
2297
- // @public (undocumented)
2298
- export const toggleSubscriptWithAnalytics: (
2299
- editorAnalyticsAPI: EditorAnalyticsAPI | undefined,
2300
- ) => ({
2301
- inputMethod,
2302
- }: {
2303
- inputMethod: TextFormattingInputMethodBasic;
2304
- }) => Command_2;
2305
-
2306
- // @public (undocumented)
2307
- export const toggleSuperscript: () => Command_2;
2308
-
2309
- // @public (undocumented)
2310
- export const toggleSuperscriptWithAnalytics: (
2311
- editorAnalyticsAPI: EditorAnalyticsAPI | undefined,
2312
- ) => ({
2313
- inputMethod,
2314
- }: {
2315
- inputMethod: TextFormattingInputMethodBasic;
2316
- }) => Command_2;
2317
-
2318
- // @public (undocumented)
2319
- export const toggleUnderline: () => Command_2;
2320
-
2321
- // @public (undocumented)
2322
- export const toggleUnderlineWithAnalytics: (
2323
- editorAnalyticsAPI: EditorAnalyticsAPI | undefined,
2324
- ) => ({
2325
- inputMethod,
2326
- }: {
2199
+ type ToggleMarkWithAnalyticsCommand = (analyticsMetadata: {
2327
2200
  inputMethod: TextFormattingInputMethodBasic;
2328
2201
  }) => Command_2;
2329
2202