@atlaskit/editor-plugin-base 7.2.7 → 7.2.9

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,24 @@
1
1
  # @atlaskit/editor-plugin-base
2
2
 
3
+ ## 7.2.9
4
+
5
+ ### Patch Changes
6
+
7
+ - [`1ba00564a98cd`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1ba00564a98cd) -
8
+ Add allowScrollGutter to editor plugin base shared state
9
+ - [`1ba00564a98cd`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1ba00564a98cd) -
10
+ Moves the scroll gutter fix behind platform_editor_scroll_gutter_fix out of the hydratable ui
11
+ experiment
12
+ - Updated dependencies
13
+
14
+ ## 7.2.8
15
+
16
+ ### Patch Changes
17
+
18
+ - [`8cf337169ee4b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8cf337169ee4b) -
19
+ Remove the jira advanced code blocks experiment
20
+ - Updated dependencies
21
+
3
22
  ## 7.2.7
4
23
 
5
24
  ### Patch Changes
@@ -11,8 +11,6 @@ var _adfSchema = require("@atlaskit/adf-schema");
11
11
  var _keymaps = require("@atlaskit/editor-common/keymaps");
12
12
  var _commands = require("@atlaskit/editor-prosemirror/commands");
13
13
  var _prosemirrorHistory = require("@atlaskit/prosemirror-history");
14
- var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
15
- var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
16
14
  var _setKeyboardHeight = require("./editor-commands/set-keyboard-height");
17
15
  var _disableSpellChecking = _interopRequireDefault(require("./pm-plugins/disable-spell-checking"));
18
16
  var _filterSteps = _interopRequireDefault(require("./pm-plugins/filter-steps"));
@@ -85,6 +83,7 @@ var basePlugin = function basePlugin(_ref) {
85
83
  name: 'base',
86
84
  getSharedState: function getSharedState(editorState) {
87
85
  return {
86
+ allowScrollGutter: options === null || options === void 0 ? void 0 : options.allowScrollGutter,
88
87
  keyboardHeight: (0, _getKeyboardHeight.getKeyboardHeight)(editorState)
89
88
  };
90
89
  },
@@ -105,16 +104,12 @@ var basePlugin = function basePlugin(_ref) {
105
104
  return (0, _filterSteps.default)(dispatchAnalyticsEvent);
106
105
  }
107
106
  }];
108
- if ((0, _experiments.editorExperiment)('platform_editor_exp_lazy_node_views', true, {
109
- exposure: true
110
- }) || (0, _expValEquals.expValEquals)('platform_editor_jira_advanced_code_blocks', 'isEnabled', true)) {
111
- plugins.push({
112
- name: 'lazyNodeViewDecorationsPlugin',
113
- plugin: function plugin() {
114
- return (0, _lazyNodeViewDecoration.createLazyNodeViewDecorationPlugin)();
115
- }
116
- });
117
- }
107
+ plugins.push({
108
+ name: 'lazyNodeViewDecorationsPlugin',
109
+ plugin: function plugin() {
110
+ return (0, _lazyNodeViewDecoration.createLazyNodeViewDecorationPlugin)();
111
+ }
112
+ });
118
113
 
119
114
  // In Chrome, when the selection is placed between adjacent nodes which are not contenteditatble
120
115
  // the cursor appears at the right most point of the parent container.
@@ -14,11 +14,9 @@ var GUTTER_SELECTOR_NAME = 'editor-scroll-gutter';
14
14
  * Create a gutter element that can be added or removed from the DOM.
15
15
  */
16
16
  function createGutter(gutterSize, parent) {
17
- if ((0, _expVal.expVal)('platform_editor_hydratable_ui', 'isEnabled', false)) {
17
+ if ((0, _expVal.expVal)('platform_editor_scroll_gutter_fix', 'isEnabled', false)) {
18
18
  var gutterRef = document.getElementById(GUTTER_SELECTOR_NAME);
19
19
  if (gutterRef) {
20
- gutterRef.style.paddingBottom = "".concat(gutterSize, "px");
21
- gutterRef.style.display = 'block';
22
20
  return function () {
23
21
  return parent === null || parent === void 0 ? void 0 : parent.removeChild(gutterRef);
24
22
  };
@@ -2,8 +2,6 @@ import { doc, paragraph, text } from '@atlaskit/adf-schema';
2
2
  import { keymap } from '@atlaskit/editor-common/keymaps';
3
3
  import { baseKeymap } from '@atlaskit/editor-prosemirror/commands';
4
4
  import { history } from '@atlaskit/prosemirror-history';
5
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
6
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
7
5
  import { setKeyboardHeight } from './editor-commands/set-keyboard-height';
8
6
  import disableSpellcheckingPlugin from './pm-plugins/disable-spell-checking';
9
7
  import filterStepsPlugin from './pm-plugins/filter-steps';
@@ -82,6 +80,7 @@ const basePlugin = ({
82
80
  name: 'base',
83
81
  getSharedState(editorState) {
84
82
  return {
83
+ allowScrollGutter: options === null || options === void 0 ? void 0 : options.allowScrollGutter,
85
84
  keyboardHeight: getKeyboardHeight(editorState)
86
85
  };
87
86
  },
@@ -99,14 +98,10 @@ const basePlugin = ({
99
98
  dispatchAnalyticsEvent
100
99
  }) => filterStepsPlugin(dispatchAnalyticsEvent)
101
100
  }];
102
- if (editorExperiment('platform_editor_exp_lazy_node_views', true, {
103
- exposure: true
104
- }) || expValEquals('platform_editor_jira_advanced_code_blocks', 'isEnabled', true)) {
105
- plugins.push({
106
- name: 'lazyNodeViewDecorationsPlugin',
107
- plugin: () => createLazyNodeViewDecorationPlugin()
108
- });
109
- }
101
+ plugins.push({
102
+ name: 'lazyNodeViewDecorationsPlugin',
103
+ plugin: () => createLazyNodeViewDecorationPlugin()
104
+ });
110
105
 
111
106
  // In Chrome, when the selection is placed between adjacent nodes which are not contenteditatble
112
107
  // the cursor appears at the right most point of the parent container.
@@ -8,11 +8,9 @@ const GUTTER_SELECTOR_NAME = 'editor-scroll-gutter';
8
8
  * Create a gutter element that can be added or removed from the DOM.
9
9
  */
10
10
  function createGutter(gutterSize, parent) {
11
- if (expVal('platform_editor_hydratable_ui', 'isEnabled', false)) {
11
+ if (expVal('platform_editor_scroll_gutter_fix', 'isEnabled', false)) {
12
12
  const gutterRef = document.getElementById(GUTTER_SELECTOR_NAME);
13
13
  if (gutterRef) {
14
- gutterRef.style.paddingBottom = `${gutterSize}px`;
15
- gutterRef.style.display = 'block';
16
14
  return () => parent === null || parent === void 0 ? void 0 : parent.removeChild(gutterRef);
17
15
  }
18
16
  }
@@ -5,8 +5,6 @@ import { doc, paragraph, text } from '@atlaskit/adf-schema';
5
5
  import { keymap } from '@atlaskit/editor-common/keymaps';
6
6
  import { baseKeymap } from '@atlaskit/editor-prosemirror/commands';
7
7
  import { history } from '@atlaskit/prosemirror-history';
8
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
9
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
10
8
  import { setKeyboardHeight } from './editor-commands/set-keyboard-height';
11
9
  import disableSpellcheckingPlugin from './pm-plugins/disable-spell-checking';
12
10
  import filterStepsPlugin from './pm-plugins/filter-steps';
@@ -77,6 +75,7 @@ var basePlugin = function basePlugin(_ref) {
77
75
  name: 'base',
78
76
  getSharedState: function getSharedState(editorState) {
79
77
  return {
78
+ allowScrollGutter: options === null || options === void 0 ? void 0 : options.allowScrollGutter,
80
79
  keyboardHeight: getKeyboardHeight(editorState)
81
80
  };
82
81
  },
@@ -97,16 +96,12 @@ var basePlugin = function basePlugin(_ref) {
97
96
  return filterStepsPlugin(dispatchAnalyticsEvent);
98
97
  }
99
98
  }];
100
- if (editorExperiment('platform_editor_exp_lazy_node_views', true, {
101
- exposure: true
102
- }) || expValEquals('platform_editor_jira_advanced_code_blocks', 'isEnabled', true)) {
103
- plugins.push({
104
- name: 'lazyNodeViewDecorationsPlugin',
105
- plugin: function plugin() {
106
- return createLazyNodeViewDecorationPlugin();
107
- }
108
- });
109
- }
99
+ plugins.push({
100
+ name: 'lazyNodeViewDecorationsPlugin',
101
+ plugin: function plugin() {
102
+ return createLazyNodeViewDecorationPlugin();
103
+ }
104
+ });
110
105
 
111
106
  // In Chrome, when the selection is placed between adjacent nodes which are not contenteditatble
112
107
  // the cursor appears at the right most point of the parent container.
@@ -8,11 +8,9 @@ var GUTTER_SELECTOR_NAME = 'editor-scroll-gutter';
8
8
  * Create a gutter element that can be added or removed from the DOM.
9
9
  */
10
10
  function createGutter(gutterSize, parent) {
11
- if (expVal('platform_editor_hydratable_ui', 'isEnabled', false)) {
11
+ if (expVal('platform_editor_scroll_gutter_fix', 'isEnabled', false)) {
12
12
  var gutterRef = document.getElementById(GUTTER_SELECTOR_NAME);
13
13
  if (gutterRef) {
14
- gutterRef.style.paddingBottom = "".concat(gutterSize, "px");
15
- gutterRef.style.display = 'block';
16
14
  return function () {
17
15
  return parent === null || parent === void 0 ? void 0 : parent.removeChild(gutterRef);
18
16
  };
@@ -18,6 +18,7 @@ export interface BasePluginOptions {
18
18
  inputTracking?: InputTracking;
19
19
  }
20
20
  export type BasePluginState = {
21
+ allowScrollGutter?: ScrollGutterPluginOptions;
21
22
  /** Current height of keyboard (+ custom toolbar) in iOS app */
22
23
  keyboardHeight: number | undefined;
23
24
  };
@@ -18,6 +18,7 @@ export interface BasePluginOptions {
18
18
  inputTracking?: InputTracking;
19
19
  }
20
20
  export type BasePluginState = {
21
+ allowScrollGutter?: ScrollGutterPluginOptions;
21
22
  /** Current height of keyboard (+ custom toolbar) in iOS app */
22
23
  keyboardHeight: number | undefined;
23
24
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-base",
3
- "version": "7.2.7",
3
+ "version": "7.2.9",
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
  "@atlaskit/editor-plugin-feature-flags": "^5.0.0",
33
33
  "@atlaskit/editor-prosemirror": "7.0.0",
34
34
  "@atlaskit/prosemirror-history": "^0.2.0",
35
- "@atlaskit/tmp-editor-statsig": "^14.5.0",
35
+ "@atlaskit/tmp-editor-statsig": "^15.3.0",
36
36
  "@babel/runtime": "^7.0.0"
37
37
  },
38
38
  "techstack": {
@@ -74,6 +74,6 @@
74
74
  }
75
75
  },
76
76
  "peerDependencies": {
77
- "@atlaskit/editor-common": "^110.38.0"
77
+ "@atlaskit/editor-common": "^110.41.0"
78
78
  }
79
79
  }