@atlaskit/editor-plugin-text-formatting 8.1.4 → 8.1.6

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,19 @@
1
1
  # @atlaskit/editor-plugin-text-formatting
2
2
 
3
+ ## 8.1.6
4
+
5
+ ### Patch Changes
6
+
7
+ - [`0f4a08b633f6e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0f4a08b633f6e) -
8
+ Internal changes to remove unnecessary token fallbacks and imports from `@atlaskit/theme`
9
+ - Updated dependencies
10
+
11
+ ## 8.1.5
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies
16
+
3
17
  ## 8.1.4
4
18
 
5
19
  ### Patch Changes
@@ -155,7 +155,7 @@ var buildRegex = function buildRegex(char) {
155
155
  // eslint-disable-next-line require-unicode-regexp
156
156
  var escapedChar = char.replace(/(\W)/g, '\\$1');
157
157
  // Ignored via go/ees005
158
- // eslint-disable-next-line require-unicode-regexp
158
+ // eslint-disable-next-line require-unicode-regexp, @atlassian/perf-linting/no-expensive-split-replace -- Ignored via go/ees017 (to be fixed)
159
159
  var combinations = ValidCombinations[char].map(function (c) {
160
160
  return c.replace(/(\W)/g, '\\$1');
161
161
  }).join('|');
@@ -178,7 +178,7 @@ var buildRegexNew = function buildRegexNew(char) {
178
178
  // eslint-disable-next-line require-unicode-regexp
179
179
  var escapedChar = char.replace(/(\W)/g, '\\$1');
180
180
  // Ignored via go/ees005
181
- // eslint-disable-next-line require-unicode-regexp
181
+ // eslint-disable-next-line require-unicode-regexp, @atlassian/perf-linting/no-expensive-split-replace -- Ignored via go/ees017 (to be fixed)
182
182
  var combinations = ValidCombinations[char].map(function (c) {
183
183
  return c.replace(/(\W)/g, '\\$1');
184
184
  }).join('|');
@@ -68,10 +68,14 @@ var FormattingTextDropdownMenu = exports.FormattingTextDropdownMenu = /*#__PURE_
68
68
  zIndex: _editorSharedStyles.akEditorMenuZIndex,
69
69
  fitHeight: 188,
70
70
  fitWidth: (0, _experiments.editorExperiment)('platform_editor_controls', 'control') ? 136 : 230,
71
- shouldUseDefaultRole: true,
71
+ shouldUseDefaultRole: true
72
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
73
+ ,
72
74
  section: {
73
75
  hasSeparator: true
74
- },
76
+ }
77
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
78
+ ,
75
79
  shouldFocusFirstItem: function shouldFocusFirstItem() {
76
80
  if (isOpenedByKeyboard) {
77
81
  setIsOpenedByKeyboard(false);
@@ -82,11 +86,15 @@ var FormattingTextDropdownMenu = exports.FormattingTextDropdownMenu = /*#__PURE_
82
86
  isSelected: isMenuOpen || hasFormattingActive,
83
87
  label: moreButtonLabel,
84
88
  isReducedSpacing: isReducedSpacing,
85
- isDisabled: false,
89
+ isDisabled: false
90
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
91
+ ,
86
92
  onClick: function onClick() {
87
93
  toggleMenu();
88
94
  setIsOpenedByKeyboard(false);
89
- },
95
+ }
96
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
97
+ ,
90
98
  onKeyDown: function onKeyDown(event) {
91
99
  if (event.key === 'Enter' || event.key === ' ') {
92
100
  event.preventDefault();
@@ -101,11 +109,15 @@ var FormattingTextDropdownMenu = exports.FormattingTextDropdownMenu = /*#__PURE_
101
109
  isSelected: isMenuOpen,
102
110
  label: intl.formatMessage(_messages.toolbarMessages.textFormat),
103
111
  "aria-expanded": isMenuOpen,
104
- "aria-haspopup": true,
112
+ "aria-haspopup": true
113
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
114
+ ,
105
115
  onClick: function onClick() {
106
116
  toggleMenu();
107
117
  setIsOpenedByKeyboard(false);
108
- },
118
+ }
119
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
120
+ ,
109
121
  onKeyDown: function onKeyDown(event) {
110
122
  if (event.key === 'Enter' || event.key === ' ') {
111
123
  event.preventDefault();
@@ -83,6 +83,8 @@ var ToolbarFormatting = function ToolbarFormatting(_ref) {
83
83
  var clearFormattingStatus = intl.formatMessage(_messages.toolbarMessages.textFormattingOff);
84
84
  var superscriptOffSubscriptOnStatus = intl.formatMessage(_messages.toolbarMessages.superscriptOffSubscriptOn);
85
85
  var subscriptOffSuperscriptOnStatus = intl.formatMessage(_messages.toolbarMessages.subscriptOffSuperscriptOn);
86
+
87
+ // eslint-disable-next-line @atlassian/perf-linting/no-expensive-computations-in-render -- Ignored via go/ees017 (to be fixed)
86
88
  var activeItems = [].concat((0, _toConsumableArray2.default)(dropdownItems), (0, _toConsumableArray2.default)(singleItems)).filter(function (item) {
87
89
  return item.isActive;
88
90
  });
@@ -135,7 +135,7 @@ const buildRegex = char => {
135
135
  // eslint-disable-next-line require-unicode-regexp
136
136
  const escapedChar = char.replace(/(\W)/g, '\\$1');
137
137
  // Ignored via go/ees005
138
- // eslint-disable-next-line require-unicode-regexp
138
+ // eslint-disable-next-line require-unicode-regexp, @atlassian/perf-linting/no-expensive-split-replace -- Ignored via go/ees017 (to be fixed)
139
139
  const combinations = ValidCombinations[char].map(c => c.replace(/(\W)/g, '\\$1')).join('|');
140
140
 
141
141
  // Single X - https://regex101.com/r/McT3yq/14/
@@ -155,7 +155,7 @@ const buildRegexNew = (char, allowsBackwardMatch = false) => {
155
155
  // eslint-disable-next-line require-unicode-regexp
156
156
  const escapedChar = char.replace(/(\W)/g, '\\$1');
157
157
  // Ignored via go/ees005
158
- // eslint-disable-next-line require-unicode-regexp
158
+ // eslint-disable-next-line require-unicode-regexp, @atlassian/perf-linting/no-expensive-split-replace -- Ignored via go/ees017 (to be fixed)
159
159
  const combinations = ValidCombinations[char].map(c => c.replace(/(\W)/g, '\\$1')).join('|');
160
160
 
161
161
  // Single X - https://regex101.com/r/McT3yq/14/
@@ -50,10 +50,14 @@ export const FormattingTextDropdownMenu = /*#__PURE__*/React.memo(({
50
50
  zIndex: akEditorMenuZIndex,
51
51
  fitHeight: 188,
52
52
  fitWidth: editorExperiment('platform_editor_controls', 'control') ? 136 : 230,
53
- shouldUseDefaultRole: true,
53
+ shouldUseDefaultRole: true
54
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
55
+ ,
54
56
  section: {
55
57
  hasSeparator: true
56
- },
58
+ }
59
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
60
+ ,
57
61
  shouldFocusFirstItem: () => {
58
62
  if (isOpenedByKeyboard) {
59
63
  setIsOpenedByKeyboard(false);
@@ -64,11 +68,15 @@ export const FormattingTextDropdownMenu = /*#__PURE__*/React.memo(({
64
68
  isSelected: isMenuOpen || hasFormattingActive,
65
69
  label: moreButtonLabel,
66
70
  isReducedSpacing: isReducedSpacing,
67
- isDisabled: false,
71
+ isDisabled: false
72
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
73
+ ,
68
74
  onClick: () => {
69
75
  toggleMenu();
70
76
  setIsOpenedByKeyboard(false);
71
- },
77
+ }
78
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
79
+ ,
72
80
  onKeyDown: event => {
73
81
  if (event.key === 'Enter' || event.key === ' ') {
74
82
  event.preventDefault();
@@ -83,11 +91,15 @@ export const FormattingTextDropdownMenu = /*#__PURE__*/React.memo(({
83
91
  isSelected: isMenuOpen,
84
92
  label: intl.formatMessage(toolbarMessages.textFormat),
85
93
  "aria-expanded": isMenuOpen,
86
- "aria-haspopup": true,
94
+ "aria-haspopup": true
95
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
96
+ ,
87
97
  onClick: () => {
88
98
  toggleMenu();
89
99
  setIsOpenedByKeyboard(false);
90
- },
100
+ }
101
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
102
+ ,
91
103
  onKeyDown: event => {
92
104
  if (event.key === 'Enter' || event.key === ' ') {
93
105
  event.preventDefault();
@@ -74,6 +74,8 @@ const ToolbarFormatting = ({
74
74
  const clearFormattingStatus = intl.formatMessage(toolbarMessages.textFormattingOff);
75
75
  const superscriptOffSubscriptOnStatus = intl.formatMessage(toolbarMessages.superscriptOffSubscriptOn);
76
76
  const subscriptOffSuperscriptOnStatus = intl.formatMessage(toolbarMessages.subscriptOffSuperscriptOn);
77
+
78
+ // eslint-disable-next-line @atlassian/perf-linting/no-expensive-computations-in-render -- Ignored via go/ees017 (to be fixed)
77
79
  const activeItems = [...dropdownItems, ...singleItems].filter(item => item.isActive);
78
80
  const prevActiveItems = (_usePreviousState = usePreviousState(activeItems)) !== null && _usePreviousState !== void 0 ? _usePreviousState : [];
79
81
  const fromSuperscriptToSubscript = isArrayContainsContent(activeItems, 'Subscript') && isArrayContainsContent(prevActiveItems, 'Superscript');
@@ -146,7 +146,7 @@ var buildRegex = function buildRegex(char) {
146
146
  // eslint-disable-next-line require-unicode-regexp
147
147
  var escapedChar = char.replace(/(\W)/g, '\\$1');
148
148
  // Ignored via go/ees005
149
- // eslint-disable-next-line require-unicode-regexp
149
+ // eslint-disable-next-line require-unicode-regexp, @atlassian/perf-linting/no-expensive-split-replace -- Ignored via go/ees017 (to be fixed)
150
150
  var combinations = ValidCombinations[char].map(function (c) {
151
151
  return c.replace(/(\W)/g, '\\$1');
152
152
  }).join('|');
@@ -169,7 +169,7 @@ var buildRegexNew = function buildRegexNew(char) {
169
169
  // eslint-disable-next-line require-unicode-regexp
170
170
  var escapedChar = char.replace(/(\W)/g, '\\$1');
171
171
  // Ignored via go/ees005
172
- // eslint-disable-next-line require-unicode-regexp
172
+ // eslint-disable-next-line require-unicode-regexp, @atlassian/perf-linting/no-expensive-split-replace -- Ignored via go/ees017 (to be fixed)
173
173
  var combinations = ValidCombinations[char].map(function (c) {
174
174
  return c.replace(/(\W)/g, '\\$1');
175
175
  }).join('|');
@@ -59,10 +59,14 @@ export var FormattingTextDropdownMenu = /*#__PURE__*/React.memo(function (_ref)
59
59
  zIndex: akEditorMenuZIndex,
60
60
  fitHeight: 188,
61
61
  fitWidth: editorExperiment('platform_editor_controls', 'control') ? 136 : 230,
62
- shouldUseDefaultRole: true,
62
+ shouldUseDefaultRole: true
63
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
64
+ ,
63
65
  section: {
64
66
  hasSeparator: true
65
- },
67
+ }
68
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
69
+ ,
66
70
  shouldFocusFirstItem: function shouldFocusFirstItem() {
67
71
  if (isOpenedByKeyboard) {
68
72
  setIsOpenedByKeyboard(false);
@@ -73,11 +77,15 @@ export var FormattingTextDropdownMenu = /*#__PURE__*/React.memo(function (_ref)
73
77
  isSelected: isMenuOpen || hasFormattingActive,
74
78
  label: moreButtonLabel,
75
79
  isReducedSpacing: isReducedSpacing,
76
- isDisabled: false,
80
+ isDisabled: false
81
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
82
+ ,
77
83
  onClick: function onClick() {
78
84
  toggleMenu();
79
85
  setIsOpenedByKeyboard(false);
80
- },
86
+ }
87
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
88
+ ,
81
89
  onKeyDown: function onKeyDown(event) {
82
90
  if (event.key === 'Enter' || event.key === ' ') {
83
91
  event.preventDefault();
@@ -92,11 +100,15 @@ export var FormattingTextDropdownMenu = /*#__PURE__*/React.memo(function (_ref)
92
100
  isSelected: isMenuOpen,
93
101
  label: intl.formatMessage(toolbarMessages.textFormat),
94
102
  "aria-expanded": isMenuOpen,
95
- "aria-haspopup": true,
103
+ "aria-haspopup": true
104
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
105
+ ,
96
106
  onClick: function onClick() {
97
107
  toggleMenu();
98
108
  setIsOpenedByKeyboard(false);
99
- },
109
+ }
110
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
111
+ ,
100
112
  onKeyDown: function onKeyDown(event) {
101
113
  if (event.key === 'Enter' || event.key === ' ') {
102
114
  event.preventDefault();
@@ -77,6 +77,8 @@ var ToolbarFormatting = function ToolbarFormatting(_ref) {
77
77
  var clearFormattingStatus = intl.formatMessage(toolbarMessages.textFormattingOff);
78
78
  var superscriptOffSubscriptOnStatus = intl.formatMessage(toolbarMessages.superscriptOffSubscriptOn);
79
79
  var subscriptOffSuperscriptOnStatus = intl.formatMessage(toolbarMessages.subscriptOffSuperscriptOn);
80
+
81
+ // eslint-disable-next-line @atlassian/perf-linting/no-expensive-computations-in-render -- Ignored via go/ees017 (to be fixed)
80
82
  var activeItems = [].concat(_toConsumableArray(dropdownItems), _toConsumableArray(singleItems)).filter(function (item) {
81
83
  return item.isActive;
82
84
  });
package/docs/0-intro.tsx CHANGED
@@ -16,7 +16,7 @@ ${createEditorUseOnlyNotice('Editor Plugin Text Formatting', [
16
16
  ${
17
17
  (
18
18
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
19
- <div style={{ marginTop: token('space.100', '8px') }}>
19
+ <div style={{ marginTop: token('space.100') }}>
20
20
  <AtlassianInternalWarning />
21
21
  </div>
22
22
  )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-text-formatting",
3
- "version": "8.1.4",
3
+ "version": "8.1.6",
4
4
  "description": "Text-formatting plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -46,7 +46,7 @@
46
46
  "@atlaskit/icon": "^33.0.0",
47
47
  "@atlaskit/platform-feature-flags": "^1.1.0",
48
48
  "@atlaskit/prosemirror-input-rules": "^3.6.0",
49
- "@atlaskit/tmp-editor-statsig": "^43.0.0",
49
+ "@atlaskit/tmp-editor-statsig": "^44.0.0",
50
50
  "@atlaskit/tokens": "^11.1.0",
51
51
  "@babel/runtime": "^7.0.0",
52
52
  "@emotion/react": "^11.7.1",