@atlaskit/editor-plugin-code-block-advanced 8.0.18 → 8.0.20

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-code-block-advanced
2
2
 
3
+ ## 8.0.20
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 8.0.19
10
+
11
+ ### Patch Changes
12
+
13
+ - [`495e6f8060297`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/495e6f8060297) -
14
+ Cleanup feature flag platform_editor_a11y_code_block_gutter_focus_fix - always set tabindex="-1"
15
+ on code block fold gutter buttons for improved accessibility.
16
+ - Updated dependencies
17
+
3
18
  ## 8.0.18
4
19
 
5
20
  ### Patch Changes
@@ -9,7 +9,6 @@ var _language = require("@codemirror/language");
9
9
  var _codeBlock = require("@atlaskit/editor-common/code-block");
10
10
  var _lazyNodeView = require("@atlaskit/editor-common/lazy-node-view");
11
11
  var _model = require("@atlaskit/editor-prosemirror/model");
12
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
13
12
  function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
14
13
  function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
15
14
  function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
@@ -77,9 +76,7 @@ function foldGutterExtension(_ref) {
77
76
  var htmlElement = document.createElement('button');
78
77
  htmlElement.setAttribute('data-marker-dom-element', 'true');
79
78
  htmlElement.setAttribute('data-testid', "code-block-fold-button-".concat(open ? 'open' : 'closed'));
80
- if ((0, _platformFeatureFlags.fg)('platform_editor_a11y_code_block_gutter_focus_fix')) {
81
- htmlElement.setAttribute('tabindex', '-1');
82
- }
79
+ htmlElement.setAttribute('tabindex', '-1');
83
80
  htmlElement.setAttribute('style', (0, _lazyNodeView.convertToInlineCss)({
84
81
  background: 'none',
85
82
  color: 'inherit',
@@ -111,9 +108,7 @@ function foldGutterExtension(_ref) {
111
108
  placeholderDOM: function placeholderDOM(view, onclick, _prepared) {
112
109
  var htmlElement = document.createElement('button');
113
110
  htmlElement.setAttribute('data-marker-dom-element', 'true');
114
- if ((0, _platformFeatureFlags.fg)('platform_editor_a11y_code_block_gutter_focus_fix')) {
115
- htmlElement.setAttribute('tabindex', '-1');
116
- }
111
+ htmlElement.setAttribute('tabindex', '-1');
117
112
  htmlElement.setAttribute('style', (0, _lazyNodeView.convertToInlineCss)({
118
113
  color: 'inherit',
119
114
  font: 'inherit',
@@ -2,7 +2,6 @@ import { foldGutter, codeFolding, foldState, foldEffect } from '@codemirror/lang
2
2
  import { setCodeBlockFoldState, getCodeBlockFoldState } from '@atlaskit/editor-common/code-block';
3
3
  import { convertToInlineCss } from '@atlaskit/editor-common/lazy-node-view';
4
4
  import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
5
- import { fg } from '@atlaskit/platform-feature-flags';
6
5
  // Based on platform/packages/design-system/icon/svgs/utility/add.svg
7
6
  const chevronDown = ['http://www.w3.org/2000/svg svg', {
8
7
  width: '12',
@@ -70,9 +69,7 @@ export function foldGutterExtension({
70
69
  const htmlElement = document.createElement('button');
71
70
  htmlElement.setAttribute('data-marker-dom-element', 'true');
72
71
  htmlElement.setAttribute('data-testid', `code-block-fold-button-${open ? 'open' : 'closed'}`);
73
- if (fg('platform_editor_a11y_code_block_gutter_focus_fix')) {
74
- htmlElement.setAttribute('tabindex', '-1');
75
- }
72
+ htmlElement.setAttribute('tabindex', '-1');
76
73
  htmlElement.setAttribute('style', convertToInlineCss({
77
74
  background: 'none',
78
75
  color: 'inherit',
@@ -104,9 +101,7 @@ export function foldGutterExtension({
104
101
  placeholderDOM(view, onclick, _prepared) {
105
102
  const htmlElement = document.createElement('button');
106
103
  htmlElement.setAttribute('data-marker-dom-element', 'true');
107
- if (fg('platform_editor_a11y_code_block_gutter_focus_fix')) {
108
- htmlElement.setAttribute('tabindex', '-1');
109
- }
104
+ htmlElement.setAttribute('tabindex', '-1');
110
105
  htmlElement.setAttribute('style', convertToInlineCss({
111
106
  color: 'inherit',
112
107
  font: 'inherit',
@@ -5,7 +5,6 @@ import { foldGutter, codeFolding, foldState, foldEffect } from '@codemirror/lang
5
5
  import { setCodeBlockFoldState, getCodeBlockFoldState } from '@atlaskit/editor-common/code-block';
6
6
  import { convertToInlineCss } from '@atlaskit/editor-common/lazy-node-view';
7
7
  import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
8
- import { fg } from '@atlaskit/platform-feature-flags';
9
8
  // Based on platform/packages/design-system/icon/svgs/utility/add.svg
10
9
  var chevronDown = ['http://www.w3.org/2000/svg svg', {
11
10
  width: '12',
@@ -70,9 +69,7 @@ export function foldGutterExtension(_ref) {
70
69
  var htmlElement = document.createElement('button');
71
70
  htmlElement.setAttribute('data-marker-dom-element', 'true');
72
71
  htmlElement.setAttribute('data-testid', "code-block-fold-button-".concat(open ? 'open' : 'closed'));
73
- if (fg('platform_editor_a11y_code_block_gutter_focus_fix')) {
74
- htmlElement.setAttribute('tabindex', '-1');
75
- }
72
+ htmlElement.setAttribute('tabindex', '-1');
76
73
  htmlElement.setAttribute('style', convertToInlineCss({
77
74
  background: 'none',
78
75
  color: 'inherit',
@@ -104,9 +101,7 @@ export function foldGutterExtension(_ref) {
104
101
  placeholderDOM: function placeholderDOM(view, onclick, _prepared) {
105
102
  var htmlElement = document.createElement('button');
106
103
  htmlElement.setAttribute('data-marker-dom-element', 'true');
107
- if (fg('platform_editor_a11y_code_block_gutter_focus_fix')) {
108
- htmlElement.setAttribute('tabindex', '-1');
109
- }
104
+ htmlElement.setAttribute('tabindex', '-1');
110
105
  htmlElement.setAttribute('style', convertToInlineCss({
111
106
  color: 'inherit',
112
107
  font: 'inherit',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-code-block-advanced",
3
- "version": "8.0.18",
3
+ "version": "8.0.20",
4
4
  "description": "CodeBlockAdvanced plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -38,7 +38,7 @@
38
38
  "@atlaskit/editor-prosemirror": "^7.3.0",
39
39
  "@atlaskit/platform-feature-flags": "^1.1.0",
40
40
  "@atlaskit/prosemirror-history": "^0.2.0",
41
- "@atlaskit/tmp-editor-statsig": "^51.0.0",
41
+ "@atlaskit/tmp-editor-statsig": "^53.0.0",
42
42
  "@atlaskit/tokens": "^11.4.0",
43
43
  "@babel/runtime": "^7.0.0",
44
44
  "@codemirror/autocomplete": "6.18.4",
@@ -55,7 +55,7 @@
55
55
  "codemirror-lang-elixir": "4.0.0"
56
56
  },
57
57
  "peerDependencies": {
58
- "@atlaskit/editor-common": "^112.13.0",
58
+ "@atlaskit/editor-common": "^112.15.0",
59
59
  "react": "^18.2.0",
60
60
  "react-intl-next": "npm:react-intl@^5.18.1"
61
61
  },
@@ -101,9 +101,6 @@
101
101
  },
102
102
  "platform_editor_content_mode_button_mvp": {
103
103
  "type": "boolean"
104
- },
105
- "platform_editor_a11y_code_block_gutter_focus_fix": {
106
- "type": "boolean"
107
104
  }
108
105
  }
109
106
  }
@@ -7,7 +7,6 @@ import type { FoldRange } from '@atlaskit/editor-common/code-block';
7
7
  import { convertToInlineCss } from '@atlaskit/editor-common/lazy-node-view';
8
8
  import type { DOMOutputSpec, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
9
9
  import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
10
- import { fg } from '@atlaskit/platform-feature-flags';
11
10
  import { token } from '@atlaskit/tokens';
12
11
 
13
12
  // Based on platform/packages/design-system/icon/svgs/utility/add.svg
@@ -98,9 +97,7 @@ export function foldGutterExtension({
98
97
  'data-testid',
99
98
  `code-block-fold-button-${open ? 'open' : 'closed'}`,
100
99
  );
101
- if (fg('platform_editor_a11y_code_block_gutter_focus_fix')) {
102
- htmlElement.setAttribute('tabindex', '-1');
103
- }
100
+ htmlElement.setAttribute('tabindex', '-1');
104
101
  htmlElement.setAttribute(
105
102
  'style',
106
103
  convertToInlineCss({
@@ -138,9 +135,7 @@ export function foldGutterExtension({
138
135
  placeholderDOM(view, onclick, _prepared) {
139
136
  const htmlElement = document.createElement('button');
140
137
  htmlElement.setAttribute('data-marker-dom-element', 'true');
141
- if (fg('platform_editor_a11y_code_block_gutter_focus_fix')) {
142
- htmlElement.setAttribute('tabindex', '-1');
143
- }
138
+ htmlElement.setAttribute('tabindex', '-1');
144
139
  htmlElement.setAttribute(
145
140
  'style',
146
141
  convertToInlineCss({