@atlaskit/editor-plugin-base 0.1.0 → 0.2.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,10 +1,91 @@
1
1
  # @atlaskit/editor-plugin-base
2
2
 
3
+ ## 0.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#40718](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/40718) [`c1d4b48bdd9`](https://bitbucket.org/atlassian/atlassian-frontend/commits/c1d4b48bdd9) - WHAT: This change removes plugin exports from editor-core that were used only for the mobile bridge.
8
+
9
+ This includes:
10
+
11
+ - All plugin keys
12
+ - Plugin commands
13
+ - Plugin types
14
+
15
+ The full list is:
16
+
17
+ - EditorFeatureFlags (available via '@atlaskit/editor-common/types' as `FeatureFlags`)
18
+ - EmojiResource (available via '@atlaskit/emoji/resource' as `EmojiResource`)
19
+ - mediaPlugin
20
+ - insertMediaSingleNode
21
+ - CustomMediaPicker
22
+ - mediaPluginKey
23
+ - textColorPluginKey
24
+ - TextColorPluginState
25
+ - changeColor
26
+ - CodeBlockPlugin
27
+ - PanelPlugin
28
+ - subscribeToToolbarAndPickerUpdates
29
+ - subscribeTypeAheadUpdates
30
+ - TextFormattingInputMethodToolbar
31
+ - TextFormattingInputMethodBasic
32
+ - createTable
33
+ - insertTaskDecisionCommand
34
+ - TaskDecisionInputMethod
35
+ - EventDispatcher
36
+ - statusPluginKey
37
+ - StatusState
38
+ - StatusType
39
+ - DatePluginState
40
+ - insertDate
41
+ - openDatePicker
42
+ - deleteDate
43
+ - dateToDateType
44
+ - datePluginKey
45
+ - commitStatusPicker
46
+ - setStatusPickerAt
47
+ - updateStatus
48
+ - updateStatusWithAnalytics
49
+ - removeStatus
50
+ - typeAheadPluginKey
51
+ - TypeAheadPluginState
52
+ - setKeyboardHeight
53
+ - setMobilePaddingTop
54
+ - setIsExpanded
55
+ - dedupe (available via '@atlaskit/editor-common/utils' as `dedupe`)
56
+ - GapCursorSelection (available via '@atlaskit/editor-common/selection' as `GapCursorSelection`)
57
+ - GapCursorSide (available via '@atlaskit/editor-common/selection' as `Side`)
58
+ - HistoryPluginState
59
+ - MentionPluginState
60
+ - InsertBlockInputMethodToolbar
61
+ - selectionPluginKey
62
+ - SelectionData
63
+ - SelectionDataState
64
+ - insertExpand
65
+ - createTypeAheadTools
66
+ - AbstractMentionResource (available via '@atlaskit/mention/resource' as `AbstractMentionResource`)
67
+ - PresenceResource (available via '@atlaskit/mention/resource' as `PresenceResource`)
68
+ - ReactEditorView
69
+ - BaseReactEditorView
70
+ - getDefaultPresetOptionsFromEditorProps
71
+ - lightModeStatusColorPalette
72
+ - darkModeStatusColorPalette
73
+ - PaletteColor
74
+ - DEFAULT_BORDER_COLOR
75
+
76
+ WHY: We have been extracting plugins out of `editor-core` and as we move them out we need to remove these exports as the new architecture does not support plugin keys or commands.
77
+
78
+ This major bump will remove all remaining commands and keys in one go - some of these features will be accessible in a safe manner in the future via the `ComposableEditor` and the appropriate plugins.
79
+
80
+ HOW: Should be no consumers using these methods currently (only mobile bridge which has been updated).
81
+
82
+ If there are any issues please reach out to the #help-editor for information on how to update appropriately.
83
+
3
84
  ## 0.1.0
4
85
 
5
86
  ### Minor Changes
6
87
 
7
- - [`f8e7203eec6`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f8e7203eec6) - ED-19618 Extract base plugin from editor-core
88
+ - [#40580](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/40580) [`f8e7203eec6`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f8e7203eec6) - ED-19618 Extract base plugin from editor-core
8
89
 
9
90
  ### Patch Changes
10
91
 
package/README.md CHANGED
@@ -30,4 +30,4 @@ For internal Atlassian, visit the slack channel [#help-editor](https://atlassian
30
30
 
31
31
  ## License
32
32
  ---
33
- Please see [Atlassian Frontend - License](https://developer.atlassian.com/cloud/framework/atlassian-frontend/#license) for more licensing information.
33
+ Please see [Atlassian Frontend - License](https://hello.atlassian.net/wiki/spaces/AF/pages/2589099144/Documentation#License) for more licensing information.
package/dist/cjs/index.js CHANGED
@@ -4,30 +4,10 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- Object.defineProperty(exports, "DEGRADED_SEVERITY_THRESHOLD", {
8
- enumerable: true,
9
- get: function get() {
10
- return _frozenEditor.DEGRADED_SEVERITY_THRESHOLD;
11
- }
12
- });
13
- Object.defineProperty(exports, "NORMAL_SEVERITY_THRESHOLD", {
14
- enumerable: true,
15
- get: function get() {
16
- return _frozenEditor.NORMAL_SEVERITY_THRESHOLD;
17
- }
18
- });
19
7
  Object.defineProperty(exports, "basePlugin", {
20
8
  enumerable: true,
21
9
  get: function get() {
22
10
  return _plugin.default;
23
11
  }
24
12
  });
25
- Object.defineProperty(exports, "setKeyboardHeight", {
26
- enumerable: true,
27
- get: function get() {
28
- return _commands.setKeyboardHeight;
29
- }
30
- });
31
- var _plugin = _interopRequireDefault(require("./plugin"));
32
- var _frozenEditor = require("./pm-plugins/frozen-editor");
33
- var _commands = require("./commands");
13
+ var _plugin = _interopRequireDefault(require("./plugin"));
@@ -13,6 +13,7 @@ var _utils = require("@atlaskit/editor-common/utils");
13
13
  var _commands = require("@atlaskit/editor-prosemirror/commands");
14
14
  var _history = require("@atlaskit/editor-prosemirror/history");
15
15
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
16
+ var _commands2 = require("./commands");
16
17
  var _contextIdentifier = _interopRequireWildcard(require("./pm-plugins/context-identifier"));
17
18
  var _disableSpellChecking = _interopRequireDefault(require("./pm-plugins/disable-spell-checking"));
18
19
  var _filterSteps = _interopRequireDefault(require("./pm-plugins/filter-steps"));
@@ -41,6 +42,9 @@ var basePlugin = function basePlugin(_ref) {
41
42
  keyboardHeight: (0, _scrollGutter.getKeyboardHeight)(editorState)
42
43
  };
43
44
  },
45
+ actions: {
46
+ setKeyboardHeight: _commands2.setKeyboardHeight
47
+ },
44
48
  pmPlugins: function pmPlugins() {
45
49
  var plugins = [{
46
50
  name: 'filterStepsPlugin',
@@ -1,4 +1,2 @@
1
1
  import basePlugin from './plugin';
2
- export { basePlugin };
3
- export { NORMAL_SEVERITY_THRESHOLD, DEGRADED_SEVERITY_THRESHOLD } from './pm-plugins/frozen-editor';
4
- export { setKeyboardHeight } from './commands';
2
+ export { basePlugin };
@@ -4,6 +4,7 @@ import { browser } from '@atlaskit/editor-common/utils';
4
4
  import { baseKeymap } from '@atlaskit/editor-prosemirror/commands';
5
5
  import { history } from '@atlaskit/editor-prosemirror/history';
6
6
  import { getBooleanFF } from '@atlaskit/platform-feature-flags';
7
+ import { setKeyboardHeight } from './commands';
7
8
  import contextIdentifierPlugin, { getContextIdentifier } from './pm-plugins/context-identifier';
8
9
  import disableSpellcheckingPlugin from './pm-plugins/disable-spell-checking';
9
10
  import filterStepsPlugin from './pm-plugins/filter-steps';
@@ -28,6 +29,9 @@ const basePlugin = ({
28
29
  keyboardHeight: getKeyboardHeight(editorState)
29
30
  };
30
31
  },
32
+ actions: {
33
+ setKeyboardHeight
34
+ },
31
35
  pmPlugins() {
32
36
  const plugins = [{
33
37
  name: 'filterStepsPlugin',
package/dist/esm/index.js CHANGED
@@ -1,4 +1,2 @@
1
1
  import basePlugin from './plugin';
2
- export { basePlugin };
3
- export { NORMAL_SEVERITY_THRESHOLD, DEGRADED_SEVERITY_THRESHOLD } from './pm-plugins/frozen-editor';
4
- export { setKeyboardHeight } from './commands';
2
+ export { basePlugin };
@@ -7,6 +7,7 @@ import { browser } from '@atlaskit/editor-common/utils';
7
7
  import { baseKeymap } from '@atlaskit/editor-prosemirror/commands';
8
8
  import { history } from '@atlaskit/editor-prosemirror/history';
9
9
  import { getBooleanFF } from '@atlaskit/platform-feature-flags';
10
+ import { setKeyboardHeight } from './commands';
10
11
  import contextIdentifierPlugin, { getContextIdentifier } from './pm-plugins/context-identifier';
11
12
  import disableSpellcheckingPlugin from './pm-plugins/disable-spell-checking';
12
13
  import filterStepsPlugin from './pm-plugins/filter-steps';
@@ -30,6 +31,9 @@ var basePlugin = function basePlugin(_ref) {
30
31
  keyboardHeight: getKeyboardHeight(editorState)
31
32
  };
32
33
  },
34
+ actions: {
35
+ setKeyboardHeight: setKeyboardHeight
36
+ },
33
37
  pmPlugins: function pmPlugins() {
34
38
  var plugins = [{
35
39
  name: 'filterStepsPlugin',
@@ -3,5 +3,3 @@ import type { BasePlugin, BasePluginOptions, BasePluginState } from './plugin';
3
3
  import type { ScrollGutterPluginOptions } from './pm-plugins/scroll-gutter';
4
4
  export { basePlugin };
5
5
  export type { BasePlugin, BasePluginState, BasePluginOptions, ScrollGutterPluginOptions, };
6
- export { NORMAL_SEVERITY_THRESHOLD, DEGRADED_SEVERITY_THRESHOLD, } from './pm-plugins/frozen-editor';
7
- export { setKeyboardHeight } from './commands';
@@ -1,6 +1,7 @@
1
1
  import type { ContextIdentifierProvider } from '@atlaskit/editor-common/provider-factory';
2
2
  import type { BrowserFreezetracking, InputTracking, NextEditorPlugin } from '@atlaskit/editor-common/types';
3
3
  import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
4
+ import { setKeyboardHeight } from './commands';
4
5
  import type { ScrollGutterPluginOptions } from './pm-plugins/scroll-gutter';
5
6
  export interface BasePluginOptions {
6
7
  allowScrollGutter?: ScrollGutterPluginOptions;
@@ -18,6 +19,9 @@ export type BasePlugin = NextEditorPlugin<'base', {
18
19
  pluginConfiguration: BasePluginOptions | undefined;
19
20
  dependencies: [FeatureFlagsPlugin];
20
21
  sharedState: BasePluginState;
22
+ actions: {
23
+ setKeyboardHeight: typeof setKeyboardHeight;
24
+ };
21
25
  }>;
22
26
  export declare const isChromeWithSelectionBug: any;
23
27
  declare const basePlugin: BasePlugin;
@@ -3,5 +3,3 @@ import type { BasePlugin, BasePluginOptions, BasePluginState } from './plugin';
3
3
  import type { ScrollGutterPluginOptions } from './pm-plugins/scroll-gutter';
4
4
  export { basePlugin };
5
5
  export type { BasePlugin, BasePluginState, BasePluginOptions, ScrollGutterPluginOptions, };
6
- export { NORMAL_SEVERITY_THRESHOLD, DEGRADED_SEVERITY_THRESHOLD, } from './pm-plugins/frozen-editor';
7
- export { setKeyboardHeight } from './commands';
@@ -1,6 +1,7 @@
1
1
  import type { ContextIdentifierProvider } from '@atlaskit/editor-common/provider-factory';
2
2
  import type { BrowserFreezetracking, InputTracking, NextEditorPlugin } from '@atlaskit/editor-common/types';
3
3
  import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
4
+ import { setKeyboardHeight } from './commands';
4
5
  import type { ScrollGutterPluginOptions } from './pm-plugins/scroll-gutter';
5
6
  export interface BasePluginOptions {
6
7
  allowScrollGutter?: ScrollGutterPluginOptions;
@@ -20,6 +21,9 @@ export type BasePlugin = NextEditorPlugin<'base', {
20
21
  FeatureFlagsPlugin
21
22
  ];
22
23
  sharedState: BasePluginState;
24
+ actions: {
25
+ setKeyboardHeight: typeof setKeyboardHeight;
26
+ };
23
27
  }>;
24
28
  export declare const isChromeWithSelectionBug: any;
25
29
  declare const basePlugin: BasePlugin;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-base",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Base 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": "^29.1.0",
35
- "@atlaskit/editor-common": "^76.0.0",
35
+ "@atlaskit/editor-common": "^76.1.0",
36
36
  "@atlaskit/editor-plugin-feature-flags": "^1.0.1",
37
37
  "@atlaskit/editor-prosemirror": "1.1.0",
38
38
  "@atlaskit/platform-feature-flags": "^0.2.0",
package/report.api.md CHANGED
@@ -30,6 +30,9 @@ export type BasePlugin = NextEditorPlugin<
30
30
  pluginConfiguration: BasePluginOptions | undefined;
31
31
  dependencies: [FeatureFlagsPlugin];
32
32
  sharedState: BasePluginState;
33
+ actions: {
34
+ setKeyboardHeight: typeof setKeyboardHeight;
35
+ };
33
36
  }
34
37
  >;
35
38
 
@@ -56,12 +59,6 @@ export type BasePluginState = {
56
59
  keyboardHeight: number | undefined;
57
60
  };
58
61
 
59
- // @public (undocumented)
60
- export const DEGRADED_SEVERITY_THRESHOLD = 3000;
61
-
62
- // @public (undocumented)
63
- export const NORMAL_SEVERITY_THRESHOLD = 2000;
64
-
65
62
  // @public (undocumented)
66
63
  export type ScrollGutterPluginOptions = {
67
64
  getScrollElement?: (view: EditorView) => HTMLElement | null;
@@ -71,7 +68,7 @@ export type ScrollGutterPluginOptions = {
71
68
  };
72
69
 
73
70
  // @public (undocumented)
74
- export const setKeyboardHeight: (keyboardHeight: number) => Command;
71
+ const setKeyboardHeight: (keyboardHeight: number) => Command;
75
72
 
76
73
  // (No @packageDocumentation comment for this package)
77
74
  ```
@@ -17,6 +17,9 @@ export type BasePlugin = NextEditorPlugin<'base', {
17
17
  pluginConfiguration: BasePluginOptions | undefined;
18
18
  dependencies: [FeatureFlagsPlugin];
19
19
  sharedState: BasePluginState;
20
+ actions: {
21
+ setKeyboardHeight: typeof setKeyboardHeight;
22
+ };
20
23
  }>;
21
24
 
22
25
  // @public (undocumented)
@@ -42,12 +45,6 @@ export type BasePluginState = {
42
45
  keyboardHeight: number | undefined;
43
46
  };
44
47
 
45
- // @public (undocumented)
46
- export const DEGRADED_SEVERITY_THRESHOLD = 3000;
47
-
48
- // @public (undocumented)
49
- export const NORMAL_SEVERITY_THRESHOLD = 2000;
50
-
51
48
  // @public (undocumented)
52
49
  export type ScrollGutterPluginOptions = {
53
50
  getScrollElement?: (view: EditorView) => HTMLElement | null;
@@ -57,7 +54,7 @@ export type ScrollGutterPluginOptions = {
57
54
  };
58
55
 
59
56
  // @public (undocumented)
60
- export const setKeyboardHeight: (keyboardHeight: number) => Command;
57
+ const setKeyboardHeight: (keyboardHeight: number) => Command;
61
58
 
62
59
  // (No @packageDocumentation comment for this package)
63
60