@atlaskit/adf-schema 42.4.0 → 42.5.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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atlaskit/adf-schema
2
2
 
3
+ ## 42.5.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 82af32e: Remove exception for minItems=0 from caption node, aligning JSON schema and Validator Spec with PM Spec
8
+
3
9
  ## 42.4.0
4
10
 
5
11
  ### Minor Changes
@@ -21,17 +21,5 @@ var caption = exports.caption = (0, _adfSchemaGenerator.adfNode)('caption').defi
21
21
  selectable: false,
22
22
  marks: [_unsupportedMark.unsupportedMark, _unsupportedNodeAttribute.unsupportedNodeAttribute],
23
23
  allowAnyChildMark: true,
24
- content: [(0, _adfSchemaGenerator.$zeroPlus)((0, _adfSchemaGenerator.$or)(_hardBreak.hardBreak, _mention.mention, _emoji.emoji, _date.date, _placeholder.placeholder, _inlineCard.inlineCard, _status.status, _text.text.use('formatted'), _text.text.use('code_inline'), _unsupportedInline.unsupportedInline))],
25
- DANGEROUS_MANUAL_OVERRIDE: {
26
- 'validator-spec': {
27
- 'props.content.optional': {
28
- reason: '@DSLCompatibilityException - mismatch for caption',
29
- remove: true
30
- },
31
- 'props.content.minItems': {
32
- reason: '@DSLCompatibilityException - mismatch for caption',
33
- value: 0
34
- }
35
- }
36
- }
24
+ content: [(0, _adfSchemaGenerator.$zeroPlus)((0, _adfSchemaGenerator.$or)(_hardBreak.hardBreak, _mention.mention, _emoji.emoji, _date.date, _placeholder.placeholder, _inlineCard.inlineCard, _status.status, _text.text.use('formatted'), _text.text.use('code_inline'), _unsupportedInline.unsupportedInline))]
37
25
  });
@@ -669,8 +669,8 @@ var caption = exports.caption = {
669
669
  content: {
670
670
  type: 'array',
671
671
  items: [['hardBreak', 'mention', 'emoji', 'date', 'placeholder', 'inlineCard', 'status', 'text_formatted', 'text_code_inline']],
672
- allowUnsupportedInline: true,
673
- minItems: 0
672
+ optional: true,
673
+ allowUnsupportedInline: true
674
674
  }
675
675
  }
676
676
  };
@@ -15,17 +15,5 @@ export const caption = adfNode('caption').define({
15
15
  selectable: false,
16
16
  marks: [unsupportedMark, unsupportedNodeAttribute],
17
17
  allowAnyChildMark: true,
18
- content: [$zeroPlus($or(hardBreak, mention, emoji, date, placeholder, inlineCard, status, text.use('formatted'), text.use('code_inline'), unsupportedInline))],
19
- DANGEROUS_MANUAL_OVERRIDE: {
20
- 'validator-spec': {
21
- 'props.content.optional': {
22
- reason: '@DSLCompatibilityException - mismatch for caption',
23
- remove: true
24
- },
25
- 'props.content.minItems': {
26
- reason: '@DSLCompatibilityException - mismatch for caption',
27
- value: 0
28
- }
29
- }
30
- }
18
+ content: [$zeroPlus($or(hardBreak, mention, emoji, date, placeholder, inlineCard, status, text.use('formatted'), text.use('code_inline'), unsupportedInline))]
31
19
  });
@@ -663,8 +663,8 @@ export const caption = {
663
663
  content: {
664
664
  type: 'array',
665
665
  items: [['hardBreak', 'mention', 'emoji', 'date', 'placeholder', 'inlineCard', 'status', 'text_formatted', 'text_code_inline']],
666
- allowUnsupportedInline: true,
667
- minItems: 0
666
+ optional: true,
667
+ allowUnsupportedInline: true
668
668
  }
669
669
  }
670
670
  };
@@ -15,17 +15,5 @@ export var caption = adfNode('caption').define({
15
15
  selectable: false,
16
16
  marks: [unsupportedMark, unsupportedNodeAttribute],
17
17
  allowAnyChildMark: true,
18
- content: [$zeroPlus($or(hardBreak, mention, emoji, date, placeholder, inlineCard, status, text.use('formatted'), text.use('code_inline'), unsupportedInline))],
19
- DANGEROUS_MANUAL_OVERRIDE: {
20
- 'validator-spec': {
21
- 'props.content.optional': {
22
- reason: '@DSLCompatibilityException - mismatch for caption',
23
- remove: true
24
- },
25
- 'props.content.minItems': {
26
- reason: '@DSLCompatibilityException - mismatch for caption',
27
- value: 0
28
- }
29
- }
30
- }
18
+ content: [$zeroPlus($or(hardBreak, mention, emoji, date, placeholder, inlineCard, status, text.use('formatted'), text.use('code_inline'), unsupportedInline))]
31
19
  });
@@ -663,8 +663,8 @@ export var caption = {
663
663
  content: {
664
664
  type: 'array',
665
665
  items: [['hardBreak', 'mention', 'emoji', 'date', 'placeholder', 'inlineCard', 'status', 'text_formatted', 'text_code_inline']],
666
- allowUnsupportedInline: true,
667
- minItems: 0
666
+ optional: true,
667
+ allowUnsupportedInline: true
668
668
  }
669
669
  }
670
670
  };
@@ -840,12 +840,11 @@
840
840
  "$ref": "#/definitions/code_inline_node"
841
841
  }
842
842
  ]
843
- },
844
- "minItems": 0
843
+ }
845
844
  }
846
845
  },
847
846
  "additionalProperties": false,
848
- "required": ["type", "content"]
847
+ "required": ["type"]
849
848
  },
850
849
  "mediaSingle_caption_node": {
851
850
  "allOf": [
@@ -870,12 +870,11 @@
870
870
  "$ref": "#/definitions/code_inline_node"
871
871
  }
872
872
  ]
873
- },
874
- "minItems": 0
873
+ }
875
874
  }
876
875
  },
877
876
  "additionalProperties": false,
878
- "required": ["type", "content"]
877
+ "required": ["type"]
879
878
  },
880
879
  "mediaSingle_caption_node": {
881
880
  "allOf": [
@@ -682,8 +682,8 @@ export declare const caption: {
682
682
  content: {
683
683
  type: string;
684
684
  items: string[][];
685
+ optional: boolean;
685
686
  allowUnsupportedInline: boolean;
686
- minItems: number;
687
687
  };
688
688
  };
689
689
  };
@@ -840,12 +840,11 @@
840
840
  "$ref": "#/definitions/code_inline_node"
841
841
  }
842
842
  ]
843
- },
844
- "minItems": 0
843
+ }
845
844
  }
846
845
  },
847
846
  "additionalProperties": false,
848
- "required": ["type", "content"]
847
+ "required": ["type"]
849
848
  },
850
849
  "mediaSingle_caption_node": {
851
850
  "allOf": [
@@ -870,12 +870,11 @@
870
870
  "$ref": "#/definitions/code_inline_node"
871
871
  }
872
872
  ]
873
- },
874
- "minItems": 0
873
+ }
875
874
  }
876
875
  },
877
876
  "additionalProperties": false,
878
- "required": ["type", "content"]
877
+ "required": ["type"]
879
878
  },
880
879
  "mediaSingle_caption_node": {
881
880
  "allOf": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/adf-schema",
3
- "version": "42.4.0",
3
+ "version": "42.5.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.22.0",
49
- "@atlaskit/adf-schema-generator": "^1.34.0",
49
+ "@atlaskit/adf-schema-generator": "^1.35.0",
50
50
  "@atlaskit/codemod-utils": "^4.2.4",
51
51
  "@babel/cli": "^7.22.9",
52
52
  "@babel/core": "^7.22.9",