@atlaskit/editor-plugin-code-block-advanced 21.0.2 → 21.0.4
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 +17 -0
- package/dist/cjs/nodeviews/extensions/firstCodeBlockInDocument.js +2 -1
- package/dist/es2019/nodeviews/extensions/firstCodeBlockInDocument.js +2 -1
- package/dist/esm/nodeviews/extensions/firstCodeBlockInDocument.js +2 -1
- package/package.json +3 -3
- package/src/nodeviews/extensions/firstCodeBlockInDocument.ts +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-code-block-advanced
|
|
2
2
|
|
|
3
|
+
## 21.0.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`e339b127f827a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e339b127f827a) -
|
|
8
|
+
Route `platform_editor_controls` checks that used `expValEquals` / `expValEqualsNoExposure`
|
|
9
|
+
through `editorExperiment`, so they respect the per-product experiment key (Confluence
|
|
10
|
+
`platform_editor_controls`, Jira `platform_editor_controls_jira`). Previously these checks always
|
|
11
|
+
read the Confluence experiment, which evaluated to control in Jira.
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
14
|
+
## 21.0.3
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
|
|
3
20
|
## 21.0.2
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.firstCodeBlockInDocument = void 0;
|
|
7
7
|
var _view = require("@codemirror/view");
|
|
8
|
+
var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
|
|
8
9
|
var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
|
|
9
10
|
/**
|
|
10
11
|
* Keeps 'first-node-in-document' class if it was added to a codeBlock by
|
|
@@ -15,7 +16,7 @@ var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equa
|
|
|
15
16
|
* @example
|
|
16
17
|
*/
|
|
17
18
|
var firstCodeBlockInDocument = exports.firstCodeBlockInDocument = function firstCodeBlockInDocument(getPos) {
|
|
18
|
-
if ((0,
|
|
19
|
+
if ((0, _editorExperiment.editorExperiment)('platform_editor_controls', 'variant1') && (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_breakout_resizing', 'isEnabled', true)) {
|
|
19
20
|
return _view.EditorView.editorAttributes.of({
|
|
20
21
|
class: (getPos === null || getPos === void 0 ? void 0 : getPos()) === 0 ? 'first-node-in-document' : ''
|
|
21
22
|
});
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { EditorView as CodeMirror } from '@codemirror/view';
|
|
2
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
2
3
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
3
4
|
|
|
4
5
|
/**
|
|
@@ -10,7 +11,7 @@ import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equ
|
|
|
10
11
|
* @example
|
|
11
12
|
*/
|
|
12
13
|
export const firstCodeBlockInDocument = getPos => {
|
|
13
|
-
if (
|
|
14
|
+
if (editorExperiment('platform_editor_controls', 'variant1') && expValEqualsNoExposure('platform_editor_breakout_resizing', 'isEnabled', true)) {
|
|
14
15
|
return CodeMirror.editorAttributes.of({
|
|
15
16
|
class: (getPos === null || getPos === void 0 ? void 0 : getPos()) === 0 ? 'first-node-in-document' : ''
|
|
16
17
|
});
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { EditorView as CodeMirror } from '@codemirror/view';
|
|
2
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
2
3
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
3
4
|
|
|
4
5
|
/**
|
|
@@ -10,7 +11,7 @@ import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equ
|
|
|
10
11
|
* @example
|
|
11
12
|
*/
|
|
12
13
|
export var firstCodeBlockInDocument = function firstCodeBlockInDocument(getPos) {
|
|
13
|
-
if (
|
|
14
|
+
if (editorExperiment('platform_editor_controls', 'variant1') && expValEqualsNoExposure('platform_editor_breakout_resizing', 'isEnabled', true)) {
|
|
14
15
|
return CodeMirror.editorAttributes.of({
|
|
15
16
|
class: (getPos === null || getPos === void 0 ? void 0 : getPos()) === 0 ? 'first-node-in-document' : ''
|
|
16
17
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-code-block-advanced",
|
|
3
|
-
"version": "21.0.
|
|
3
|
+
"version": "21.0.4",
|
|
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": "^9.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": "^208.0.0",
|
|
35
35
|
"@atlaskit/tokens": "^20.0.0",
|
|
36
36
|
"@babel/runtime": "^7.0.0",
|
|
37
37
|
"@codemirror/autocomplete": "6.18.4",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"codemirror-lang-mermaid": "0.4.0"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
|
-
"@atlaskit/editor-common": "^125.
|
|
53
|
+
"@atlaskit/editor-common": "^125.3.0",
|
|
54
54
|
"react": "^18.2.0 || ^19.2.0",
|
|
55
55
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
|
56
56
|
},
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Extension } from '@codemirror/state';
|
|
2
2
|
import { EditorView as CodeMirror } from '@codemirror/view';
|
|
3
3
|
|
|
4
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
4
5
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
5
6
|
|
|
6
7
|
/**
|
|
@@ -13,7 +14,7 @@ import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equ
|
|
|
13
14
|
*/
|
|
14
15
|
export const firstCodeBlockInDocument = (getPos: () => number | undefined): Extension => {
|
|
15
16
|
if (
|
|
16
|
-
|
|
17
|
+
editorExperiment('platform_editor_controls', 'variant1') &&
|
|
17
18
|
expValEqualsNoExposure('platform_editor_breakout_resizing', 'isEnabled', true)
|
|
18
19
|
) {
|
|
19
20
|
return CodeMirror.editorAttributes.of({
|