@atlaskit/editor-plugin-code-block-advanced 16.0.12 → 16.0.13
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 +6 -0
- package/dist/cjs/nodeviews/codeBlockNodeWithToDOMFixed.js +4 -4
- package/dist/es2019/nodeviews/codeBlockNodeWithToDOMFixed.js +1 -1
- package/dist/esm/nodeviews/codeBlockNodeWithToDOMFixed.js +1 -1
- package/package.json +2 -2
- package/src/nodeviews/codeBlockNodeWithToDOMFixed.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,8 +7,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.codeBlockNodeWithFixedToDOM = void 0;
|
|
8
8
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
9
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
|
-
var
|
|
11
|
-
var
|
|
10
|
+
var _codeBlock = require("@atlaskit/adf-schema/code-block");
|
|
11
|
+
var _codeBlock2 = require("@atlaskit/editor-common/code-block");
|
|
12
12
|
var _lazyNodeView = require("@atlaskit/editor-common/lazy-node-view");
|
|
13
13
|
var _styles = require("@atlaskit/editor-common/styles");
|
|
14
14
|
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
@@ -86,7 +86,7 @@ var _toDOM = function toDOM(node, formattedAriaLabel, config) {
|
|
|
86
86
|
totalLineCount += (node.text.match(MATCH_NEWLINES) || []).length;
|
|
87
87
|
}
|
|
88
88
|
});
|
|
89
|
-
var hideLineNumbers = (0,
|
|
89
|
+
var hideLineNumbers = (0, _codeBlock2.areCodeBlockLineNumbersHidden)(node);
|
|
90
90
|
var maxDigits = totalLineCount.toString().length;
|
|
91
91
|
var content = node.textContent.split('\n').map(function (_, i) {
|
|
92
92
|
return i + 1;
|
|
@@ -122,7 +122,7 @@ var _toDOM = function toDOM(node, formattedAriaLabel, config) {
|
|
|
122
122
|
}]];
|
|
123
123
|
};
|
|
124
124
|
var codeBlockNodeWithFixedToDOM = exports.codeBlockNodeWithFixedToDOM = function codeBlockNodeWithFixedToDOM(config) {
|
|
125
|
-
return _objectSpread(_objectSpread({}, (0, _expValEquals.expValEquals)('platform_editor_code_block_q4_lovability', 'isEnabled', true) ?
|
|
125
|
+
return _objectSpread(_objectSpread({}, (0, _expValEquals.expValEquals)('platform_editor_code_block_q4_lovability', 'isEnabled', true) ? _codeBlock.codeBlock : (0, _fg.fg)('platform_editor_adf_with_localid') ? _codeBlock.codeBlockWithLocalId : _codeBlock.codeBlock), {}, {
|
|
126
126
|
toDOM: function toDOM(node) {
|
|
127
127
|
return _toDOM(node, '', config);
|
|
128
128
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { codeBlock, codeBlockWithLocalId } from '@atlaskit/adf-schema';
|
|
1
|
+
import { codeBlock, codeBlockWithLocalId } from '@atlaskit/adf-schema/code-block';
|
|
2
2
|
import { areCodeBlockLineNumbersHidden } from '@atlaskit/editor-common/code-block';
|
|
3
3
|
import { convertToInlineCss } from '@atlaskit/editor-common/lazy-node-view';
|
|
4
4
|
import { CodeBlockSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
@@ -2,7 +2,7 @@ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
4
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
|
-
import { codeBlock, codeBlockWithLocalId } from '@atlaskit/adf-schema';
|
|
5
|
+
import { codeBlock, codeBlockWithLocalId } from '@atlaskit/adf-schema/code-block';
|
|
6
6
|
import { areCodeBlockLineNumbersHidden } from '@atlaskit/editor-common/code-block';
|
|
7
7
|
import { convertToInlineCss } from '@atlaskit/editor-common/lazy-node-view';
|
|
8
8
|
import { CodeBlockSharedCssClassName } from '@atlaskit/editor-common/styles';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-code-block-advanced",
|
|
3
|
-
"version": "16.0.
|
|
3
|
+
"version": "16.0.13",
|
|
4
4
|
"description": "CodeBlockAdvanced plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@atlaskit/editor-prosemirror": "^8.0.0",
|
|
32
32
|
"@atlaskit/platform-feature-flags": "^2.2.0",
|
|
33
33
|
"@atlaskit/prosemirror-history": "^1.2.0",
|
|
34
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
34
|
+
"@atlaskit/tmp-editor-statsig": "^173.0.0",
|
|
35
35
|
"@atlaskit/tokens": "^16.11.0",
|
|
36
36
|
"@babel/runtime": "^7.0.0",
|
|
37
37
|
"@codemirror/autocomplete": "6.18.4",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { codeBlock, codeBlockWithLocalId } from '@atlaskit/adf-schema';
|
|
1
|
+
import { codeBlock, codeBlockWithLocalId } from '@atlaskit/adf-schema/code-block';
|
|
2
2
|
import { areCodeBlockLineNumbersHidden } from '@atlaskit/editor-common/code-block';
|
|
3
3
|
import { convertToInlineCss } from '@atlaskit/editor-common/lazy-node-view';
|
|
4
4
|
import { CodeBlockSharedCssClassName } from '@atlaskit/editor-common/styles';
|