@atlaskit/adf-schema 37.1.32 → 37.1.34
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 +12 -0
- package/dist/cjs/next-schema/full-schema.adf.js +11 -1
- package/dist/cjs/next-schema/generated/nodeTypes.js +6 -1
- package/dist/cjs/next-schema/nodes/layoutSection.js +15 -1
- package/dist/cjs/next-schema/nodes/media.js +1 -2
- package/dist/es2019/next-schema/full-schema.adf.js +11 -1
- package/dist/es2019/next-schema/generated/nodeTypes.js +5 -0
- package/dist/es2019/next-schema/nodes/layoutSection.js +15 -1
- package/dist/es2019/next-schema/nodes/media.js +1 -2
- package/dist/esm/next-schema/full-schema.adf.js +11 -1
- package/dist/esm/next-schema/generated/nodeTypes.js +5 -0
- package/dist/esm/next-schema/nodes/layoutSection.js +15 -1
- package/dist/esm/next-schema/nodes/media.js +1 -2
- package/dist/types/next-schema/generated/nodeTypes.d.ts +8 -1
- package/dist/types/next-schema/nodes/layoutSection.d.ts +15 -1
- package/package.json +2 -2
- package/schema-generators/__tests__/unit/adfToValidatorSpecValidation.unit.ts +0 -2
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,17 @@
|
|
1
1
|
# @atlaskit/adf-schema
|
2
2
|
|
3
|
+
## 37.1.34
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- 526f86e: ED-23030: Overrides layoutSection_full for validator spec
|
8
|
+
|
9
|
+
## 37.1.33
|
10
|
+
|
11
|
+
### Patch Changes
|
12
|
+
|
13
|
+
- 755765e: Align doc node to existing validator spec
|
14
|
+
|
3
15
|
## 37.1.32
|
4
16
|
|
5
17
|
### Patch Changes
|
@@ -9,9 +9,19 @@ var _blockGroup = require("./groups/blockGroup");
|
|
9
9
|
var _layoutSection = require("./nodes/layoutSection");
|
10
10
|
var _blockRootOnlyGroup = require("./groups/blockRootOnlyGroup");
|
11
11
|
var _blockContentGroup = require("./groups/blockContentGroup");
|
12
|
+
var _codeBlock = require("./nodes/codeBlock");
|
13
|
+
var _expand = require("./nodes/expand");
|
12
14
|
var doc = (0, _adfSchemaGenerator.adfNode)('doc').define({
|
13
15
|
root: true,
|
14
16
|
version: 1,
|
15
|
-
content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(_blockGroup.blockGroup, _blockContentGroup.blockContentGroup, _layoutSection.layoutSection, _layoutSection.layoutSection.use('full'), _blockRootOnlyGroup.blockRootOnlyGroup))]
|
17
|
+
content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(_blockGroup.blockGroup, _blockContentGroup.blockContentGroup, _codeBlock.codeBlock.use('with_marks'), _layoutSection.layoutSection, _layoutSection.layoutSection.use('full'), _layoutSection.layoutSection.use('with_single_column'), _blockRootOnlyGroup.blockRootOnlyGroup, _expand.expand.use('with_breakout_mark')))],
|
18
|
+
DANGEROUS_MANUAL_OVERRIDE: {
|
19
|
+
'validator-spec': {
|
20
|
+
'props.content.minItems': {
|
21
|
+
remove: true,
|
22
|
+
reason: "@DSLCompatibilityException - The content expression and minItems don't match in the current validator schema."
|
23
|
+
}
|
24
|
+
}
|
25
|
+
}
|
16
26
|
});
|
17
27
|
var _default = exports.default = doc;
|
@@ -3,7 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.unsupportedInline = exports.unsupportedBlock = exports.textFormatted = exports.textCodeInline = exports.text = exports.taskList = exports.taskItem = exports.tableRow = exports.tableHeader = exports.tableCell = exports.table = exports.status = exports.rule = exports.placeholder = exports.paragraphWithNoMarks = exports.paragraphWithIndentation = exports.paragraphWithAlignment = exports.paragraph = exports.panelLegacy = exports.panel = exports.orderedList = exports.nestedExpandWithNoMarks = exports.nestedExpand = exports.multiBodiedExtension = exports.mention = exports.mediaSingleWidthType = exports.mediaSingleFull = exports.mediaSingleCaption = exports.mediaSingle = exports.mediaInline = exports.mediaGroup = exports.media = exports.listItemLegacy = exports.listItem = exports.layoutSectionFull = exports.layoutSection = exports.layoutColumn = exports.inlineExtensionWithMarks = exports.inlineExtension = exports.inlineCard = exports.image = exports.headingWithNoMarks = exports.headingWithIndentation = exports.headingWithAlignment = exports.heading = exports.hardBreak = exports.extensionWithMarks = exports.extensionFrame = exports.extension = exports.expandWithNoMark = exports.expand = exports.emoji = exports.embedCard = exports.doc = exports.decisionList = exports.decisionItem = exports.date = exports.confluenceUnsupportedInline = exports.confluenceUnsupportedBlock = exports.confluenceJiraIssue = exports.codeBlockWithNoMarks = exports.codeBlock = exports.caption = exports.bulletList = exports.bodiedExtensionWithMarks = exports.bodiedExtension = exports.blockquoteLegacy = exports.blockquote = exports.blockCard = void 0;
|
6
|
+
exports.unsupportedInline = exports.unsupportedBlock = exports.textFormatted = exports.textCodeInline = exports.text = exports.taskList = exports.taskItem = exports.tableRow = exports.tableHeader = exports.tableCell = exports.table = exports.status = exports.rule = exports.placeholder = exports.paragraphWithNoMarks = exports.paragraphWithIndentation = exports.paragraphWithAlignment = exports.paragraph = exports.panelLegacy = exports.panel = exports.orderedList = exports.nestedExpandWithNoMarks = exports.nestedExpand = exports.multiBodiedExtension = exports.mention = exports.mediaSingleWidthType = exports.mediaSingleFull = exports.mediaSingleCaption = exports.mediaSingle = exports.mediaInline = exports.mediaGroup = exports.media = exports.listItemLegacy = exports.listItem = exports.layoutSectionWithSingleColumn = exports.layoutSectionFull = exports.layoutSection = exports.layoutColumn = exports.inlineExtensionWithMarks = exports.inlineExtension = exports.inlineCard = exports.image = exports.headingWithNoMarks = exports.headingWithIndentation = exports.headingWithAlignment = exports.heading = exports.hardBreak = exports.extensionWithMarks = exports.extensionFrame = exports.extension = exports.expandWithNoMark = exports.expand = exports.emoji = exports.embedCard = exports.doc = exports.decisionList = exports.decisionItem = exports.date = exports.confluenceUnsupportedInline = exports.confluenceUnsupportedBlock = exports.confluenceJiraIssue = exports.codeBlockWithNoMarks = exports.codeBlock = exports.caption = exports.bulletList = exports.bodiedExtensionWithMarks = exports.bodiedExtension = exports.blockquoteLegacy = exports.blockquote = exports.blockCard = void 0;
|
7
7
|
var _adfSchemaGenerator = require("@atlaskit/adf-schema-generator");
|
8
8
|
/**
|
9
9
|
* This file was automatically generated by @atlaskit/adf-schema-generator
|
@@ -497,6 +497,11 @@ var layoutSectionFull = exports.layoutSectionFull = (0, _adfSchemaGenerator.crea
|
|
497
497
|
marks: 'unsupportedNodeAttribute unsupportedMark',
|
498
498
|
isolating: true
|
499
499
|
});
|
500
|
+
var layoutSectionWithSingleColumn = exports.layoutSectionWithSingleColumn = (0, _adfSchemaGenerator.createPMNodeSpecFactory)({
|
501
|
+
content: '(layoutColumn | unsupportedBlock){1,3}',
|
502
|
+
marks: 'unsupportedNodeAttribute unsupportedMark',
|
503
|
+
isolating: true
|
504
|
+
});
|
500
505
|
var listItem = exports.listItem = (0, _adfSchemaGenerator.createPMNodeSpecFactory)({
|
501
506
|
content: '(codeBlock | paragraph | mediaSingle | unsupportedBlock) (codeBlock | paragraph | mediaSingle | taskList | bulletList | orderedList | unsupportedBlock)*',
|
502
507
|
marks: 'unsupportedNodeAttribute unsupportedMark',
|
@@ -28,8 +28,22 @@ var layoutSection = exports.layoutSection = (0, _adfSchemaGenerator.adfNode)('la
|
|
28
28
|
}
|
29
29
|
}
|
30
30
|
}
|
31
|
+
}).variant('with_single_column', {
|
32
|
+
content: [(0, _adfSchemaGenerator.$range)(1, 3, (0, _adfSchemaGenerator.$or)(_layoutColumn.layoutColumn, _unsupportedBlock.unsupportedBlock))],
|
33
|
+
ignore: ['json-schema']
|
31
34
|
}).variant('full', {
|
32
35
|
marks: [_breakout.breakout, _unsupportedNodeAttribute.unsupportedNodeAttribute, _unsupportedMark.unsupportedMark],
|
33
36
|
content: [(0, _adfSchemaGenerator.$range)(2, 3, (0, _adfSchemaGenerator.$or)(_layoutColumn.layoutColumn, _unsupportedBlock.unsupportedBlock))],
|
34
|
-
ignore: []
|
37
|
+
ignore: [],
|
38
|
+
DANGEROUS_MANUAL_OVERRIDE: {
|
39
|
+
'validator-spec': {
|
40
|
+
'props.type': {
|
41
|
+
value: {
|
42
|
+
type: 'enum',
|
43
|
+
values: ['layoutSection']
|
44
|
+
},
|
45
|
+
reason: '@DSLCompatibilityException - mismatch for layoutSection'
|
46
|
+
}
|
47
|
+
}
|
48
|
+
}
|
35
49
|
});
|
@@ -3,9 +3,19 @@ import { blockGroup } from './groups/blockGroup';
|
|
3
3
|
import { layoutSection } from './nodes/layoutSection';
|
4
4
|
import { blockRootOnlyGroup } from './groups/blockRootOnlyGroup';
|
5
5
|
import { blockContentGroup } from './groups/blockContentGroup';
|
6
|
+
import { codeBlock } from './nodes/codeBlock';
|
7
|
+
import { expand } from './nodes/expand';
|
6
8
|
const doc = adfNode('doc').define({
|
7
9
|
root: true,
|
8
10
|
version: 1,
|
9
|
-
content: [$onePlus($or(blockGroup, blockContentGroup, layoutSection, layoutSection.use('full'), blockRootOnlyGroup))]
|
11
|
+
content: [$onePlus($or(blockGroup, blockContentGroup, codeBlock.use('with_marks'), layoutSection, layoutSection.use('full'), layoutSection.use('with_single_column'), blockRootOnlyGroup, expand.use('with_breakout_mark')))],
|
12
|
+
DANGEROUS_MANUAL_OVERRIDE: {
|
13
|
+
'validator-spec': {
|
14
|
+
'props.content.minItems': {
|
15
|
+
remove: true,
|
16
|
+
reason: "@DSLCompatibilityException - The content expression and minItems don't match in the current validator schema."
|
17
|
+
}
|
18
|
+
}
|
19
|
+
}
|
10
20
|
});
|
11
21
|
export default doc;
|
@@ -491,6 +491,11 @@ export const layoutSectionFull = createPMNodeSpecFactory({
|
|
491
491
|
marks: 'unsupportedNodeAttribute unsupportedMark',
|
492
492
|
isolating: true
|
493
493
|
});
|
494
|
+
export const layoutSectionWithSingleColumn = createPMNodeSpecFactory({
|
495
|
+
content: '(layoutColumn | unsupportedBlock){1,3}',
|
496
|
+
marks: 'unsupportedNodeAttribute unsupportedMark',
|
497
|
+
isolating: true
|
498
|
+
});
|
494
499
|
export const listItem = createPMNodeSpecFactory({
|
495
500
|
content: '(codeBlock | paragraph | mediaSingle | unsupportedBlock) (codeBlock | paragraph | mediaSingle | taskList | bulletList | orderedList | unsupportedBlock)*',
|
496
501
|
marks: 'unsupportedNodeAttribute unsupportedMark',
|
@@ -22,8 +22,22 @@ export const layoutSection = adfNode('layoutSection').define({
|
|
22
22
|
}
|
23
23
|
}
|
24
24
|
}
|
25
|
+
}).variant('with_single_column', {
|
26
|
+
content: [$range(1, 3, $or(layoutColumn, unsupportedBlock))],
|
27
|
+
ignore: ['json-schema']
|
25
28
|
}).variant('full', {
|
26
29
|
marks: [breakout, unsupportedNodeAttribute, unsupportedMark],
|
27
30
|
content: [$range(2, 3, $or(layoutColumn, unsupportedBlock))],
|
28
|
-
ignore: []
|
31
|
+
ignore: [],
|
32
|
+
DANGEROUS_MANUAL_OVERRIDE: {
|
33
|
+
'validator-spec': {
|
34
|
+
'props.type': {
|
35
|
+
value: {
|
36
|
+
type: 'enum',
|
37
|
+
values: ['layoutSection']
|
38
|
+
},
|
39
|
+
reason: '@DSLCompatibilityException - mismatch for layoutSection'
|
40
|
+
}
|
41
|
+
}
|
42
|
+
}
|
29
43
|
});
|
@@ -3,9 +3,19 @@ import { blockGroup } from './groups/blockGroup';
|
|
3
3
|
import { layoutSection } from './nodes/layoutSection';
|
4
4
|
import { blockRootOnlyGroup } from './groups/blockRootOnlyGroup';
|
5
5
|
import { blockContentGroup } from './groups/blockContentGroup';
|
6
|
+
import { codeBlock } from './nodes/codeBlock';
|
7
|
+
import { expand } from './nodes/expand';
|
6
8
|
var doc = adfNode('doc').define({
|
7
9
|
root: true,
|
8
10
|
version: 1,
|
9
|
-
content: [$onePlus($or(blockGroup, blockContentGroup, layoutSection, layoutSection.use('full'), blockRootOnlyGroup))]
|
11
|
+
content: [$onePlus($or(blockGroup, blockContentGroup, codeBlock.use('with_marks'), layoutSection, layoutSection.use('full'), layoutSection.use('with_single_column'), blockRootOnlyGroup, expand.use('with_breakout_mark')))],
|
12
|
+
DANGEROUS_MANUAL_OVERRIDE: {
|
13
|
+
'validator-spec': {
|
14
|
+
'props.content.minItems': {
|
15
|
+
remove: true,
|
16
|
+
reason: "@DSLCompatibilityException - The content expression and minItems don't match in the current validator schema."
|
17
|
+
}
|
18
|
+
}
|
19
|
+
}
|
10
20
|
});
|
11
21
|
export default doc;
|
@@ -491,6 +491,11 @@ export var layoutSectionFull = createPMNodeSpecFactory({
|
|
491
491
|
marks: 'unsupportedNodeAttribute unsupportedMark',
|
492
492
|
isolating: true
|
493
493
|
});
|
494
|
+
export var layoutSectionWithSingleColumn = createPMNodeSpecFactory({
|
495
|
+
content: '(layoutColumn | unsupportedBlock){1,3}',
|
496
|
+
marks: 'unsupportedNodeAttribute unsupportedMark',
|
497
|
+
isolating: true
|
498
|
+
});
|
494
499
|
export var listItem = createPMNodeSpecFactory({
|
495
500
|
content: '(codeBlock | paragraph | mediaSingle | unsupportedBlock) (codeBlock | paragraph | mediaSingle | taskList | bulletList | orderedList | unsupportedBlock)*',
|
496
501
|
marks: 'unsupportedNodeAttribute unsupportedMark',
|
@@ -22,8 +22,22 @@ export var layoutSection = adfNode('layoutSection').define({
|
|
22
22
|
}
|
23
23
|
}
|
24
24
|
}
|
25
|
+
}).variant('with_single_column', {
|
26
|
+
content: [$range(1, 3, $or(layoutColumn, unsupportedBlock))],
|
27
|
+
ignore: ['json-schema']
|
25
28
|
}).variant('full', {
|
26
29
|
marks: [breakout, unsupportedNodeAttribute, unsupportedMark],
|
27
30
|
content: [$range(2, 3, $or(layoutColumn, unsupportedBlock))],
|
28
|
-
ignore: []
|
31
|
+
ignore: [],
|
32
|
+
DANGEROUS_MANUAL_OVERRIDE: {
|
33
|
+
'validator-spec': {
|
34
|
+
'props.type': {
|
35
|
+
value: {
|
36
|
+
type: 'enum',
|
37
|
+
values: ['layoutSection']
|
38
|
+
},
|
39
|
+
reason: '@DSLCompatibilityException - mismatch for layoutSection'
|
40
|
+
}
|
41
|
+
}
|
42
|
+
}
|
29
43
|
});
|
@@ -162,7 +162,7 @@ export type DecisionListNode = PMNode & DecisionListDefinition;
|
|
162
162
|
export declare const decisionList: ({ parseDOM, toDOM, toDebugString }: import("@atlaskit/adf-schema-generator").NodeSpecOptions<DecisionListNode>) => import("prosemirror-model").NodeSpec;
|
163
163
|
export interface DocDefinition {
|
164
164
|
type: 'doc';
|
165
|
-
content: Array<BlockDefinition | BlockRootOnlyDefinition | LayoutSectionDefinition | LayoutSectionFullDefinition>;
|
165
|
+
content: Array<BlockDefinition | BlockRootOnlyDefinition | LayoutSectionDefinition | LayoutSectionFullDefinition | LayoutSectionWithSingleColumnDefinition>;
|
166
166
|
}
|
167
167
|
export type DocNode = PMNode & DocDefinition;
|
168
168
|
export declare const doc: ({ parseDOM, toDOM, toDebugString }: import("@atlaskit/adf-schema-generator").NodeSpecOptions<DocNode>) => import("prosemirror-model").NodeSpec;
|
@@ -367,6 +367,13 @@ export interface LayoutSectionFullDefinition {
|
|
367
367
|
}
|
368
368
|
export type LayoutSectionFullNode = PMNode & LayoutSectionFullDefinition;
|
369
369
|
export declare const layoutSectionFull: ({ parseDOM, toDOM, toDebugString }: import("@atlaskit/adf-schema-generator").NodeSpecOptions<LayoutSectionFullNode>) => import("prosemirror-model").NodeSpec;
|
370
|
+
export interface LayoutSectionWithSingleColumnDefinition {
|
371
|
+
type: 'layoutSection';
|
372
|
+
content: Array<LayoutColumnDefinition | UnsupportedBlockDefinition>;
|
373
|
+
marks: Array<BreakoutMark | UnsupportedMarkMark | UnsupportedNodeAttributeMark>;
|
374
|
+
}
|
375
|
+
export type LayoutSectionWithSingleColumnNode = PMNode & LayoutSectionWithSingleColumnDefinition;
|
376
|
+
export declare const layoutSectionWithSingleColumn: ({ parseDOM, toDOM, toDebugString }: import("@atlaskit/adf-schema-generator").NodeSpecOptions<LayoutSectionWithSingleColumnNode>) => import("prosemirror-model").NodeSpec;
|
370
377
|
export interface ListItemDefinition {
|
371
378
|
type: 'listItem';
|
372
379
|
content: Array<BulletListDefinition | CodeBlockWithNoMarksDefinition | CodeBlockWithNoMarksDefinition | MediaSingleCaptionDefinition | MediaSingleCaptionDefinition | MediaSingleFullDefinition | MediaSingleFullDefinition | OrderedListDefinition | ParagraphWithNoMarksDefinition | ParagraphWithNoMarksDefinition | TaskListDefinition | UnsupportedBlockDefinition | UnsupportedBlockDefinition>;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export declare const layoutSection: import("@atlaskit/adf-schema-generator/dist/types/adfNode").ADFNode<[string, "full"], {
|
1
|
+
export declare const layoutSection: import("@atlaskit/adf-schema-generator/dist/types/adfNode").ADFNode<[string, "with_single_column", "full"], {
|
2
2
|
ignore?: import("@atlaskit/adf-schema-generator/dist/types/transforms/transformerNames").TransformerNames[];
|
3
3
|
root?: boolean;
|
4
4
|
atom?: boolean;
|
@@ -27,8 +27,22 @@ export declare const layoutSection: import("@atlaskit/adf-schema-generator/dist/
|
|
27
27
|
'pm-spec'?: import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").DangerousManualOverride;
|
28
28
|
'validator-spec'?: import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").DangerousManualOverride;
|
29
29
|
};
|
30
|
+
} & {
|
31
|
+
content: import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").ADFNodeContentRangeSpec[];
|
32
|
+
ignore: "json-schema"[];
|
30
33
|
} & {
|
31
34
|
marks: import("@atlaskit/adf-schema-generator/dist/types/adfMark").ADFMark<import("@atlaskit/adf-schema-generator/dist/types/types/ADFMarkSpec").ADFMarkSpec>[];
|
32
35
|
content: import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").ADFNodeContentRangeSpec[];
|
33
36
|
ignore: any[];
|
37
|
+
DANGEROUS_MANUAL_OVERRIDE: {
|
38
|
+
'validator-spec': {
|
39
|
+
'props.type': {
|
40
|
+
value: {
|
41
|
+
type: string;
|
42
|
+
values: string[];
|
43
|
+
};
|
44
|
+
reason: string;
|
45
|
+
};
|
46
|
+
};
|
47
|
+
};
|
34
48
|
}>;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@atlaskit/adf-schema",
|
3
|
-
"version": "37.1.
|
3
|
+
"version": "37.1.34",
|
4
4
|
"description": "Shared package that contains the ADF-schema (json) and ProseMirror node/mark specs",
|
5
5
|
"publishConfig": {
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
@@ -47,7 +47,7 @@
|
|
47
47
|
},
|
48
48
|
"devDependencies": {
|
49
49
|
"@atlassian/adf-schema-json": "^1.16.0",
|
50
|
-
"@atlaskit/adf-schema-generator": "^1.25.
|
50
|
+
"@atlaskit/adf-schema-generator": "^1.25.6",
|
51
51
|
"@atlaskit/adf-utils": "^19.2.2",
|
52
52
|
"@atlaskit/codemod-utils": "^4.2.4",
|
53
53
|
"@atlaskit/json-schema-generator": "^3.3.9",
|
@@ -5,9 +5,7 @@ import adfNode from '../../../src/next-schema/full-schema.adf';
|
|
5
5
|
const newSpecs = sortNestedArrays(adfToValidatorSpec(adfNode));
|
6
6
|
const SKIP_LIST = [
|
7
7
|
'codeBlock', // doesn't match existing spec
|
8
|
-
'doc', // doesn't match existing spec, need to flatten groups
|
9
8
|
'inline_comment_marker', // doesn't exist in the output
|
10
|
-
'layoutSection_full', // doesn't match existing spec, allowUnsupportedBlock, extra marks
|
11
9
|
'layoutSection_with_single_column', // doesn't exist in the output
|
12
10
|
'media', // doesn't match existing spec
|
13
11
|
'mediaInline', // doesn't match existing spec
|