@atlaskit/editor-plugin-code-block-advanced 10.0.16 → 10.0.18
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 +15 -0
- package/afm-cc/tsconfig.json +0 -1
- package/afm-products/tsconfig.json +0 -1
- package/dist/cjs/nodeviews/codeBlockNodeWithToDOMFixed.js +4 -2
- package/dist/es2019/nodeviews/codeBlockNodeWithToDOMFixed.js +4 -1
- package/dist/esm/nodeviews/codeBlockNodeWithToDOMFixed.js +4 -2
- package/package.json +5 -5
- package/src/nodeviews/codeBlockNodeWithToDOMFixed.ts +8 -1
- package/afm-jira/tsconfig.json +0 -66
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-code-block-advanced
|
|
2
2
|
|
|
3
|
+
## 10.0.18
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 10.0.17
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`ded95ac7efcc4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ded95ac7efcc4) -
|
|
14
|
+
Persist code block wrap state in ADF, default code blocks created across editor runtime paths to
|
|
15
|
+
wrapped, and update the wrap toolbar tooltip behind platform_editor_code_block_q4_lovability.
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 10.0.16
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
package/afm-cc/tsconfig.json
CHANGED
|
@@ -38,11 +38,13 @@ var _toDOM = function toDOM(node, formattedAriaLabel, config) {
|
|
|
38
38
|
var content = node.textContent.split('\n').map(function (_, i) {
|
|
39
39
|
return i + 1;
|
|
40
40
|
}).join('\n');
|
|
41
|
-
return ['pre', {
|
|
41
|
+
return ['pre', _objectSpread({
|
|
42
42
|
class: codeBlockClassNames.container,
|
|
43
43
|
style: "--lineNumberGutterWidth:".concat(maxDigits, "ch;"),
|
|
44
44
|
'data-language': node.attrs.language || ''
|
|
45
|
-
},
|
|
45
|
+
}, (0, _expValEquals.expValEquals)('platform_editor_code_block_q4_lovability', 'isEnabled', true) && {
|
|
46
|
+
'data-wrap': node.attrs.wrap ? 'true' : 'false'
|
|
47
|
+
}), ['div', {
|
|
46
48
|
class: codeBlockClassNames.start,
|
|
47
49
|
contenteditable: 'false'
|
|
48
50
|
}], ['div', {
|
|
@@ -27,7 +27,10 @@ const toDOM = (node, formattedAriaLabel, config) => {
|
|
|
27
27
|
return ['pre', {
|
|
28
28
|
class: codeBlockClassNames.container,
|
|
29
29
|
style: `--lineNumberGutterWidth:${maxDigits}ch;`,
|
|
30
|
-
'data-language': node.attrs.language || ''
|
|
30
|
+
'data-language': node.attrs.language || '',
|
|
31
|
+
...(expValEquals('platform_editor_code_block_q4_lovability', 'isEnabled', true) && {
|
|
32
|
+
'data-wrap': node.attrs.wrap ? 'true' : 'false'
|
|
33
|
+
})
|
|
31
34
|
}, ['div', {
|
|
32
35
|
class: codeBlockClassNames.start,
|
|
33
36
|
contenteditable: 'false'
|
|
@@ -31,11 +31,13 @@ var _toDOM = function toDOM(node, formattedAriaLabel, config) {
|
|
|
31
31
|
var content = node.textContent.split('\n').map(function (_, i) {
|
|
32
32
|
return i + 1;
|
|
33
33
|
}).join('\n');
|
|
34
|
-
return ['pre', {
|
|
34
|
+
return ['pre', _objectSpread({
|
|
35
35
|
class: codeBlockClassNames.container,
|
|
36
36
|
style: "--lineNumberGutterWidth:".concat(maxDigits, "ch;"),
|
|
37
37
|
'data-language': node.attrs.language || ''
|
|
38
|
-
},
|
|
38
|
+
}, expValEquals('platform_editor_code_block_q4_lovability', 'isEnabled', true) && {
|
|
39
|
+
'data-wrap': node.attrs.wrap ? 'true' : 'false'
|
|
40
|
+
}), ['div', {
|
|
39
41
|
class: codeBlockClassNames.start,
|
|
40
42
|
contenteditable: 'false'
|
|
41
43
|
}], ['div', {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-code-block-advanced",
|
|
3
|
-
"version": "10.0.
|
|
3
|
+
"version": "10.0.18",
|
|
4
4
|
"description": "CodeBlockAdvanced plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -28,17 +28,17 @@
|
|
|
28
28
|
"sideEffects": false,
|
|
29
29
|
"atlaskit:src": "src/index.ts",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@atlaskit/adf-schema": "^52.
|
|
31
|
+
"@atlaskit/adf-schema": "^52.10.0",
|
|
32
32
|
"@atlaskit/code": "^17.5.0",
|
|
33
33
|
"@atlaskit/editor-plugin-code-block": "^12.0.0",
|
|
34
34
|
"@atlaskit/editor-plugin-editor-disabled": "^10.0.0",
|
|
35
|
-
"@atlaskit/editor-plugin-find-replace": "^10.
|
|
35
|
+
"@atlaskit/editor-plugin-find-replace": "^10.1.0",
|
|
36
36
|
"@atlaskit/editor-plugin-selection": "^10.0.0",
|
|
37
37
|
"@atlaskit/editor-plugin-selection-marker": "^10.1.0",
|
|
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": "^
|
|
41
|
+
"@atlaskit/tmp-editor-statsig": "^78.0.0",
|
|
42
42
|
"@atlaskit/tokens": "^13.0.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": "^114.
|
|
58
|
+
"@atlaskit/editor-common": "^114.26.0",
|
|
59
59
|
"react": "^18.2.0",
|
|
60
60
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
|
61
61
|
},
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
codeBlock,
|
|
3
|
+
codeBlockWithExtendedAttributes,
|
|
4
|
+
codeBlockWithLocalId,
|
|
5
|
+
} from '@atlaskit/adf-schema';
|
|
2
6
|
import { convertToInlineCss } from '@atlaskit/editor-common/lazy-node-view';
|
|
3
7
|
import { CodeBlockSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
4
8
|
import type { NodeSpec, DOMOutputSpec, Node } from '@atlaskit/editor-prosemirror/model';
|
|
@@ -51,6 +55,9 @@ const toDOM = (node: Node, formattedAriaLabel: string, config: Config): DOMOutpu
|
|
|
51
55
|
class: codeBlockClassNames.container,
|
|
52
56
|
style: `--lineNumberGutterWidth:${maxDigits}ch;`,
|
|
53
57
|
'data-language': node.attrs.language || '',
|
|
58
|
+
...(expValEquals('platform_editor_code_block_q4_lovability', 'isEnabled', true) && {
|
|
59
|
+
'data-wrap': node.attrs.wrap ? 'true' : 'false',
|
|
60
|
+
}),
|
|
54
61
|
},
|
|
55
62
|
['div', { class: codeBlockClassNames.start, contenteditable: 'false' }],
|
|
56
63
|
[
|
package/afm-jira/tsconfig.json
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "../../../../tsconfig.local-consumption.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"target": "es5",
|
|
5
|
-
"outDir": "../../../../../jira/tsDist/@atlaskit__editor-plugin-code-block-advanced/app",
|
|
6
|
-
"rootDir": "../",
|
|
7
|
-
"composite": true,
|
|
8
|
-
"noCheck": true
|
|
9
|
-
},
|
|
10
|
-
"include": [
|
|
11
|
-
"../src/**/*.ts",
|
|
12
|
-
"../src/**/*.tsx"
|
|
13
|
-
],
|
|
14
|
-
"exclude": [
|
|
15
|
-
"../src/**/__tests__/*",
|
|
16
|
-
"../src/**/*.test.*",
|
|
17
|
-
"../src/**/test.*",
|
|
18
|
-
"../src/**/examples.*",
|
|
19
|
-
"../src/**/examples/*",
|
|
20
|
-
"../src/**/examples/**/*",
|
|
21
|
-
"../src/**/*.stories.*",
|
|
22
|
-
"../src/**/stories/*",
|
|
23
|
-
"../src/**/stories/**/*"
|
|
24
|
-
],
|
|
25
|
-
"references": [
|
|
26
|
-
{
|
|
27
|
-
"path": "../../adf-schema/afm-jira/tsconfig.json"
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
"path": "../../../design-system/code/afm-jira/tsconfig.json"
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
"path": "../../editor-plugin-code-block/afm-jira/tsconfig.json"
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
"path": "../../editor-plugin-editor-disabled/afm-jira/tsconfig.json"
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
"path": "../../editor-plugin-find-replace/afm-jira/tsconfig.json"
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
"path": "../../editor-plugin-selection/afm-jira/tsconfig.json"
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
"path": "../../editor-plugin-selection-marker/afm-jira/tsconfig.json"
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
"path": "../../editor-prosemirror/afm-jira/tsconfig.json"
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
"path": "../../../platform/feature-flags/afm-jira/tsconfig.json"
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
"path": "../../prosemirror-history/afm-jira/tsconfig.json"
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
"path": "../../tmp-editor-statsig/afm-jira/tsconfig.json"
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
"path": "../../../design-system/tokens/afm-jira/tsconfig.json"
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
"path": "../../editor-common/afm-jira/tsconfig.json"
|
|
64
|
-
}
|
|
65
|
-
]
|
|
66
|
-
}
|