@atlaskit/editor-plugin-text-formatting 0.2.5 → 0.3.1

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.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`24e27147cbd`](https://bitbucket.org/atlassian/atlassian-frontend/commits/24e27147cbd) - Added atlaskit docs to all existing plugins.
8
+
9
+ ## 0.3.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [`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`.
14
+
3
15
  ## 0.2.5
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.5",
3
+ "version": "0.3.1",
4
4
  "description": "Text-formatting plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -32,7 +32,7 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@atlaskit/adf-schema": "28.1.2",
35
- "@atlaskit/editor-common": "^74.51.0",
35
+ "@atlaskit/editor-common": "^74.52.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",
@@ -47,10 +47,9 @@
47
47
  "react": "^16.8.0"
48
48
  },
49
49
  "devDependencies": {
50
- "@atlaskit/editor-plugin-composition": "^0.0.1",
50
+ "@atlaskit/editor-plugin-composition": "^0.0.2",
51
51
  "@atlaskit/editor-plugin-decorations": "^0.1.0",
52
52
  "@atlaskit/editor-plugin-feature-flags": "^0.1.0",
53
- "@atlaskit/editor-test-helpers": "^18.11.0",
54
53
  "@atlassian/atlassian-frontend-prettier-config-1.0.0": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.0",
55
54
  "@testing-library/react": "^12.1.5",
56
55
  "typescript": "~4.9.5"
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
 
@@ -1,37 +0,0 @@
1
- ## API Report File for "@atlaskit/editor-plugin-text-formatting"
2
-
3
- > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
-
5
- ```ts
6
-
7
- import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
8
- import type { EditorCommand } from '@atlaskit/editor-common/types';
9
- import type { InputMethodBasic } from '@atlaskit/editor-common/types';
10
- import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
11
- import type { OptionalPlugin } from '@atlaskit/editor-common/types';
12
- import type { TextFormattingOptions } from '@atlaskit/editor-common/types';
13
-
14
- // @public (undocumented)
15
- export type TextFormattingPlugin = NextEditorPlugin<'textFormatting', {
16
- pluginConfiguration: TextFormattingOptions | undefined;
17
- dependencies: [OptionalPlugin<typeof analyticsPlugin>];
18
- commands: {
19
- toggleSuperscript: ToggleMarkEditorCommand;
20
- toggleSubscript: ToggleMarkEditorCommand;
21
- toggleStrike: ToggleMarkEditorCommand;
22
- toggleCode: ToggleMarkEditorCommand;
23
- toggleUnderline: ToggleMarkEditorCommand;
24
- toggleEm: ToggleMarkEditorCommand;
25
- toggleStrong: ToggleMarkEditorCommand;
26
- };
27
- }>;
28
-
29
- // @public (undocumented)
30
- export const textFormattingPlugin: TextFormattingPlugin;
31
-
32
- // @public (undocumented)
33
- export type ToggleMarkEditorCommand = (inputMethod: InputMethodBasic) => EditorCommand;
34
-
35
- // (No @packageDocumentation comment for this package)
36
-
37
- ```