@atlaskit/editor-plugin-text-formatting 0.2.4 → 0.3.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,17 @@
1
1
  # @atlaskit/editor-plugin-text-formatting
2
2
 
3
+ ## 0.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`4795a87a349`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4795a87a349) - Migrating some actions of `editor-plugin-list` to commands. Adding sharedState for `editor-plugin-text-formatting`.
8
+
9
+ ## 0.2.5
10
+
11
+ ### Patch Changes
12
+
13
+ - [`33cb07de05f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/33cb07de05f) - change adf-schema to fixed versioning
14
+
3
15
  ## 0.2.4
4
16
 
5
17
  ### Patch Changes
@@ -91,6 +91,12 @@ var textFormattingPlugin = function textFormattingPlugin() {
91
91
  }
92
92
  }];
93
93
  },
94
+ getSharedState: function getSharedState(editorState) {
95
+ if (!editorState) {
96
+ return undefined;
97
+ }
98
+ return _main.pluginKey.getState(editorState);
99
+ },
94
100
  primaryToolbarComponent: function primaryToolbarComponent(_ref5) {
95
101
  var editorView = _ref5.editorView,
96
102
  popupsMountPoint = _ref5.popupsMountPoint,
@@ -82,6 +82,12 @@ export const textFormattingPlugin = (options = {}, api) => {
82
82
  }
83
83
  }];
84
84
  },
85
+ getSharedState(editorState) {
86
+ if (!editorState) {
87
+ return undefined;
88
+ }
89
+ return textFormattingPluginKey.getState(editorState);
90
+ },
85
91
  primaryToolbarComponent({
86
92
  editorView,
87
93
  popupsMountPoint,
@@ -84,6 +84,12 @@ export var textFormattingPlugin = function textFormattingPlugin() {
84
84
  }
85
85
  }];
86
86
  },
87
+ getSharedState: function getSharedState(editorState) {
88
+ if (!editorState) {
89
+ return undefined;
90
+ }
91
+ return textFormattingPluginKey.getState(editorState);
92
+ },
87
93
  primaryToolbarComponent: function primaryToolbarComponent(_ref5) {
88
94
  var editorView = _ref5.editorView,
89
95
  popupsMountPoint = _ref5.popupsMountPoint,
@@ -1,4 +1,4 @@
1
- import type { NextEditorPlugin, OptionalPlugin, TextFormattingOptions } from '@atlaskit/editor-common/types';
1
+ import type { NextEditorPlugin, OptionalPlugin, TextFormattingOptions, TextFormattingState } from '@atlaskit/editor-common/types';
2
2
  import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
3
3
  import type { ToggleMarkEditorCommand } from './commands';
4
4
  export type TextFormattingPlugin = NextEditorPlugin<'textFormatting', {
@@ -13,5 +13,6 @@ export type TextFormattingPlugin = NextEditorPlugin<'textFormatting', {
13
13
  toggleEm: ToggleMarkEditorCommand;
14
14
  toggleStrong: ToggleMarkEditorCommand;
15
15
  };
16
+ sharedState: TextFormattingState | undefined;
16
17
  }>;
17
18
  export declare const textFormattingPlugin: TextFormattingPlugin;
@@ -1,4 +1,4 @@
1
- import type { NextEditorPlugin, OptionalPlugin, TextFormattingOptions } from '@atlaskit/editor-common/types';
1
+ import type { NextEditorPlugin, OptionalPlugin, TextFormattingOptions, TextFormattingState } from '@atlaskit/editor-common/types';
2
2
  import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
3
3
  import type { ToggleMarkEditorCommand } from './commands';
4
4
  export type TextFormattingPlugin = NextEditorPlugin<'textFormatting', {
@@ -15,5 +15,6 @@ export type TextFormattingPlugin = NextEditorPlugin<'textFormatting', {
15
15
  toggleEm: ToggleMarkEditorCommand;
16
16
  toggleStrong: ToggleMarkEditorCommand;
17
17
  };
18
+ sharedState: TextFormattingState | undefined;
18
19
  }>;
19
20
  export declare const textFormattingPlugin: TextFormattingPlugin;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-text-formatting",
3
- "version": "0.2.4",
3
+ "version": "0.3.0",
4
4
  "description": "Text-formatting plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -31,8 +31,8 @@
31
31
  ".": "./src/index.ts"
32
32
  },
33
33
  "dependencies": {
34
- "@atlaskit/adf-schema": "^28.0.0",
35
- "@atlaskit/editor-common": "^74.48.0",
34
+ "@atlaskit/adf-schema": "28.1.2",
35
+ "@atlaskit/editor-common": "^74.51.0",
36
36
  "@atlaskit/editor-plugin-analytics": "^0.1.0",
37
37
  "@atlaskit/editor-prosemirror": "1.1.0",
38
38
  "@atlaskit/editor-shared-styles": "^2.5.0",
package/report.api.md CHANGED
@@ -21,6 +21,7 @@ import type { InputMethodBasic } from '@atlaskit/editor-common/types';
21
21
  import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
22
22
  import type { OptionalPlugin } from '@atlaskit/editor-common/types';
23
23
  import type { TextFormattingOptions } from '@atlaskit/editor-common/types';
24
+ import type { TextFormattingState } from '@atlaskit/editor-common/types';
24
25
 
25
26
  // @public (undocumented)
26
27
  export type TextFormattingPlugin = NextEditorPlugin<
@@ -37,6 +38,7 @@ export type TextFormattingPlugin = NextEditorPlugin<
37
38
  toggleEm: ToggleMarkEditorCommand;
38
39
  toggleStrong: ToggleMarkEditorCommand;
39
40
  };
41
+ sharedState: TextFormattingState | undefined;
40
42
  }
41
43
  >;
42
44
 
@@ -10,6 +10,7 @@ import type { InputMethodBasic } from '@atlaskit/editor-common/types';
10
10
  import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
11
11
  import type { OptionalPlugin } from '@atlaskit/editor-common/types';
12
12
  import type { TextFormattingOptions } from '@atlaskit/editor-common/types';
13
+ import type { TextFormattingState } from '@atlaskit/editor-common/types';
13
14
 
14
15
  // @public (undocumented)
15
16
  export type TextFormattingPlugin = NextEditorPlugin<'textFormatting', {
@@ -24,6 +25,7 @@ export type TextFormattingPlugin = NextEditorPlugin<'textFormatting', {
24
25
  toggleEm: ToggleMarkEditorCommand;
25
26
  toggleStrong: ToggleMarkEditorCommand;
26
27
  };
28
+ sharedState: TextFormattingState | undefined;
27
29
  }>;
28
30
 
29
31
  // @public (undocumented)