@atlaskit/adf-schema 36.5.0 → 36.6.0
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 +10 -0
- package/dist/cjs/next-schema/marks/alignmentAndIndentation.js +32 -0
- package/dist/cjs/next-schema/nodes/heading.js +3 -4
- package/dist/cjs/next-schema/nodes/paragraph.js +5 -6
- package/dist/es2019/next-schema/marks/alignmentAndIndentation.js +28 -0
- package/dist/es2019/next-schema/nodes/heading.js +1 -2
- package/dist/es2019/next-schema/nodes/paragraph.js +1 -2
- package/dist/esm/next-schema/marks/alignmentAndIndentation.js +28 -0
- package/dist/esm/next-schema/nodes/heading.js +1 -2
- package/dist/esm/next-schema/nodes/paragraph.js +1 -2
- package/dist/types/next-schema/marks/{indentation.d.ts → alignmentAndIndentation.d.ts} +1 -0
- package/package.json +2 -2
- package/schema-generators/full-schema.ts +7 -1
- package/dist/cjs/next-schema/groups/alignementMarkExclusionGroup.js +0 -9
- package/dist/cjs/next-schema/groups/indentationMarkExclusionGroup.js +0 -9
- package/dist/cjs/next-schema/marks/alignment.js +0 -18
- package/dist/cjs/next-schema/marks/indentation.js +0 -18
- package/dist/es2019/next-schema/groups/alignementMarkExclusionGroup.js +0 -3
- package/dist/es2019/next-schema/groups/indentationMarkExclusionGroup.js +0 -3
- package/dist/es2019/next-schema/marks/alignment.js +0 -12
- package/dist/es2019/next-schema/marks/indentation.js +0 -12
- package/dist/esm/next-schema/groups/alignementMarkExclusionGroup.js +0 -3
- package/dist/esm/next-schema/groups/indentationMarkExclusionGroup.js +0 -3
- package/dist/esm/next-schema/marks/alignment.js +0 -12
- package/dist/esm/next-schema/marks/indentation.js +0 -12
- package/dist/types/next-schema/groups/alignementMarkExclusionGroup.d.ts +0 -1
- package/dist/types/next-schema/groups/indentationMarkExclusionGroup.d.ts +0 -1
- package/dist/types/next-schema/marks/alignment.d.ts +0 -1
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,15 @@
|
|
1
1
|
# @atlaskit/adf-schema
|
2
2
|
|
3
|
+
## 36.6.0
|
4
|
+
|
5
|
+
### Minor Changes
|
6
|
+
|
7
|
+
- 14fa4c0: Bootstrap ADF DSL nodes and marks
|
8
|
+
|
9
|
+
### Patch Changes
|
10
|
+
|
11
|
+
- d21d4ab: fix: alignment and indentation cycle results in one of them being undefined
|
12
|
+
|
3
13
|
## 36.5.0
|
4
14
|
|
5
15
|
### Minor Changes
|
@@ -0,0 +1,32 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.indentation = exports.alignment = void 0;
|
7
|
+
var _adfSchemaGenerator = require("@atlaskit/adf-schema-generator");
|
8
|
+
// These marks defined together because they form a cycle within the excludes.
|
9
|
+
var alignment = exports.alignment = (0, _adfSchemaGenerator.adfMark)('alignment');
|
10
|
+
var indentation = exports.indentation = (0, _adfSchemaGenerator.adfMark)('indentation');
|
11
|
+
var alignementMarkExclusionGroup = (0, _adfSchemaGenerator.adfMarkGroup)('alignmentMarkExclusion', [alignment]);
|
12
|
+
var indentationMarkExclusionGroup = (0, _adfSchemaGenerator.adfMarkGroup)('indentationMarkExclusion', [indentation]);
|
13
|
+
alignment.define({
|
14
|
+
excludes: [indentationMarkExclusionGroup],
|
15
|
+
attrs: {
|
16
|
+
align: {
|
17
|
+
type: 'enum',
|
18
|
+
values: ['center', 'end'],
|
19
|
+
default: 'center'
|
20
|
+
}
|
21
|
+
}
|
22
|
+
});
|
23
|
+
indentation.define({
|
24
|
+
excludes: [alignementMarkExclusionGroup],
|
25
|
+
attrs: {
|
26
|
+
level: {
|
27
|
+
type: 'number',
|
28
|
+
minimum: 0,
|
29
|
+
maximum: 6
|
30
|
+
}
|
31
|
+
}
|
32
|
+
});
|
@@ -6,8 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
exports.headingWithMarks = exports.heading = void 0;
|
7
7
|
var _adfSchemaGenerator = require("@atlaskit/adf-schema-generator");
|
8
8
|
var _inlineGroup = require("../groups/inlineGroup");
|
9
|
-
var
|
10
|
-
var _indentation = require("../marks/indentation");
|
9
|
+
var _alignmentAndIndentation = require("../marks/alignmentAndIndentation");
|
11
10
|
var heading = exports.heading = (0, _adfSchemaGenerator.adfNode)('heading').define({
|
12
11
|
defining: true,
|
13
12
|
selectable: false,
|
@@ -21,8 +20,8 @@ var heading = exports.heading = (0, _adfSchemaGenerator.adfNode)('heading').defi
|
|
21
20
|
},
|
22
21
|
content: [(0, _adfSchemaGenerator.$zeroPlus)((0, _adfSchemaGenerator.$or)(_inlineGroup.inlineGroup))]
|
23
22
|
}).variant('with_alignment', {
|
24
|
-
marks: [
|
23
|
+
marks: [_alignmentAndIndentation.alignment]
|
25
24
|
}).variant('with_indentation', {
|
26
|
-
marks: [
|
25
|
+
marks: [_alignmentAndIndentation.indentation]
|
27
26
|
});
|
28
27
|
var headingWithMarks = exports.headingWithMarks = heading;
|
@@ -6,16 +6,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
exports.paragraph = void 0;
|
7
7
|
var _adfSchemaGenerator = require("@atlaskit/adf-schema-generator");
|
8
8
|
var _inlineGroup = require("../groups/inlineGroup");
|
9
|
-
var
|
10
|
-
var _indentation = require("../marks/indentation");
|
9
|
+
var _alignmentAndIndentation = require("../marks/alignmentAndIndentation");
|
11
10
|
var paragraph = exports.paragraph = (0, _adfSchemaGenerator.adfNode)('paragraph').define({
|
12
11
|
selectable: false,
|
13
|
-
marks: [
|
12
|
+
marks: [_alignmentAndIndentation.alignment],
|
14
13
|
content: [(0, _adfSchemaGenerator.$zeroPlus)((0, _adfSchemaGenerator.$or)(_inlineGroup.inlineGroup))]
|
15
14
|
}).variant('with_alignment', {
|
16
|
-
marks: [
|
15
|
+
marks: [_alignmentAndIndentation.alignment]
|
17
16
|
}).variant('with_indentation', {
|
18
|
-
marks: [
|
17
|
+
marks: [_alignmentAndIndentation.indentation]
|
19
18
|
}).variant('with_marks', {
|
20
|
-
marks: [
|
19
|
+
marks: [_alignmentAndIndentation.alignment, _alignmentAndIndentation.indentation]
|
21
20
|
});
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import { adfMark } from '@atlaskit/adf-schema-generator';
|
2
|
+
import { adfMarkGroup } from '@atlaskit/adf-schema-generator';
|
3
|
+
|
4
|
+
// These marks defined together because they form a cycle within the excludes.
|
5
|
+
export const alignment = adfMark('alignment');
|
6
|
+
export const indentation = adfMark('indentation');
|
7
|
+
const alignementMarkExclusionGroup = adfMarkGroup('alignmentMarkExclusion', [alignment]);
|
8
|
+
const indentationMarkExclusionGroup = adfMarkGroup('indentationMarkExclusion', [indentation]);
|
9
|
+
alignment.define({
|
10
|
+
excludes: [indentationMarkExclusionGroup],
|
11
|
+
attrs: {
|
12
|
+
align: {
|
13
|
+
type: 'enum',
|
14
|
+
values: ['center', 'end'],
|
15
|
+
default: 'center'
|
16
|
+
}
|
17
|
+
}
|
18
|
+
});
|
19
|
+
indentation.define({
|
20
|
+
excludes: [alignementMarkExclusionGroup],
|
21
|
+
attrs: {
|
22
|
+
level: {
|
23
|
+
type: 'number',
|
24
|
+
minimum: 0,
|
25
|
+
maximum: 6
|
26
|
+
}
|
27
|
+
}
|
28
|
+
});
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import { $or, $zeroPlus, adfNode } from '@atlaskit/adf-schema-generator';
|
2
2
|
import { inlineGroup } from '../groups/inlineGroup';
|
3
|
-
import { alignment } from '../marks/
|
4
|
-
import { indentation } from '../marks/indentation';
|
3
|
+
import { alignment, indentation } from '../marks/alignmentAndIndentation';
|
5
4
|
export const heading = adfNode('heading').define({
|
6
5
|
defining: true,
|
7
6
|
selectable: false,
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import { $or, $zeroPlus, adfNode } from '@atlaskit/adf-schema-generator';
|
2
2
|
import { inlineGroup } from '../groups/inlineGroup';
|
3
|
-
import { alignment } from '../marks/
|
4
|
-
import { indentation } from '../marks/indentation';
|
3
|
+
import { alignment, indentation } from '../marks/alignmentAndIndentation';
|
5
4
|
export const paragraph = adfNode('paragraph').define({
|
6
5
|
selectable: false,
|
7
6
|
marks: [alignment],
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import { adfMark } from '@atlaskit/adf-schema-generator';
|
2
|
+
import { adfMarkGroup } from '@atlaskit/adf-schema-generator';
|
3
|
+
|
4
|
+
// These marks defined together because they form a cycle within the excludes.
|
5
|
+
export var alignment = adfMark('alignment');
|
6
|
+
export var indentation = adfMark('indentation');
|
7
|
+
var alignementMarkExclusionGroup = adfMarkGroup('alignmentMarkExclusion', [alignment]);
|
8
|
+
var indentationMarkExclusionGroup = adfMarkGroup('indentationMarkExclusion', [indentation]);
|
9
|
+
alignment.define({
|
10
|
+
excludes: [indentationMarkExclusionGroup],
|
11
|
+
attrs: {
|
12
|
+
align: {
|
13
|
+
type: 'enum',
|
14
|
+
values: ['center', 'end'],
|
15
|
+
default: 'center'
|
16
|
+
}
|
17
|
+
}
|
18
|
+
});
|
19
|
+
indentation.define({
|
20
|
+
excludes: [alignementMarkExclusionGroup],
|
21
|
+
attrs: {
|
22
|
+
level: {
|
23
|
+
type: 'number',
|
24
|
+
minimum: 0,
|
25
|
+
maximum: 6
|
26
|
+
}
|
27
|
+
}
|
28
|
+
});
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import { $or, $zeroPlus, adfNode } from '@atlaskit/adf-schema-generator';
|
2
2
|
import { inlineGroup } from '../groups/inlineGroup';
|
3
|
-
import { alignment } from '../marks/
|
4
|
-
import { indentation } from '../marks/indentation';
|
3
|
+
import { alignment, indentation } from '../marks/alignmentAndIndentation';
|
5
4
|
export var heading = adfNode('heading').define({
|
6
5
|
defining: true,
|
7
6
|
selectable: false,
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import { $or, $zeroPlus, adfNode } from '@atlaskit/adf-schema-generator';
|
2
2
|
import { inlineGroup } from '../groups/inlineGroup';
|
3
|
-
import { alignment } from '../marks/
|
4
|
-
import { indentation } from '../marks/indentation';
|
3
|
+
import { alignment, indentation } from '../marks/alignmentAndIndentation';
|
5
4
|
export var paragraph = adfNode('paragraph').define({
|
6
5
|
selectable: false,
|
7
6
|
marks: [alignment],
|
@@ -1 +1,2 @@
|
|
1
|
+
export declare const alignment: import("@atlaskit/adf-schema-generator/dist/types/adfMark").ADFMark<import("@atlaskit/adf-schema-generator/dist/types/types/ADFMarkSpec").ADFMarkSpec>;
|
1
2
|
export declare const indentation: import("@atlaskit/adf-schema-generator/dist/types/adfMark").ADFMark<import("@atlaskit/adf-schema-generator/dist/types/types/ADFMarkSpec").ADFMarkSpec>;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@atlaskit/adf-schema",
|
3
|
-
"version": "36.
|
3
|
+
"version": "36.6.0",
|
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/"
|
@@ -43,7 +43,7 @@
|
|
43
43
|
},
|
44
44
|
"devDependencies": {
|
45
45
|
"@atlassian/adf-schema-json": "^1.14.0",
|
46
|
-
"@atlaskit/adf-schema-generator": "^1.
|
46
|
+
"@atlaskit/adf-schema-generator": "^1.6.0",
|
47
47
|
"@babel/cli": "^7.22.9",
|
48
48
|
"@babel/core": "^7.22.9",
|
49
49
|
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
@@ -1,7 +1,13 @@
|
|
1
1
|
import { adfToPm } from '@atlaskit/adf-schema-generator';
|
2
|
+
import adfNode from 'src/next-schema/full-schema.adf';
|
2
3
|
|
3
4
|
function main() {
|
4
|
-
|
5
|
+
const output = adfToPm(adfNode);
|
6
|
+
|
7
|
+
// TODO - remove console log
|
8
|
+
Object.entries(output).forEach(([key, value]) => {
|
9
|
+
console.log(key, value.pmNodeSpec);
|
10
|
+
});
|
5
11
|
}
|
6
12
|
|
7
13
|
main();
|
@@ -1,9 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.alignementMarkExclusionGroup = void 0;
|
7
|
-
var _adfSchemaGenerator = require("@atlaskit/adf-schema-generator");
|
8
|
-
var _alignment = require("../marks/alignment");
|
9
|
-
var alignementMarkExclusionGroup = exports.alignementMarkExclusionGroup = (0, _adfSchemaGenerator.adfMarkGroup)('alignmentMarkExclusion', [_alignment.alignment]);
|
@@ -1,9 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.indentationMarkExclusionGroup = void 0;
|
7
|
-
var _adfSchemaGenerator = require("@atlaskit/adf-schema-generator");
|
8
|
-
var _indentation = require("../marks/indentation");
|
9
|
-
var indentationMarkExclusionGroup = exports.indentationMarkExclusionGroup = (0, _adfSchemaGenerator.adfMarkGroup)('indentationMarkExclusion', [_indentation.indentation]);
|
@@ -1,18 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.alignment = void 0;
|
7
|
-
var _adfSchemaGenerator = require("@atlaskit/adf-schema-generator");
|
8
|
-
var _indentationMarkExclusionGroup = require("../groups/indentationMarkExclusionGroup");
|
9
|
-
var alignment = exports.alignment = (0, _adfSchemaGenerator.adfMark)('alignment').define({
|
10
|
-
excludes: [_indentationMarkExclusionGroup.indentationMarkExclusionGroup],
|
11
|
-
attrs: {
|
12
|
-
align: {
|
13
|
-
type: 'enum',
|
14
|
-
values: ['center', 'end'],
|
15
|
-
default: 'center'
|
16
|
-
}
|
17
|
-
}
|
18
|
-
});
|
@@ -1,18 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.indentation = void 0;
|
7
|
-
var _adfSchemaGenerator = require("@atlaskit/adf-schema-generator");
|
8
|
-
var _alignementMarkExclusionGroup = require("../groups/alignementMarkExclusionGroup");
|
9
|
-
var indentation = exports.indentation = (0, _adfSchemaGenerator.adfMark)('indentation').define({
|
10
|
-
excludes: [_alignementMarkExclusionGroup.alignementMarkExclusionGroup],
|
11
|
-
attrs: {
|
12
|
-
level: {
|
13
|
-
type: 'number',
|
14
|
-
minimum: 0,
|
15
|
-
maximum: 6
|
16
|
-
}
|
17
|
-
}
|
18
|
-
});
|
@@ -1,12 +0,0 @@
|
|
1
|
-
import { adfMark } from '@atlaskit/adf-schema-generator';
|
2
|
-
import { indentationMarkExclusionGroup } from '../groups/indentationMarkExclusionGroup';
|
3
|
-
export const alignment = adfMark('alignment').define({
|
4
|
-
excludes: [indentationMarkExclusionGroup],
|
5
|
-
attrs: {
|
6
|
-
align: {
|
7
|
-
type: 'enum',
|
8
|
-
values: ['center', 'end'],
|
9
|
-
default: 'center'
|
10
|
-
}
|
11
|
-
}
|
12
|
-
});
|
@@ -1,12 +0,0 @@
|
|
1
|
-
import { adfMark } from '@atlaskit/adf-schema-generator';
|
2
|
-
import { alignementMarkExclusionGroup } from '../groups/alignementMarkExclusionGroup';
|
3
|
-
export const indentation = adfMark('indentation').define({
|
4
|
-
excludes: [alignementMarkExclusionGroup],
|
5
|
-
attrs: {
|
6
|
-
level: {
|
7
|
-
type: 'number',
|
8
|
-
minimum: 0,
|
9
|
-
maximum: 6
|
10
|
-
}
|
11
|
-
}
|
12
|
-
});
|
@@ -1,12 +0,0 @@
|
|
1
|
-
import { adfMark } from '@atlaskit/adf-schema-generator';
|
2
|
-
import { indentationMarkExclusionGroup } from '../groups/indentationMarkExclusionGroup';
|
3
|
-
export var alignment = adfMark('alignment').define({
|
4
|
-
excludes: [indentationMarkExclusionGroup],
|
5
|
-
attrs: {
|
6
|
-
align: {
|
7
|
-
type: 'enum',
|
8
|
-
values: ['center', 'end'],
|
9
|
-
default: 'center'
|
10
|
-
}
|
11
|
-
}
|
12
|
-
});
|
@@ -1,12 +0,0 @@
|
|
1
|
-
import { adfMark } from '@atlaskit/adf-schema-generator';
|
2
|
-
import { alignementMarkExclusionGroup } from '../groups/alignementMarkExclusionGroup';
|
3
|
-
export var indentation = adfMark('indentation').define({
|
4
|
-
excludes: [alignementMarkExclusionGroup],
|
5
|
-
attrs: {
|
6
|
-
level: {
|
7
|
-
type: 'number',
|
8
|
-
minimum: 0,
|
9
|
-
maximum: 6
|
10
|
-
}
|
11
|
-
}
|
12
|
-
});
|
@@ -1 +0,0 @@
|
|
1
|
-
export declare const alignementMarkExclusionGroup: import("@atlaskit/adf-schema-generator/dist/types/types/ADFMarkGroup").ADFMarkGroup;
|
@@ -1 +0,0 @@
|
|
1
|
-
export declare const indentationMarkExclusionGroup: import("@atlaskit/adf-schema-generator/dist/types/types/ADFMarkGroup").ADFMarkGroup;
|
@@ -1 +0,0 @@
|
|
1
|
-
export declare const alignment: import("@atlaskit/adf-schema-generator/dist/types/adfMark").ADFMark<import("@atlaskit/adf-schema-generator/dist/types/types/ADFMarkSpec").ADFMarkSpec>;
|