@atlaskit/editor-plugin-block-menu 9.0.17 → 9.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 +9 -0
- package/afm-cc/tsconfig.json +0 -1
- package/afm-products/tsconfig.json +0 -1
- package/dist/cjs/editor-commands/transform-node-utils/steps/wrapMixedContentStep.js +3 -1
- package/dist/cjs/editor-commands/transform-node-utils/wrapStep.js +3 -1
- package/dist/es2019/editor-commands/transform-node-utils/steps/wrapMixedContentStep.js +3 -1
- package/dist/es2019/editor-commands/transform-node-utils/wrapStep.js +3 -1
- package/dist/esm/editor-commands/transform-node-utils/steps/wrapMixedContentStep.js +3 -1
- package/dist/esm/editor-commands/transform-node-utils/wrapStep.js +3 -1
- package/dist/types/ui/copy-section.d.ts +1 -1
- package/dist/types-ts4.5/ui/copy-section.d.ts +1 -1
- package/package.json +3 -3
- package/afm-jira/tsconfig.json +0 -79
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-block-menu
|
|
2
2
|
|
|
3
|
+
## 9.0.18
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`ded95ac7efcc4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ded95ac7efcc4) -
|
|
8
|
+
Persist code block wrap state in ADF, default code blocks created across editor runtime paths to
|
|
9
|
+
wrapped, and update the wrap toolbar tooltip behind platform_editor_code_block_q4_lovability.
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
3
12
|
## 9.0.17
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
package/afm-cc/tsconfig.json
CHANGED
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.wrapMixedContentStep = void 0;
|
|
8
8
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
9
|
+
var _codeBlock = require("@atlaskit/editor-common/code-block");
|
|
9
10
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
10
11
|
var _model = require("@atlaskit/editor-prosemirror/model");
|
|
11
12
|
var _marks = require("../marks");
|
|
@@ -30,7 +31,8 @@ var createLayoutSection = function createLayoutSection(content, layoutSection, l
|
|
|
30
31
|
var createTextContentContainer = function createTextContentContainer(textContentArray, targetNodeType, schema) {
|
|
31
32
|
var textContent = textContentArray.join('\n');
|
|
32
33
|
var textNode = textContent ? schema.text(textContent) : null;
|
|
33
|
-
|
|
34
|
+
var attrs = targetNodeType.name === 'codeBlock' ? (0, _codeBlock.getDefaultCodeBlockAttrs)() : {};
|
|
35
|
+
return targetNodeType.createAndFill(attrs, textNode);
|
|
34
36
|
};
|
|
35
37
|
|
|
36
38
|
/**
|
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.wrapStep = void 0;
|
|
7
|
+
var _codeBlock = require("@atlaskit/editor-common/code-block");
|
|
7
8
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
8
9
|
var _marks = require("./marks");
|
|
9
10
|
var _utils2 = require("./utils");
|
|
@@ -34,9 +35,10 @@ var wrapStep = exports.wrapStep = function wrapStep(nodes, context) {
|
|
|
34
35
|
}
|
|
35
36
|
var targetNodeType = schema.nodes[targetNodeTypeName];
|
|
36
37
|
var isExpandType = targetNodeTypeName === 'expand' || targetNodeTypeName === 'nestedExpand';
|
|
38
|
+
var isCodeBlock = targetNodeTypeName === 'codeBlock';
|
|
37
39
|
var nodeAttrs = isExpandType ? {
|
|
38
40
|
localId: crypto.randomUUID()
|
|
39
|
-
} : {};
|
|
41
|
+
} : isCodeBlock ? (0, _codeBlock.getDefaultCodeBlockAttrs)() : {};
|
|
40
42
|
var sourceSupportsBreakout = _utils.breakoutResizableNodes.includes(fromNode.type.name);
|
|
41
43
|
var targetSupportsBreakout = _utils.breakoutResizableNodes.includes(targetNodeType.name);
|
|
42
44
|
var shouldPreserveBreakout = sourceSupportsBreakout && targetSupportsBreakout;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { getDefaultCodeBlockAttrs } from '@atlaskit/editor-common/code-block';
|
|
1
2
|
import { breakoutResizableNodes } from '@atlaskit/editor-common/utils';
|
|
2
3
|
import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
3
4
|
import { removeDisallowedMarks } from '../marks';
|
|
@@ -23,7 +24,8 @@ const createLayoutSection = (content, layoutSection, layoutColumn, marks) => {
|
|
|
23
24
|
const createTextContentContainer = (textContentArray, targetNodeType, schema) => {
|
|
24
25
|
const textContent = textContentArray.join('\n');
|
|
25
26
|
const textNode = textContent ? schema.text(textContent) : null;
|
|
26
|
-
|
|
27
|
+
const attrs = targetNodeType.name === 'codeBlock' ? getDefaultCodeBlockAttrs() : {};
|
|
28
|
+
return targetNodeType.createAndFill(attrs, textNode);
|
|
27
29
|
};
|
|
28
30
|
|
|
29
31
|
/**
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { getDefaultCodeBlockAttrs } from '@atlaskit/editor-common/code-block';
|
|
1
2
|
import { breakoutResizableNodes } from '@atlaskit/editor-common/utils';
|
|
2
3
|
import { removeDisallowedMarks } from './marks';
|
|
3
4
|
import { convertExpandToNestedExpand } from './utils';
|
|
@@ -31,9 +32,10 @@ export const wrapStep = (nodes, context) => {
|
|
|
31
32
|
}
|
|
32
33
|
const targetNodeType = schema.nodes[targetNodeTypeName];
|
|
33
34
|
const isExpandType = targetNodeTypeName === 'expand' || targetNodeTypeName === 'nestedExpand';
|
|
35
|
+
const isCodeBlock = targetNodeTypeName === 'codeBlock';
|
|
34
36
|
const nodeAttrs = isExpandType ? {
|
|
35
37
|
localId: crypto.randomUUID()
|
|
36
|
-
} : {};
|
|
38
|
+
} : isCodeBlock ? getDefaultCodeBlockAttrs() : {};
|
|
37
39
|
const sourceSupportsBreakout = breakoutResizableNodes.includes(fromNode.type.name);
|
|
38
40
|
const targetSupportsBreakout = breakoutResizableNodes.includes(targetNodeType.name);
|
|
39
41
|
const shouldPreserveBreakout = sourceSupportsBreakout && targetSupportsBreakout;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
|
+
import { getDefaultCodeBlockAttrs } from '@atlaskit/editor-common/code-block';
|
|
2
3
|
import { breakoutResizableNodes } from '@atlaskit/editor-common/utils';
|
|
3
4
|
import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
4
5
|
import { removeDisallowedMarks } from '../marks';
|
|
@@ -24,7 +25,8 @@ var createLayoutSection = function createLayoutSection(content, layoutSection, l
|
|
|
24
25
|
var createTextContentContainer = function createTextContentContainer(textContentArray, targetNodeType, schema) {
|
|
25
26
|
var textContent = textContentArray.join('\n');
|
|
26
27
|
var textNode = textContent ? schema.text(textContent) : null;
|
|
27
|
-
|
|
28
|
+
var attrs = targetNodeType.name === 'codeBlock' ? getDefaultCodeBlockAttrs() : {};
|
|
29
|
+
return targetNodeType.createAndFill(attrs, textNode);
|
|
28
30
|
};
|
|
29
31
|
|
|
30
32
|
/**
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { getDefaultCodeBlockAttrs } from '@atlaskit/editor-common/code-block';
|
|
1
2
|
import { breakoutResizableNodes } from '@atlaskit/editor-common/utils';
|
|
2
3
|
import { removeDisallowedMarks } from './marks';
|
|
3
4
|
import { convertExpandToNestedExpand } from './utils';
|
|
@@ -29,9 +30,10 @@ export var wrapStep = function wrapStep(nodes, context) {
|
|
|
29
30
|
}
|
|
30
31
|
var targetNodeType = schema.nodes[targetNodeTypeName];
|
|
31
32
|
var isExpandType = targetNodeTypeName === 'expand' || targetNodeTypeName === 'nestedExpand';
|
|
33
|
+
var isCodeBlock = targetNodeTypeName === 'codeBlock';
|
|
32
34
|
var nodeAttrs = isExpandType ? {
|
|
33
35
|
localId: crypto.randomUUID()
|
|
34
|
-
} : {};
|
|
36
|
+
} : isCodeBlock ? getDefaultCodeBlockAttrs() : {};
|
|
35
37
|
var sourceSupportsBreakout = breakoutResizableNodes.includes(fromNode.type.name);
|
|
36
38
|
var targetSupportsBreakout = breakoutResizableNodes.includes(targetNodeType.name);
|
|
37
39
|
var shouldPreserveBreakout = sourceSupportsBreakout && targetSupportsBreakout;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-block-menu",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.18",
|
|
4
4
|
"description": "BlockMenu plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -44,13 +44,13 @@
|
|
|
44
44
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
45
45
|
"@atlaskit/primitives": "^19.0.0",
|
|
46
46
|
"@atlaskit/prosemirror-history": "^0.2.0",
|
|
47
|
-
"@atlaskit/tmp-editor-statsig": "^77.
|
|
47
|
+
"@atlaskit/tmp-editor-statsig": "^77.2.0",
|
|
48
48
|
"@atlaskit/tokens": "^13.0.0",
|
|
49
49
|
"@babel/runtime": "^7.0.0",
|
|
50
50
|
"bind-event-listener": "^3.0.0"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
|
-
"@atlaskit/editor-common": "^114.
|
|
53
|
+
"@atlaskit/editor-common": "^114.25.0",
|
|
54
54
|
"react": "^18.2.0",
|
|
55
55
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
|
56
56
|
},
|
package/afm-jira/tsconfig.json
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "../../../../tsconfig.local-consumption.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"target": "es5",
|
|
5
|
-
"outDir": "../../../../../jira/tsDist/@atlaskit__editor-plugin-block-menu/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
|
-
],
|
|
20
|
-
"references": [
|
|
21
|
-
{
|
|
22
|
-
"path": "../../../helpers/browser-apis/afm-jira/tsconfig.json"
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
"path": "../../../design-system/css/afm-jira/tsconfig.json"
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
"path": "../../editor-plugin-analytics/afm-jira/tsconfig.json"
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
"path": "../../editor-plugin-block-controls/afm-jira/tsconfig.json"
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
"path": "../../editor-plugin-decorations/afm-jira/tsconfig.json"
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
"path": "../../editor-plugin-selection/afm-jira/tsconfig.json"
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
"path": "../../editor-plugin-user-intent/afm-jira/tsconfig.json"
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
"path": "../../editor-prosemirror/afm-jira/tsconfig.json"
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
"path": "../../editor-shared-styles/afm-jira/tsconfig.json"
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
"path": "../../editor-tables/afm-jira/tsconfig.json"
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
"path": "../../editor-toolbar/afm-jira/tsconfig.json"
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
"path": "../../../design-system/flag/afm-jira/tsconfig.json"
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
"path": "../../../design-system/icon/afm-jira/tsconfig.json"
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
"path": "../../../platform/feature-flags/afm-jira/tsconfig.json"
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
"path": "../../../design-system/primitives/afm-jira/tsconfig.json"
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
"path": "../../prosemirror-history/afm-jira/tsconfig.json"
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
"path": "../../tmp-editor-statsig/afm-jira/tsconfig.json"
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
"path": "../../../design-system/tokens/afm-jira/tsconfig.json"
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
"path": "../../editor-common/afm-jira/tsconfig.json"
|
|
77
|
-
}
|
|
78
|
-
]
|
|
79
|
-
}
|