@atlaskit/editor-plugin-text-formatting 6.1.9 → 6.1.11

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,20 @@
1
1
  # @atlaskit/editor-plugin-text-formatting
2
2
 
3
+ ## 6.1.11
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 6.1.10
10
+
11
+ ### Patch Changes
12
+
13
+ - [`4d676bbdb3ce6`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4d676bbdb3ce6) -
14
+ ts-ignore added temporarily to unblock local consumption for help-center, will be removed once
15
+ project refs are setup
16
+ - Updated dependencies
17
+
3
18
  ## 6.1.9
4
19
 
5
20
  ### 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,10 @@ 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
+
70
+ // @ts-ignore - Workaround for help-center local consumption
71
+ .filter(function (_ref) {
69
72
  var _ref2 = (0, _slicedToArray2.default)(_ref, 1),
70
73
  mark = _ref2[0];
71
74
  return mark;
@@ -132,9 +135,11 @@ var getTextFormattingState = function getTextFormattingState(editorState, editor
132
135
  var plugin = exports.plugin = function plugin(dispatch, editorAnalyticsAPI) {
133
136
  return new _safePlugin.SafePlugin({
134
137
  state: {
138
+ // @ts-ignore - Workaround for help-center local consumption
135
139
  init: function init(_config, state) {
136
140
  return getTextFormattingState(state, editorAnalyticsAPI);
137
141
  },
142
+ // @ts-ignore - Workaround for help-center local consumption
138
143
  apply: function apply(_tr, pluginState, _oldState, newState) {
139
144
  var state = getTextFormattingState(newState, editorAnalyticsAPI);
140
145
  if (!(0, _utils.shallowEqual)(pluginState, state)) {
@@ -146,6 +151,7 @@ var plugin = exports.plugin = function plugin(dispatch, editorAnalyticsAPI) {
146
151
  },
147
152
  key: _pluginKey.pluginKey,
148
153
  props: {
154
+ // @ts-ignore - Workaround for help-center local consumption
149
155
  handleKeyDown: function handleKeyDown(view, event) {
150
156
  var _pluginKey$getState;
151
157
  var state = view.state,
@@ -160,6 +166,7 @@ var plugin = exports.plugin = function plugin(dispatch, editorAnalyticsAPI) {
160
166
  }
161
167
  return false;
162
168
  },
169
+ // @ts-ignore - Workaround for help-center local consumption
163
170
  handleTextInput: function handleTextInput(view, from, to, text) {
164
171
  var state = view.state,
165
172
  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,10 @@ 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
+
60
+ // @ts-ignore - Workaround for help-center local consumption
61
+ .filter(([mark]) => mark);
59
62
  const marksToName = new Map(marks);
60
63
  const activeMarks = wholeSelectionHasMarks(editorState, Array.from(marksToName.keys()));
61
64
  for (const [mark, markName] of marks) {
@@ -106,9 +109,13 @@ const getTextFormattingState = (editorState, editorAnalyticsAPI) => {
106
109
  };
107
110
  export const plugin = (dispatch, editorAnalyticsAPI) => new SafePlugin({
108
111
  state: {
112
+ // @ts-ignore - Workaround for help-center local consumption
113
+
109
114
  init(_config, state) {
110
115
  return getTextFormattingState(state, editorAnalyticsAPI);
111
116
  },
117
+ // @ts-ignore - Workaround for help-center local consumption
118
+
112
119
  apply(_tr, pluginState, _oldState, newState) {
113
120
  const state = getTextFormattingState(newState, editorAnalyticsAPI);
114
121
  if (!shallowEqual(pluginState, state)) {
@@ -120,6 +127,8 @@ export const plugin = (dispatch, editorAnalyticsAPI) => new SafePlugin({
120
127
  },
121
128
  key: pluginKey,
122
129
  props: {
130
+ // @ts-ignore - Workaround for help-center local consumption
131
+
123
132
  handleKeyDown(view, event) {
124
133
  var _pluginKey$getState;
125
134
  const {
@@ -136,6 +145,8 @@ export const plugin = (dispatch, editorAnalyticsAPI) => new SafePlugin({
136
145
  }
137
146
  return false;
138
147
  },
148
+ // @ts-ignore - Workaround for help-center local consumption
149
+
139
150
  handleTextInput(view, from, to, text) {
140
151
  const {
141
152
  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,10 @@ 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
+
63
+ // @ts-ignore - Workaround for help-center local consumption
64
+ .filter(function (_ref) {
62
65
  var _ref2 = _slicedToArray(_ref, 1),
63
66
  mark = _ref2[0];
64
67
  return mark;
@@ -125,9 +128,11 @@ var getTextFormattingState = function getTextFormattingState(editorState, editor
125
128
  export var plugin = function plugin(dispatch, editorAnalyticsAPI) {
126
129
  return new SafePlugin({
127
130
  state: {
131
+ // @ts-ignore - Workaround for help-center local consumption
128
132
  init: function init(_config, state) {
129
133
  return getTextFormattingState(state, editorAnalyticsAPI);
130
134
  },
135
+ // @ts-ignore - Workaround for help-center local consumption
131
136
  apply: function apply(_tr, pluginState, _oldState, newState) {
132
137
  var state = getTextFormattingState(newState, editorAnalyticsAPI);
133
138
  if (!shallowEqual(pluginState, state)) {
@@ -139,6 +144,7 @@ export var plugin = function plugin(dispatch, editorAnalyticsAPI) {
139
144
  },
140
145
  key: pluginKey,
141
146
  props: {
147
+ // @ts-ignore - Workaround for help-center local consumption
142
148
  handleKeyDown: function handleKeyDown(view, event) {
143
149
  var _pluginKey$getState;
144
150
  var state = view.state,
@@ -153,6 +159,7 @@ export var plugin = function plugin(dispatch, editorAnalyticsAPI) {
153
159
  }
154
160
  return false;
155
161
  },
162
+ // @ts-ignore - Workaround for help-center local consumption
156
163
  handleTextInput: function handleTextInput(view, from, to, text) {
157
164
  var state = view.state,
158
165
  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.9",
3
+ "version": "6.1.11",
4
4
  "description": "Text-formatting plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -43,20 +43,17 @@
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.38.0",
47
- "@atlaskit/tokens": "^8.0.0",
46
+ "@atlaskit/tmp-editor-statsig": "^14.0.0",
47
+ "@atlaskit/tokens": "^8.4.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.32.0",
53
+ "@atlaskit/editor-common": "^110.36.0",
54
54
  "react": "^18.2.0"
55
55
  },
56
56
  "devDependencies": {
57
- "@atlaskit/editor-plugin-composition": "^5.0.0",
58
- "@atlaskit/editor-plugin-decorations": "^6.1.0",
59
- "@atlaskit/editor-plugin-feature-flags": "^5.0.0",
60
57
  "@testing-library/react": "^13.4.0"
61
58
  },
62
59
  "techstack": {