@atlaskit/editor-plugin-text-formatting 6.1.8 → 6.1.10

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,22 @@
1
1
  # @atlaskit/editor-plugin-text-formatting
2
2
 
3
+ ## 6.1.10
4
+
5
+ ### Patch Changes
6
+
7
+ - [`4d676bbdb3ce6`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4d676bbdb3ce6) -
8
+ ts-ignore added temporarily to unblock local consumption for help-center, will be removed once
9
+ project refs are setup
10
+ - Updated dependencies
11
+
12
+ ## 6.1.9
13
+
14
+ ### Patch Changes
15
+
16
+ - [`a05464ea42678`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a05464ea42678) -
17
+ EDITOR-2791 bump adf-schema
18
+ - Updated dependencies
19
+
3
20
  ## 6.1.8
4
21
 
5
22
  ### Patch Changes
@@ -11,11 +11,13 @@ var pluginKey = exports.pluginKey = new _state.PluginKey('clearFormattingPlugin'
11
11
  var plugin = exports.plugin = function plugin(dispatch) {
12
12
  return new _safePlugin.SafePlugin({
13
13
  state: {
14
+ // @ts-ignore - Workaround for help-center local consumption
14
15
  init: function init(_config, state) {
15
16
  return {
16
17
  formattingIsPresent: (0, _utils.checkFormattingIsPresent)(state)
17
18
  };
18
19
  },
20
+ // @ts-ignore - Workaround for help-center local consumption
19
21
  apply: function apply(_tr, pluginState, _oldState, newState) {
20
22
  var formattingIsPresent = (0, _utils.checkFormattingIsPresent)(newState);
21
23
  if (formattingIsPresent !== pluginState.formattingIsPresent) {
@@ -9,6 +9,7 @@ var _state = require("@atlaskit/editor-prosemirror/state");
9
9
  // eslint-disable-next-line import/no-anonymous-default-export
10
10
  var _default = exports.default = new _safePlugin.SafePlugin({
11
11
  props: {
12
+ // @ts-ignore - Workaround for help-center local consumption
12
13
  handleClick: function handleClick(view, clickPos, event) {
13
14
  // Don't apply in Edge as per ED-4546
14
15
  // Ignored via go/ees005
@@ -119,6 +119,7 @@ function keymapPlugin(schema, editorAnalyticsAPI) {
119
119
  };
120
120
  return new _safePlugin.SafePlugin({
121
121
  props: {
122
+ // @ts-ignore - Workaround for help-center local consumption
122
123
  handleKeyDown: function handleKeyDown(view, event) {
123
124
  var keyboardEvent = (0, _keymaps.isCapsLockOnAndModifyKeyboardEvent)(event);
124
125
  var keymapList = (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') ? getEnabledKeylist(view) : list;
@@ -65,7 +65,9 @@ var getTextFormattingState = function getTextFormattingState(editorState, editor
65
65
  type: 'sub'
66
66
  }), 'subscript'], [subsup === null || subsup === void 0 ? void 0 : subsup.create({
67
67
  type: 'sup'
68
- }), 'superscript']].filter(function (_ref) {
68
+ }), 'superscript']]
69
+ // @ts-ignore - Workaround for help-center local consumption
70
+ .filter(function (_ref) {
69
71
  var _ref2 = (0, _slicedToArray2.default)(_ref, 1),
70
72
  mark = _ref2[0];
71
73
  return mark;
@@ -132,9 +134,11 @@ var getTextFormattingState = function getTextFormattingState(editorState, editor
132
134
  var plugin = exports.plugin = function plugin(dispatch, editorAnalyticsAPI) {
133
135
  return new _safePlugin.SafePlugin({
134
136
  state: {
137
+ // @ts-ignore - Workaround for help-center local consumption
135
138
  init: function init(_config, state) {
136
139
  return getTextFormattingState(state, editorAnalyticsAPI);
137
140
  },
141
+ // @ts-ignore - Workaround for help-center local consumption
138
142
  apply: function apply(_tr, pluginState, _oldState, newState) {
139
143
  var state = getTextFormattingState(newState, editorAnalyticsAPI);
140
144
  if (!(0, _utils.shallowEqual)(pluginState, state)) {
@@ -146,6 +150,7 @@ var plugin = exports.plugin = function plugin(dispatch, editorAnalyticsAPI) {
146
150
  },
147
151
  key: _pluginKey.pluginKey,
148
152
  props: {
153
+ // @ts-ignore - Workaround for help-center local consumption
149
154
  handleKeyDown: function handleKeyDown(view, event) {
150
155
  var _pluginKey$getState;
151
156
  var state = view.state,
@@ -160,6 +165,7 @@ var plugin = exports.plugin = function plugin(dispatch, editorAnalyticsAPI) {
160
165
  }
161
166
  return false;
162
167
  },
168
+ // @ts-ignore - Workaround for help-center local consumption
163
169
  handleTextInput: function handleTextInput(view, from, to, text) {
164
170
  var state = view.state,
165
171
  dispatch = view.dispatch;
@@ -4,11 +4,15 @@ import { checkFormattingIsPresent } from '../editor-commands/utils';
4
4
  export const pluginKey = new PluginKey('clearFormattingPlugin');
5
5
  export const plugin = dispatch => new SafePlugin({
6
6
  state: {
7
+ // @ts-ignore - Workaround for help-center local consumption
8
+
7
9
  init(_config, state) {
8
10
  return {
9
11
  formattingIsPresent: checkFormattingIsPresent(state)
10
12
  };
11
13
  },
14
+ // @ts-ignore - Workaround for help-center local consumption
15
+
12
16
  apply(_tr, pluginState, _oldState, newState) {
13
17
  const formattingIsPresent = checkFormattingIsPresent(newState);
14
18
  if (formattingIsPresent !== pluginState.formattingIsPresent) {
@@ -3,6 +3,7 @@ import { TextSelection } from '@atlaskit/editor-prosemirror/state';
3
3
  // eslint-disable-next-line import/no-anonymous-default-export
4
4
  export default new SafePlugin({
5
5
  props: {
6
+ // @ts-ignore - Workaround for help-center local consumption
6
7
  handleClick(view, clickPos, event) {
7
8
  // Don't apply in Edge as per ED-4546
8
9
  // Ignored via go/ees005
@@ -113,6 +113,8 @@ export default function keymapPlugin(schema, editorAnalyticsAPI) {
113
113
  };
114
114
  return new SafePlugin({
115
115
  props: {
116
+ // @ts-ignore - Workaround for help-center local consumption
117
+
116
118
  handleKeyDown(view, event) {
117
119
  const keyboardEvent = isCapsLockOnAndModifyKeyboardEvent(event);
118
120
  const keymapList = editorExperiment('platform_editor_controls', 'variant1') ? getEnabledKeylist(view) : list;
@@ -55,7 +55,9 @@ const getTextFormattingState = (editorState, editorAnalyticsAPI) => {
55
55
  type: 'sub'
56
56
  }), 'subscript'], [subsup === null || subsup === void 0 ? void 0 : subsup.create({
57
57
  type: 'sup'
58
- }), 'superscript']].filter(([mark]) => mark);
58
+ }), 'superscript']]
59
+ // @ts-ignore - Workaround for help-center local consumption
60
+ .filter(([mark]) => mark);
59
61
  const marksToName = new Map(marks);
60
62
  const activeMarks = wholeSelectionHasMarks(editorState, Array.from(marksToName.keys()));
61
63
  for (const [mark, markName] of marks) {
@@ -106,9 +108,13 @@ const getTextFormattingState = (editorState, editorAnalyticsAPI) => {
106
108
  };
107
109
  export const plugin = (dispatch, editorAnalyticsAPI) => new SafePlugin({
108
110
  state: {
111
+ // @ts-ignore - Workaround for help-center local consumption
112
+
109
113
  init(_config, state) {
110
114
  return getTextFormattingState(state, editorAnalyticsAPI);
111
115
  },
116
+ // @ts-ignore - Workaround for help-center local consumption
117
+
112
118
  apply(_tr, pluginState, _oldState, newState) {
113
119
  const state = getTextFormattingState(newState, editorAnalyticsAPI);
114
120
  if (!shallowEqual(pluginState, state)) {
@@ -120,6 +126,8 @@ export const plugin = (dispatch, editorAnalyticsAPI) => new SafePlugin({
120
126
  },
121
127
  key: pluginKey,
122
128
  props: {
129
+ // @ts-ignore - Workaround for help-center local consumption
130
+
123
131
  handleKeyDown(view, event) {
124
132
  var _pluginKey$getState;
125
133
  const {
@@ -136,6 +144,8 @@ export const plugin = (dispatch, editorAnalyticsAPI) => new SafePlugin({
136
144
  }
137
145
  return false;
138
146
  },
147
+ // @ts-ignore - Workaround for help-center local consumption
148
+
139
149
  handleTextInput(view, from, to, text) {
140
150
  const {
141
151
  state,
@@ -5,11 +5,13 @@ export var pluginKey = new PluginKey('clearFormattingPlugin');
5
5
  export var plugin = function plugin(dispatch) {
6
6
  return new SafePlugin({
7
7
  state: {
8
+ // @ts-ignore - Workaround for help-center local consumption
8
9
  init: function init(_config, state) {
9
10
  return {
10
11
  formattingIsPresent: checkFormattingIsPresent(state)
11
12
  };
12
13
  },
14
+ // @ts-ignore - Workaround for help-center local consumption
13
15
  apply: function apply(_tr, pluginState, _oldState, newState) {
14
16
  var formattingIsPresent = checkFormattingIsPresent(newState);
15
17
  if (formattingIsPresent !== pluginState.formattingIsPresent) {
@@ -3,6 +3,7 @@ import { TextSelection } from '@atlaskit/editor-prosemirror/state';
3
3
  // eslint-disable-next-line import/no-anonymous-default-export
4
4
  export default new SafePlugin({
5
5
  props: {
6
+ // @ts-ignore - Workaround for help-center local consumption
6
7
  handleClick: function handleClick(view, clickPos, event) {
7
8
  // Don't apply in Edge as per ED-4546
8
9
  // Ignored via go/ees005
@@ -113,6 +113,7 @@ export default function keymapPlugin(schema, editorAnalyticsAPI) {
113
113
  };
114
114
  return new SafePlugin({
115
115
  props: {
116
+ // @ts-ignore - Workaround for help-center local consumption
116
117
  handleKeyDown: function handleKeyDown(view, event) {
117
118
  var keyboardEvent = isCapsLockOnAndModifyKeyboardEvent(event);
118
119
  var keymapList = editorExperiment('platform_editor_controls', 'variant1') ? getEnabledKeylist(view) : list;
@@ -58,7 +58,9 @@ var getTextFormattingState = function getTextFormattingState(editorState, editor
58
58
  type: 'sub'
59
59
  }), 'subscript'], [subsup === null || subsup === void 0 ? void 0 : subsup.create({
60
60
  type: 'sup'
61
- }), 'superscript']].filter(function (_ref) {
61
+ }), 'superscript']]
62
+ // @ts-ignore - Workaround for help-center local consumption
63
+ .filter(function (_ref) {
62
64
  var _ref2 = _slicedToArray(_ref, 1),
63
65
  mark = _ref2[0];
64
66
  return mark;
@@ -125,9 +127,11 @@ var getTextFormattingState = function getTextFormattingState(editorState, editor
125
127
  export var plugin = function plugin(dispatch, editorAnalyticsAPI) {
126
128
  return new SafePlugin({
127
129
  state: {
130
+ // @ts-ignore - Workaround for help-center local consumption
128
131
  init: function init(_config, state) {
129
132
  return getTextFormattingState(state, editorAnalyticsAPI);
130
133
  },
134
+ // @ts-ignore - Workaround for help-center local consumption
131
135
  apply: function apply(_tr, pluginState, _oldState, newState) {
132
136
  var state = getTextFormattingState(newState, editorAnalyticsAPI);
133
137
  if (!shallowEqual(pluginState, state)) {
@@ -139,6 +143,7 @@ export var plugin = function plugin(dispatch, editorAnalyticsAPI) {
139
143
  },
140
144
  key: pluginKey,
141
145
  props: {
146
+ // @ts-ignore - Workaround for help-center local consumption
142
147
  handleKeyDown: function handleKeyDown(view, event) {
143
148
  var _pluginKey$getState;
144
149
  var state = view.state,
@@ -153,6 +158,7 @@ export var plugin = function plugin(dispatch, editorAnalyticsAPI) {
153
158
  }
154
159
  return false;
155
160
  },
161
+ // @ts-ignore - Workaround for help-center local consumption
156
162
  handleTextInput: function handleTextInput(view, from, to, text) {
157
163
  var state = view.state,
158
164
  dispatch = view.dispatch;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-text-formatting",
3
- "version": "6.1.8",
3
+ "version": "6.1.10",
4
4
  "description": "Text-formatting plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -29,28 +29,28 @@
29
29
  ],
30
30
  "atlaskit:src": "src/index.ts",
31
31
  "dependencies": {
32
- "@atlaskit/adf-schema": "^51.3.2",
32
+ "@atlaskit/adf-schema": "^51.4.0",
33
33
  "@atlaskit/editor-plugin-analytics": "^6.2.0",
34
34
  "@atlaskit/editor-plugin-base": "^7.2.0",
35
35
  "@atlaskit/editor-plugin-primary-toolbar": "^7.0.0",
36
36
  "@atlaskit/editor-plugin-selection-toolbar": "^7.1.0",
37
37
  "@atlaskit/editor-plugin-toolbar": "^3.4.0",
38
38
  "@atlaskit/editor-prosemirror": "7.0.0",
39
- "@atlaskit/editor-shared-styles": "^3.9.0",
39
+ "@atlaskit/editor-shared-styles": "^3.10.0",
40
40
  "@atlaskit/editor-tables": "^2.9.0",
41
41
  "@atlaskit/editor-toolbar": "^0.17.0",
42
42
  "@atlaskit/editor-toolbar-model": "^0.2.0",
43
43
  "@atlaskit/icon": "^29.0.0",
44
44
  "@atlaskit/platform-feature-flags": "^1.1.0",
45
45
  "@atlaskit/prosemirror-input-rules": "^3.6.0",
46
- "@atlaskit/tmp-editor-statsig": "^13.35.0",
47
- "@atlaskit/tokens": "^8.0.0",
46
+ "@atlaskit/tmp-editor-statsig": "^13.42.0",
47
+ "@atlaskit/tokens": "^8.3.0",
48
48
  "@babel/runtime": "^7.0.0",
49
49
  "@emotion/react": "^11.7.1",
50
50
  "react-intl-next": "npm:react-intl@^5.18.1"
51
51
  },
52
52
  "peerDependencies": {
53
- "@atlaskit/editor-common": "^110.27.0",
53
+ "@atlaskit/editor-common": "^110.34.0",
54
54
  "react": "^18.2.0"
55
55
  },
56
56
  "devDependencies": {