@atlaskit/editor-plugin-base 0.1.0 → 0.2.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,10 +1,97 @@
1
1
  # @atlaskit/editor-plugin-base
2
2
 
3
+ ## 0.2.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#39749](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/39749) [`e6b69f455c3`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e6b69f455c3) - Connect yarn changeset to packages, upgrade adf-schema
8
+
9
+ ## 0.2.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [#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.
14
+
15
+ This includes:
16
+
17
+ - All plugin keys
18
+ - Plugin commands
19
+ - Plugin types
20
+
21
+ The full list is:
22
+
23
+ - EditorFeatureFlags (available via '@atlaskit/editor-common/types' as `FeatureFlags`)
24
+ - EmojiResource (available via '@atlaskit/emoji/resource' as `EmojiResource`)
25
+ - mediaPlugin
26
+ - insertMediaSingleNode
27
+ - CustomMediaPicker
28
+ - mediaPluginKey
29
+ - textColorPluginKey
30
+ - TextColorPluginState
31
+ - changeColor
32
+ - CodeBlockPlugin
33
+ - PanelPlugin
34
+ - subscribeToToolbarAndPickerUpdates
35
+ - subscribeTypeAheadUpdates
36
+ - TextFormattingInputMethodToolbar
37
+ - TextFormattingInputMethodBasic
38
+ - createTable
39
+ - insertTaskDecisionCommand
40
+ - TaskDecisionInputMethod
41
+ - EventDispatcher
42
+ - statusPluginKey
43
+ - StatusState
44
+ - StatusType
45
+ - DatePluginState
46
+ - insertDate
47
+ - openDatePicker
48
+ - deleteDate
49
+ - dateToDateType
50
+ - datePluginKey
51
+ - commitStatusPicker
52
+ - setStatusPickerAt
53
+ - updateStatus
54
+ - updateStatusWithAnalytics
55
+ - removeStatus
56
+ - typeAheadPluginKey
57
+ - TypeAheadPluginState
58
+ - setKeyboardHeight
59
+ - setMobilePaddingTop
60
+ - setIsExpanded
61
+ - dedupe (available via '@atlaskit/editor-common/utils' as `dedupe`)
62
+ - GapCursorSelection (available via '@atlaskit/editor-common/selection' as `GapCursorSelection`)
63
+ - GapCursorSide (available via '@atlaskit/editor-common/selection' as `Side`)
64
+ - HistoryPluginState
65
+ - MentionPluginState
66
+ - InsertBlockInputMethodToolbar
67
+ - selectionPluginKey
68
+ - SelectionData
69
+ - SelectionDataState
70
+ - insertExpand
71
+ - createTypeAheadTools
72
+ - AbstractMentionResource (available via '@atlaskit/mention/resource' as `AbstractMentionResource`)
73
+ - PresenceResource (available via '@atlaskit/mention/resource' as `PresenceResource`)
74
+ - ReactEditorView
75
+ - BaseReactEditorView
76
+ - getDefaultPresetOptionsFromEditorProps
77
+ - lightModeStatusColorPalette
78
+ - darkModeStatusColorPalette
79
+ - PaletteColor
80
+ - DEFAULT_BORDER_COLOR
81
+
82
+ 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.
83
+
84
+ 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.
85
+
86
+ HOW: Should be no consumers using these methods currently (only mobile bridge which has been updated).
87
+
88
+ If there are any issues please reach out to the #help-editor for information on how to update appropriately.
89
+
3
90
  ## 0.1.0
4
91
 
5
92
  ### Minor Changes
6
93
 
7
- - [`f8e7203eec6`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f8e7203eec6) - ED-19618 Extract base plugin from editor-core
94
+ - [#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
95
 
9
96
  ### Patch Changes
10
97
 
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.1",
4
4
  "description": "Base 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": "^29.1.0",
35
- "@atlaskit/editor-common": "^76.0.0",
34
+ "@atlaskit/adf-schema": "^32.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