@atlaskit/adf-schema 44.2.0 → 44.3.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 +12 -0
- package/dist/cjs/next-schema/generated/nodeTypes.js +1 -1
- package/dist/cjs/next-schema/nodes/layoutSection.js +3 -48
- package/dist/cjs/utils/editor-palette.js +4 -4
- package/dist/cjs/validator-schema/generated/validatorSpec.js +6 -11
- package/dist/es2019/next-schema/generated/nodeTypes.js +1 -1
- package/dist/es2019/next-schema/nodes/layoutSection.js +3 -48
- package/dist/es2019/utils/editor-palette.js +4 -4
- package/dist/es2019/validator-schema/generated/validatorSpec.js +6 -11
- package/dist/esm/next-schema/generated/nodeTypes.js +1 -1
- package/dist/esm/next-schema/nodes/layoutSection.js +3 -48
- package/dist/esm/utils/editor-palette.js +4 -4
- package/dist/esm/validator-schema/generated/validatorSpec.js +6 -11
- package/dist/types/next-schema/generated/nodeTypes.d.ts +1 -1
- package/dist/types/next-schema/nodes/layoutSection.d.ts +1 -32
- package/dist/types/validator-schema/generated/validatorSpec.d.ts +5 -10
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,17 @@
|
|
1
1
|
# @atlaskit/adf-schema
|
2
2
|
|
3
|
+
## 44.3.0
|
4
|
+
|
5
|
+
### Minor Changes
|
6
|
+
|
7
|
+
- 7705aa3: remove layoutSection overrides for validator spec
|
8
|
+
|
9
|
+
## 44.2.1
|
10
|
+
|
11
|
+
### Patch Changes
|
12
|
+
|
13
|
+
- b9a2f17: Made hex color tolerant to nulls
|
14
|
+
|
3
15
|
## 44.2.0
|
4
16
|
|
5
17
|
### Minor Changes
|
@@ -558,7 +558,7 @@ var layoutColumn = exports.layoutColumn = (0, _createPMSpecFactory.createPMNodeS
|
|
558
558
|
isolating: true
|
559
559
|
});
|
560
560
|
var layoutSection = exports.layoutSection = (0, _createPMSpecFactory.createPMNodeSpecFactory)({
|
561
|
-
content: '(layoutColumn | unsupportedBlock){1,3} unsupportedBlock*
|
561
|
+
content: '(layoutColumn | unsupportedBlock){1,3} unsupportedBlock*',
|
562
562
|
marks: 'unsupportedMark unsupportedNodeAttribute',
|
563
563
|
isolating: true
|
564
564
|
});
|
@@ -13,25 +13,11 @@ var _unsupportedBlock = require("./unsupportedBlock");
|
|
13
13
|
var layoutSection = exports.layoutSection = (0, _adfSchemaGenerator.adfNode)('layoutSection').define({
|
14
14
|
isolating: true,
|
15
15
|
marks: [_breakout.breakout, _unsupportedMark.unsupportedMark, _unsupportedNodeAttribute.unsupportedNodeAttribute],
|
16
|
-
content: [(0, _adfSchemaGenerator.$or)(_layoutColumn.layoutColumn, _unsupportedBlock.unsupportedBlock)]
|
17
|
-
DANGEROUS_MANUAL_OVERRIDE: {
|
18
|
-
'pm-spec': {
|
19
|
-
content: {
|
20
|
-
value: '(layoutColumn | unsupportedBlock){1,3} unsupportedBlock* | unsupportedBlock+',
|
21
|
-
reason: "The content expression is not correct or redundant around 'unsupportedBlock* | unsupportedBlock+'. This case is not supported by the DSL. Also in JSON schema there is no range for the items, so theres a mismatch between JSON and PM."
|
22
|
-
}
|
23
|
-
},
|
24
|
-
'validator-spec': {
|
25
|
-
'props.content.allowUnsupportedBlock': {
|
26
|
-
remove: true,
|
27
|
-
reason: '@DSLCompatibilityException - mismatch for layoutSection'
|
28
|
-
}
|
29
|
-
}
|
30
|
-
}
|
16
|
+
content: [(0, _adfSchemaGenerator.$range)(1, 3, (0, _adfSchemaGenerator.$or)(_layoutColumn.layoutColumn, _unsupportedBlock.unsupportedBlock)), (0, _adfSchemaGenerator.$zeroPlus)((0, _adfSchemaGenerator.$or)(_unsupportedBlock.unsupportedBlock))]
|
31
17
|
}).variant('with_single_column', {
|
32
18
|
stage0: true,
|
19
|
+
marks: [_breakout.breakout, _unsupportedMark.unsupportedMark, _unsupportedNodeAttribute.unsupportedNodeAttribute],
|
33
20
|
content: [(0, _adfSchemaGenerator.$range)(1, 5, (0, _adfSchemaGenerator.$or)(_layoutColumn.layoutColumn, _unsupportedBlock.unsupportedBlock)), (0, _adfSchemaGenerator.$zeroPlus)((0, _adfSchemaGenerator.$or)(_unsupportedBlock.unsupportedBlock))],
|
34
|
-
ignore: [],
|
35
21
|
attrs: {
|
36
22
|
columnRuleStyle: {
|
37
23
|
type: 'enum',
|
@@ -39,39 +25,8 @@ var layoutSection = exports.layoutSection = (0, _adfSchemaGenerator.adfNode)('la
|
|
39
25
|
default: null,
|
40
26
|
optional: true
|
41
27
|
}
|
42
|
-
},
|
43
|
-
DANGEROUS_MANUAL_OVERRIDE: {
|
44
|
-
'validator-spec': {
|
45
|
-
'props.type': {
|
46
|
-
value: {
|
47
|
-
type: 'enum',
|
48
|
-
values: ['layoutSection']
|
49
|
-
},
|
50
|
-
reason: '@DSLCompatibilityException - mismatch for layoutSection_with_single_column'
|
51
|
-
},
|
52
|
-
'props.marks': {
|
53
|
-
value: {
|
54
|
-
items: ['breakout'],
|
55
|
-
optional: true,
|
56
|
-
type: 'array'
|
57
|
-
},
|
58
|
-
reason: '@DSLCompatibilityException - mismatch for layoutSection_with_single_column'
|
59
|
-
}
|
60
|
-
}
|
61
28
|
}
|
62
29
|
}).variant('full', {
|
63
30
|
marks: [_breakout.breakout, _unsupportedMark.unsupportedMark, _unsupportedNodeAttribute.unsupportedNodeAttribute],
|
64
|
-
content: [(0, _adfSchemaGenerator.$range)(2, 3, (0, _adfSchemaGenerator.$or)(_layoutColumn.layoutColumn, _unsupportedBlock.unsupportedBlock))]
|
65
|
-
ignore: [],
|
66
|
-
DANGEROUS_MANUAL_OVERRIDE: {
|
67
|
-
'validator-spec': {
|
68
|
-
'props.type': {
|
69
|
-
value: {
|
70
|
-
type: 'enum',
|
71
|
-
values: ['layoutSection']
|
72
|
-
},
|
73
|
-
reason: '@DSLCompatibilityException - mismatch for layoutSection_full'
|
74
|
-
}
|
75
|
-
}
|
76
|
-
}
|
31
|
+
content: [(0, _adfSchemaGenerator.$range)(2, 3, (0, _adfSchemaGenerator.$or)(_layoutColumn.layoutColumn, _unsupportedBlock.unsupportedBlock))]
|
77
32
|
});
|
@@ -29,7 +29,7 @@ exports.textBackgroundColorPalette = void 0;
|
|
29
29
|
function hexToEditorBorderPaletteColor(hexColor) {
|
30
30
|
// Ts ignore was used to allow use of conditional return type
|
31
31
|
// (preferencing better type on consumption over safety in implementation)
|
32
|
-
return editorBorderPalette[hexColor.toUpperCase()];
|
32
|
+
return hexColor ? editorBorderPalette[hexColor.toUpperCase()] : undefined;
|
33
33
|
}
|
34
34
|
var editorBorderPalette = exports.editorBorderPalette = {
|
35
35
|
/** gray - subtle */
|
@@ -60,7 +60,7 @@ var editorBorderPalette = exports.editorBorderPalette = {
|
|
60
60
|
function hexToEditorTextPaletteColor(hexColor) {
|
61
61
|
// Ts ignore was used to allow use of conditional return type
|
62
62
|
// (preferencing better type on consumption over safety in implementation)
|
63
|
-
return editorTextPalette[hexColor.toUpperCase()];
|
63
|
+
return hexColor ? editorTextPalette[hexColor.toUpperCase()] : undefined;
|
64
64
|
}
|
65
65
|
var editorTextPalette = exports.editorTextPalette = {
|
66
66
|
/** blue - light */
|
@@ -127,7 +127,7 @@ var editorTextPalette = exports.editorTextPalette = {
|
|
127
127
|
function hexToEditorTextBackgroundPaletteColor(hexColor) {
|
128
128
|
// Ts ignore was used to allow use of conditional return type
|
129
129
|
// (preferring better type on consumption over safety in implementation)
|
130
|
-
return textBackgroundColorPalette[hexColor.toUpperCase()];
|
130
|
+
return hexColor ? textBackgroundColorPalette[hexColor.toUpperCase()] : undefined;
|
131
131
|
}
|
132
132
|
var textBackgroundColorPalette = exports.textBackgroundColorPalette = {
|
133
133
|
/** Gray - light */
|
@@ -159,7 +159,7 @@ var textBackgroundColorPalette = exports.textBackgroundColorPalette = {
|
|
159
159
|
function hexToEditorBackgroundPaletteRawValue(hexColor) {
|
160
160
|
// Ts ignore was used to allow use of conditional return type
|
161
161
|
// (preferencing better type on consumption over safety in implementation)
|
162
|
-
var tokenData = editorBackgroundPalette[hexColor.toUpperCase()];
|
162
|
+
var tokenData = hexColor ? editorBackgroundPalette[hexColor.toUpperCase()] : undefined;
|
163
163
|
return tokenData ? tokenData.getValue(hexColor) : undefined;
|
164
164
|
}
|
165
165
|
/**
|
@@ -1603,7 +1603,10 @@ var layoutSection = exports.layoutSection = {
|
|
1603
1603
|
},
|
1604
1604
|
content: {
|
1605
1605
|
type: 'array',
|
1606
|
-
items: ['layoutColumn']
|
1606
|
+
items: ['layoutColumn'],
|
1607
|
+
minItems: 1,
|
1608
|
+
maxItems: 3,
|
1609
|
+
allowUnsupportedBlock: true
|
1607
1610
|
},
|
1608
1611
|
marks: {
|
1609
1612
|
type: 'array',
|
@@ -1631,14 +1634,10 @@ var layoutSection_with_single_column = exports.layoutSection_with_single_column
|
|
1631
1634
|
maxItems: 5,
|
1632
1635
|
allowUnsupportedBlock: true
|
1633
1636
|
},
|
1634
|
-
type: {
|
1635
|
-
type: 'enum',
|
1636
|
-
values: ['layoutSection']
|
1637
|
-
},
|
1638
1637
|
marks: {
|
1639
|
-
|
1638
|
+
type: 'array',
|
1640
1639
|
optional: true,
|
1641
|
-
|
1640
|
+
items: ['breakout']
|
1642
1641
|
}
|
1643
1642
|
}
|
1644
1643
|
}];
|
@@ -1655,10 +1654,6 @@ var layoutSection_full = exports.layoutSection_full = ['layoutSection', {
|
|
1655
1654
|
type: 'array',
|
1656
1655
|
optional: true,
|
1657
1656
|
items: ['breakout']
|
1658
|
-
},
|
1659
|
-
type: {
|
1660
|
-
type: 'enum',
|
1661
|
-
values: ['layoutSection']
|
1662
1657
|
}
|
1663
1658
|
}
|
1664
1659
|
}];
|
@@ -552,7 +552,7 @@ export const layoutColumn = createPMNodeSpecFactory({
|
|
552
552
|
isolating: true
|
553
553
|
});
|
554
554
|
export const layoutSection = createPMNodeSpecFactory({
|
555
|
-
content: '(layoutColumn | unsupportedBlock){1,3} unsupportedBlock*
|
555
|
+
content: '(layoutColumn | unsupportedBlock){1,3} unsupportedBlock*',
|
556
556
|
marks: 'unsupportedMark unsupportedNodeAttribute',
|
557
557
|
isolating: true
|
558
558
|
});
|
@@ -7,25 +7,11 @@ import { unsupportedBlock } from './unsupportedBlock';
|
|
7
7
|
export const layoutSection = adfNode('layoutSection').define({
|
8
8
|
isolating: true,
|
9
9
|
marks: [breakout, unsupportedMark, unsupportedNodeAttribute],
|
10
|
-
content: [$or(layoutColumn, unsupportedBlock)]
|
11
|
-
DANGEROUS_MANUAL_OVERRIDE: {
|
12
|
-
'pm-spec': {
|
13
|
-
content: {
|
14
|
-
value: '(layoutColumn | unsupportedBlock){1,3} unsupportedBlock* | unsupportedBlock+',
|
15
|
-
reason: `The content expression is not correct or redundant around 'unsupportedBlock* | unsupportedBlock+'. This case is not supported by the DSL. Also in JSON schema there is no range for the items, so theres a mismatch between JSON and PM.`
|
16
|
-
}
|
17
|
-
},
|
18
|
-
'validator-spec': {
|
19
|
-
'props.content.allowUnsupportedBlock': {
|
20
|
-
remove: true,
|
21
|
-
reason: '@DSLCompatibilityException - mismatch for layoutSection'
|
22
|
-
}
|
23
|
-
}
|
24
|
-
}
|
10
|
+
content: [$range(1, 3, $or(layoutColumn, unsupportedBlock)), $zeroPlus($or(unsupportedBlock))]
|
25
11
|
}).variant('with_single_column', {
|
26
12
|
stage0: true,
|
13
|
+
marks: [breakout, unsupportedMark, unsupportedNodeAttribute],
|
27
14
|
content: [$range(1, 5, $or(layoutColumn, unsupportedBlock)), $zeroPlus($or(unsupportedBlock))],
|
28
|
-
ignore: [],
|
29
15
|
attrs: {
|
30
16
|
columnRuleStyle: {
|
31
17
|
type: 'enum',
|
@@ -33,39 +19,8 @@ export const layoutSection = adfNode('layoutSection').define({
|
|
33
19
|
default: null,
|
34
20
|
optional: true
|
35
21
|
}
|
36
|
-
},
|
37
|
-
DANGEROUS_MANUAL_OVERRIDE: {
|
38
|
-
'validator-spec': {
|
39
|
-
'props.type': {
|
40
|
-
value: {
|
41
|
-
type: 'enum',
|
42
|
-
values: ['layoutSection']
|
43
|
-
},
|
44
|
-
reason: '@DSLCompatibilityException - mismatch for layoutSection_with_single_column'
|
45
|
-
},
|
46
|
-
'props.marks': {
|
47
|
-
value: {
|
48
|
-
items: ['breakout'],
|
49
|
-
optional: true,
|
50
|
-
type: 'array'
|
51
|
-
},
|
52
|
-
reason: '@DSLCompatibilityException - mismatch for layoutSection_with_single_column'
|
53
|
-
}
|
54
|
-
}
|
55
22
|
}
|
56
23
|
}).variant('full', {
|
57
24
|
marks: [breakout, unsupportedMark, unsupportedNodeAttribute],
|
58
|
-
content: [$range(2, 3, $or(layoutColumn, unsupportedBlock))]
|
59
|
-
ignore: [],
|
60
|
-
DANGEROUS_MANUAL_OVERRIDE: {
|
61
|
-
'validator-spec': {
|
62
|
-
'props.type': {
|
63
|
-
value: {
|
64
|
-
type: 'enum',
|
65
|
-
values: ['layoutSection']
|
66
|
-
},
|
67
|
-
reason: '@DSLCompatibilityException - mismatch for layoutSection_full'
|
68
|
-
}
|
69
|
-
}
|
70
|
-
}
|
25
|
+
content: [$range(2, 3, $or(layoutColumn, unsupportedBlock))]
|
71
26
|
});
|
@@ -18,7 +18,7 @@
|
|
18
18
|
export function hexToEditorBorderPaletteColor(hexColor) {
|
19
19
|
// Ts ignore was used to allow use of conditional return type
|
20
20
|
// (preferencing better type on consumption over safety in implementation)
|
21
|
-
return editorBorderPalette[hexColor.toUpperCase()];
|
21
|
+
return hexColor ? editorBorderPalette[hexColor.toUpperCase()] : undefined;
|
22
22
|
}
|
23
23
|
export const editorBorderPalette = {
|
24
24
|
/** gray - subtle */
|
@@ -49,7 +49,7 @@ export const editorBorderPalette = {
|
|
49
49
|
export function hexToEditorTextPaletteColor(hexColor) {
|
50
50
|
// Ts ignore was used to allow use of conditional return type
|
51
51
|
// (preferencing better type on consumption over safety in implementation)
|
52
|
-
return editorTextPalette[hexColor.toUpperCase()];
|
52
|
+
return hexColor ? editorTextPalette[hexColor.toUpperCase()] : undefined;
|
53
53
|
}
|
54
54
|
export const editorTextPalette = {
|
55
55
|
/** blue - light */
|
@@ -116,7 +116,7 @@ export const editorTextPalette = {
|
|
116
116
|
export function hexToEditorTextBackgroundPaletteColor(hexColor) {
|
117
117
|
// Ts ignore was used to allow use of conditional return type
|
118
118
|
// (preferring better type on consumption over safety in implementation)
|
119
|
-
return textBackgroundColorPalette[hexColor.toUpperCase()];
|
119
|
+
return hexColor ? textBackgroundColorPalette[hexColor.toUpperCase()] : undefined;
|
120
120
|
}
|
121
121
|
export const textBackgroundColorPalette = {
|
122
122
|
/** Gray - light */
|
@@ -148,7 +148,7 @@ export const textBackgroundColorPalette = {
|
|
148
148
|
export function hexToEditorBackgroundPaletteRawValue(hexColor) {
|
149
149
|
// Ts ignore was used to allow use of conditional return type
|
150
150
|
// (preferencing better type on consumption over safety in implementation)
|
151
|
-
const tokenData = editorBackgroundPalette[hexColor.toUpperCase()];
|
151
|
+
const tokenData = hexColor ? editorBackgroundPalette[hexColor.toUpperCase()] : undefined;
|
152
152
|
return tokenData ? tokenData.getValue(hexColor) : undefined;
|
153
153
|
}
|
154
154
|
/**
|
@@ -1597,7 +1597,10 @@ export const layoutSection = {
|
|
1597
1597
|
},
|
1598
1598
|
content: {
|
1599
1599
|
type: 'array',
|
1600
|
-
items: ['layoutColumn']
|
1600
|
+
items: ['layoutColumn'],
|
1601
|
+
minItems: 1,
|
1602
|
+
maxItems: 3,
|
1603
|
+
allowUnsupportedBlock: true
|
1601
1604
|
},
|
1602
1605
|
marks: {
|
1603
1606
|
type: 'array',
|
@@ -1625,14 +1628,10 @@ export const layoutSection_with_single_column = ['layoutSection', {
|
|
1625
1628
|
maxItems: 5,
|
1626
1629
|
allowUnsupportedBlock: true
|
1627
1630
|
},
|
1628
|
-
type: {
|
1629
|
-
type: 'enum',
|
1630
|
-
values: ['layoutSection']
|
1631
|
-
},
|
1632
1631
|
marks: {
|
1633
|
-
|
1632
|
+
type: 'array',
|
1634
1633
|
optional: true,
|
1635
|
-
|
1634
|
+
items: ['breakout']
|
1636
1635
|
}
|
1637
1636
|
}
|
1638
1637
|
}];
|
@@ -1649,10 +1648,6 @@ export const layoutSection_full = ['layoutSection', {
|
|
1649
1648
|
type: 'array',
|
1650
1649
|
optional: true,
|
1651
1650
|
items: ['breakout']
|
1652
|
-
},
|
1653
|
-
type: {
|
1654
|
-
type: 'enum',
|
1655
|
-
values: ['layoutSection']
|
1656
1651
|
}
|
1657
1652
|
}
|
1658
1653
|
}];
|
@@ -552,7 +552,7 @@ export var layoutColumn = createPMNodeSpecFactory({
|
|
552
552
|
isolating: true
|
553
553
|
});
|
554
554
|
export var layoutSection = createPMNodeSpecFactory({
|
555
|
-
content: '(layoutColumn | unsupportedBlock){1,3} unsupportedBlock*
|
555
|
+
content: '(layoutColumn | unsupportedBlock){1,3} unsupportedBlock*',
|
556
556
|
marks: 'unsupportedMark unsupportedNodeAttribute',
|
557
557
|
isolating: true
|
558
558
|
});
|
@@ -7,25 +7,11 @@ import { unsupportedBlock } from './unsupportedBlock';
|
|
7
7
|
export var layoutSection = adfNode('layoutSection').define({
|
8
8
|
isolating: true,
|
9
9
|
marks: [breakout, unsupportedMark, unsupportedNodeAttribute],
|
10
|
-
content: [$or(layoutColumn, unsupportedBlock)]
|
11
|
-
DANGEROUS_MANUAL_OVERRIDE: {
|
12
|
-
'pm-spec': {
|
13
|
-
content: {
|
14
|
-
value: '(layoutColumn | unsupportedBlock){1,3} unsupportedBlock* | unsupportedBlock+',
|
15
|
-
reason: "The content expression is not correct or redundant around 'unsupportedBlock* | unsupportedBlock+'. This case is not supported by the DSL. Also in JSON schema there is no range for the items, so theres a mismatch between JSON and PM."
|
16
|
-
}
|
17
|
-
},
|
18
|
-
'validator-spec': {
|
19
|
-
'props.content.allowUnsupportedBlock': {
|
20
|
-
remove: true,
|
21
|
-
reason: '@DSLCompatibilityException - mismatch for layoutSection'
|
22
|
-
}
|
23
|
-
}
|
24
|
-
}
|
10
|
+
content: [$range(1, 3, $or(layoutColumn, unsupportedBlock)), $zeroPlus($or(unsupportedBlock))]
|
25
11
|
}).variant('with_single_column', {
|
26
12
|
stage0: true,
|
13
|
+
marks: [breakout, unsupportedMark, unsupportedNodeAttribute],
|
27
14
|
content: [$range(1, 5, $or(layoutColumn, unsupportedBlock)), $zeroPlus($or(unsupportedBlock))],
|
28
|
-
ignore: [],
|
29
15
|
attrs: {
|
30
16
|
columnRuleStyle: {
|
31
17
|
type: 'enum',
|
@@ -33,39 +19,8 @@ export var layoutSection = adfNode('layoutSection').define({
|
|
33
19
|
default: null,
|
34
20
|
optional: true
|
35
21
|
}
|
36
|
-
},
|
37
|
-
DANGEROUS_MANUAL_OVERRIDE: {
|
38
|
-
'validator-spec': {
|
39
|
-
'props.type': {
|
40
|
-
value: {
|
41
|
-
type: 'enum',
|
42
|
-
values: ['layoutSection']
|
43
|
-
},
|
44
|
-
reason: '@DSLCompatibilityException - mismatch for layoutSection_with_single_column'
|
45
|
-
},
|
46
|
-
'props.marks': {
|
47
|
-
value: {
|
48
|
-
items: ['breakout'],
|
49
|
-
optional: true,
|
50
|
-
type: 'array'
|
51
|
-
},
|
52
|
-
reason: '@DSLCompatibilityException - mismatch for layoutSection_with_single_column'
|
53
|
-
}
|
54
|
-
}
|
55
22
|
}
|
56
23
|
}).variant('full', {
|
57
24
|
marks: [breakout, unsupportedMark, unsupportedNodeAttribute],
|
58
|
-
content: [$range(2, 3, $or(layoutColumn, unsupportedBlock))]
|
59
|
-
ignore: [],
|
60
|
-
DANGEROUS_MANUAL_OVERRIDE: {
|
61
|
-
'validator-spec': {
|
62
|
-
'props.type': {
|
63
|
-
value: {
|
64
|
-
type: 'enum',
|
65
|
-
values: ['layoutSection']
|
66
|
-
},
|
67
|
-
reason: '@DSLCompatibilityException - mismatch for layoutSection_full'
|
68
|
-
}
|
69
|
-
}
|
70
|
-
}
|
25
|
+
content: [$range(2, 3, $or(layoutColumn, unsupportedBlock))]
|
71
26
|
});
|
@@ -18,7 +18,7 @@
|
|
18
18
|
export function hexToEditorBorderPaletteColor(hexColor) {
|
19
19
|
// Ts ignore was used to allow use of conditional return type
|
20
20
|
// (preferencing better type on consumption over safety in implementation)
|
21
|
-
return editorBorderPalette[hexColor.toUpperCase()];
|
21
|
+
return hexColor ? editorBorderPalette[hexColor.toUpperCase()] : undefined;
|
22
22
|
}
|
23
23
|
export var editorBorderPalette = {
|
24
24
|
/** gray - subtle */
|
@@ -49,7 +49,7 @@ export var editorBorderPalette = {
|
|
49
49
|
export function hexToEditorTextPaletteColor(hexColor) {
|
50
50
|
// Ts ignore was used to allow use of conditional return type
|
51
51
|
// (preferencing better type on consumption over safety in implementation)
|
52
|
-
return editorTextPalette[hexColor.toUpperCase()];
|
52
|
+
return hexColor ? editorTextPalette[hexColor.toUpperCase()] : undefined;
|
53
53
|
}
|
54
54
|
export var editorTextPalette = {
|
55
55
|
/** blue - light */
|
@@ -116,7 +116,7 @@ export var editorTextPalette = {
|
|
116
116
|
export function hexToEditorTextBackgroundPaletteColor(hexColor) {
|
117
117
|
// Ts ignore was used to allow use of conditional return type
|
118
118
|
// (preferring better type on consumption over safety in implementation)
|
119
|
-
return textBackgroundColorPalette[hexColor.toUpperCase()];
|
119
|
+
return hexColor ? textBackgroundColorPalette[hexColor.toUpperCase()] : undefined;
|
120
120
|
}
|
121
121
|
export var textBackgroundColorPalette = {
|
122
122
|
/** Gray - light */
|
@@ -148,7 +148,7 @@ export var textBackgroundColorPalette = {
|
|
148
148
|
export function hexToEditorBackgroundPaletteRawValue(hexColor) {
|
149
149
|
// Ts ignore was used to allow use of conditional return type
|
150
150
|
// (preferencing better type on consumption over safety in implementation)
|
151
|
-
var tokenData = editorBackgroundPalette[hexColor.toUpperCase()];
|
151
|
+
var tokenData = hexColor ? editorBackgroundPalette[hexColor.toUpperCase()] : undefined;
|
152
152
|
return tokenData ? tokenData.getValue(hexColor) : undefined;
|
153
153
|
}
|
154
154
|
/**
|
@@ -1597,7 +1597,10 @@ export var layoutSection = {
|
|
1597
1597
|
},
|
1598
1598
|
content: {
|
1599
1599
|
type: 'array',
|
1600
|
-
items: ['layoutColumn']
|
1600
|
+
items: ['layoutColumn'],
|
1601
|
+
minItems: 1,
|
1602
|
+
maxItems: 3,
|
1603
|
+
allowUnsupportedBlock: true
|
1601
1604
|
},
|
1602
1605
|
marks: {
|
1603
1606
|
type: 'array',
|
@@ -1625,14 +1628,10 @@ export var layoutSection_with_single_column = ['layoutSection', {
|
|
1625
1628
|
maxItems: 5,
|
1626
1629
|
allowUnsupportedBlock: true
|
1627
1630
|
},
|
1628
|
-
type: {
|
1629
|
-
type: 'enum',
|
1630
|
-
values: ['layoutSection']
|
1631
|
-
},
|
1632
1631
|
marks: {
|
1633
|
-
|
1632
|
+
type: 'array',
|
1634
1633
|
optional: true,
|
1635
|
-
|
1634
|
+
items: ['breakout']
|
1636
1635
|
}
|
1637
1636
|
}
|
1638
1637
|
}];
|
@@ -1649,10 +1648,6 @@ export var layoutSection_full = ['layoutSection', {
|
|
1649
1648
|
type: 'array',
|
1650
1649
|
optional: true,
|
1651
1650
|
items: ['breakout']
|
1652
|
-
},
|
1653
|
-
type: {
|
1654
|
-
type: 'enum',
|
1655
|
-
values: ['layoutSection']
|
1656
1651
|
}
|
1657
1652
|
}
|
1658
1653
|
}];
|
@@ -405,7 +405,7 @@ export type LayoutColumnNode = PMNode & LayoutColumnDefinition;
|
|
405
405
|
export declare const layoutColumn: ({ parseDOM, toDOM, toDebugString }: import("../../schema/createPMSpecFactory").NodeSpecOptions<LayoutColumnNode>) => import("prosemirror-model").NodeSpec;
|
406
406
|
export interface LayoutSectionDefinition {
|
407
407
|
type: 'layoutSection';
|
408
|
-
content: Array<LayoutColumnDefinition | UnsupportedBlockDefinition>;
|
408
|
+
content: Array<LayoutColumnDefinition | UnsupportedBlockDefinition | UnsupportedBlockDefinition>;
|
409
409
|
marks: Array<BreakoutMark | UnsupportedMarkMark | UnsupportedNodeAttributeMark>;
|
410
410
|
}
|
411
411
|
export type LayoutSectionNode = PMNode & LayoutSectionDefinition;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
export declare const layoutSection: import("@atlaskit/adf-schema-generator/dist/types/adfNode").ADFNode<[string, "with_single_column", "full"], import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").ADFCommonNodeSpec & {
|
2
2
|
stage0: true;
|
3
|
+
marks: import("@atlaskit/adf-schema-generator/dist/types/adfMark").ADFMark<import("@atlaskit/adf-schema-generator/dist/types/types/ADFMarkSpec").ADFMarkSpec>[];
|
3
4
|
content: (import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").ADFNodeContentZeroOrMoreSpec | import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").ADFNodeContentRangeSpec)[];
|
4
|
-
ignore: any[];
|
5
5
|
attrs: {
|
6
6
|
columnRuleStyle: {
|
7
7
|
type: "enum";
|
@@ -10,38 +10,7 @@ export declare const layoutSection: import("@atlaskit/adf-schema-generator/dist/
|
|
10
10
|
optional: true;
|
11
11
|
};
|
12
12
|
};
|
13
|
-
DANGEROUS_MANUAL_OVERRIDE: {
|
14
|
-
'validator-spec': {
|
15
|
-
'props.type': {
|
16
|
-
value: {
|
17
|
-
type: string;
|
18
|
-
values: string[];
|
19
|
-
};
|
20
|
-
reason: string;
|
21
|
-
};
|
22
|
-
'props.marks': {
|
23
|
-
value: {
|
24
|
-
items: string[];
|
25
|
-
optional: boolean;
|
26
|
-
type: string;
|
27
|
-
};
|
28
|
-
reason: string;
|
29
|
-
};
|
30
|
-
};
|
31
|
-
};
|
32
13
|
} & {
|
33
14
|
marks: import("@atlaskit/adf-schema-generator/dist/types/adfMark").ADFMark<import("@atlaskit/adf-schema-generator/dist/types/types/ADFMarkSpec").ADFMarkSpec>[];
|
34
15
|
content: import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").ADFNodeContentRangeSpec[];
|
35
|
-
ignore: any[];
|
36
|
-
DANGEROUS_MANUAL_OVERRIDE: {
|
37
|
-
'validator-spec': {
|
38
|
-
'props.type': {
|
39
|
-
value: {
|
40
|
-
type: string;
|
41
|
-
values: string[];
|
42
|
-
};
|
43
|
-
reason: string;
|
44
|
-
};
|
45
|
-
};
|
46
|
-
};
|
47
16
|
}>;
|
@@ -1617,6 +1617,9 @@ export declare const layoutSection: {
|
|
1617
1617
|
content: {
|
1618
1618
|
type: string;
|
1619
1619
|
items: string[];
|
1620
|
+
minItems: number;
|
1621
|
+
maxItems: number;
|
1622
|
+
allowUnsupportedBlock: boolean;
|
1620
1623
|
};
|
1621
1624
|
marks: {
|
1622
1625
|
type: string;
|
@@ -1644,14 +1647,10 @@ export declare const layoutSection_with_single_column: (string | {
|
|
1644
1647
|
maxItems: number;
|
1645
1648
|
allowUnsupportedBlock: boolean;
|
1646
1649
|
};
|
1647
|
-
type: {
|
1648
|
-
type: string;
|
1649
|
-
values: string[];
|
1650
|
-
};
|
1651
1650
|
marks: {
|
1652
|
-
items: string[];
|
1653
|
-
optional: boolean;
|
1654
1651
|
type: string;
|
1652
|
+
optional: boolean;
|
1653
|
+
items: string[];
|
1655
1654
|
};
|
1656
1655
|
};
|
1657
1656
|
})[];
|
@@ -1669,10 +1668,6 @@ export declare const layoutSection_full: (string | {
|
|
1669
1668
|
optional: boolean;
|
1670
1669
|
items: string[];
|
1671
1670
|
};
|
1672
|
-
type: {
|
1673
|
-
type: string;
|
1674
|
-
values: string[];
|
1675
|
-
};
|
1676
1671
|
};
|
1677
1672
|
})[];
|
1678
1673
|
export declare const extensionFrame: {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@atlaskit/adf-schema",
|
3
|
-
"version": "44.
|
3
|
+
"version": "44.3.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/"
|
@@ -46,7 +46,7 @@
|
|
46
46
|
},
|
47
47
|
"devDependencies": {
|
48
48
|
"@atlassian/adf-schema-json": "^1.24.0",
|
49
|
-
"@atlaskit/adf-schema-generator": "^1.36.
|
49
|
+
"@atlaskit/adf-schema-generator": "^1.36.1",
|
50
50
|
"@atlaskit/codemod-utils": "^4.2.4",
|
51
51
|
"@babel/cli": "^7.22.9",
|
52
52
|
"@babel/core": "^7.22.9",
|