@atlaskit/adf-schema 36.8.4 → 36.8.5

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
+ ## 36.8.5
4
+
5
+ ### Patch Changes
6
+
7
+ - 669a895: Add anyof field to json marks in DSL transformer
8
+
3
9
  ## 36.8.4
4
10
 
5
11
  ### Patch Changes
@@ -10,7 +10,7 @@ var _border = require("../marks/border");
10
10
  var _link = require("../marks/link");
11
11
  var media = exports.media = (0, _adfSchemaGenerator.adfNode)('media').define({
12
12
  selectable: true,
13
- marks: [_link.link, _border.border, _annotation.annotation],
13
+ marks: [_link.link, _annotation.annotation, _border.border],
14
14
  attrs: {
15
15
  type: {
16
16
  type: 'enum',
@@ -13,7 +13,7 @@ var _media = require("./media");
13
13
  var mediaInline = exports.mediaInline = (0, _adfSchemaGenerator.adfNode)('mediaInline').define({
14
14
  selectable: true,
15
15
  atom: false,
16
- marks: [_link.link, _border.border, _annotation.annotation],
16
+ marks: [_link.link, _annotation.annotation, _border.border],
17
17
  attrs: {
18
18
  data: {
19
19
  type: 'object',
@@ -4,7 +4,7 @@ import { border } from '../marks/border';
4
4
  import { link } from '../marks/link';
5
5
  export const media = adfNode('media').define({
6
6
  selectable: true,
7
- marks: [link, border, annotation],
7
+ marks: [link, annotation, border],
8
8
  attrs: {
9
9
  type: {
10
10
  type: 'enum',
@@ -7,7 +7,7 @@ import { media } from './media';
7
7
  export const mediaInline = adfNode('mediaInline').define({
8
8
  selectable: true,
9
9
  atom: false,
10
- marks: [link, border, annotation],
10
+ marks: [link, annotation, border],
11
11
  attrs: {
12
12
  data: {
13
13
  type: 'object',
@@ -4,7 +4,7 @@ import { border } from '../marks/border';
4
4
  import { link } from '../marks/link';
5
5
  export var media = adfNode('media').define({
6
6
  selectable: true,
7
- marks: [link, border, annotation],
7
+ marks: [link, annotation, border],
8
8
  attrs: {
9
9
  type: {
10
10
  type: 'enum',
@@ -7,7 +7,7 @@ import { media } from './media';
7
7
  export var mediaInline = adfNode('mediaInline').define({
8
8
  selectable: true,
9
9
  atom: false,
10
- marks: [link, border, annotation],
10
+ marks: [link, annotation, border],
11
11
  attrs: {
12
12
  data: {
13
13
  type: 'object',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/adf-schema",
3
- "version": "36.8.4",
3
+ "version": "36.8.5",
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/"
@@ -44,7 +44,7 @@
44
44
  },
45
45
  "devDependencies": {
46
46
  "@atlassian/adf-schema-json": "^1.15.0",
47
- "@atlaskit/adf-schema-generator": "^1.7.3",
47
+ "@atlaskit/adf-schema-generator": "^1.7.4",
48
48
  "@babel/cli": "^7.22.9",
49
49
  "@babel/core": "^7.22.9",
50
50
  "@babel/plugin-proposal-class-properties": "^7.18.6",
@@ -43,13 +43,13 @@ A number of nodes have `marks` defined, yet the array is empty. Assuming this is
43
43
  .bodiedExtension_node.properties.marks, .codeBlock_node.properties.marks, .expand_node.properties.marks, .heading_node.properties.marks, .inlineExtension_node.properties.marks, .text_node.properties.marks) else . end)'
44
44
  ```
45
45
 
46
- Delete all subfields except for marks, items, type and properties. Content objects are also deleted. Inline is also deleted, as it is a content object for paragraph.
46
+ Delete all subfields except for marks, anyOf, items, type and properties. Content objects are also deleted. Inline is also deleted, as it is a content object for paragraph.
47
47
 
48
48
  A number of nodes have `marks` defined, yet the array is empty. Assuming this is redundant, I've removed them.
49
49
 
50
50
  ```sh
51
51
  cat packages/adf-schema/json-schema/v1/full.json | jq 'walk(if type == "object" then del(
52
- .content, .text, .attrs, .version, .required, .additionalProperties, .allOf, .anyOf, .minItems,
52
+ .content, .text, .attrs, .version, .required, .additionalProperties, .allOf, .minItems,
53
53
  .block_content, .nestedExpand_content, .non_nestable_block_content, .table_cell_content, .inline_node,
54
54
  .bodiedExtension_node.properties.marks, .codeBlock_node.properties.marks, .expand_node.properties.marks, .heading_node.properties.marks, .inlineExtension_node.properties.marks, .text_node.properties.marks, .extension_node.properties.marks, .paragraph_node.properties.marks) else . end)'
55
55
  ```
@@ -239,7 +239,19 @@ const jsonWithTypes = {
239
239
  },
240
240
  marks: {
241
241
  type: 'array',
242
- items: {},
242
+ items: {
243
+ anyOf: [
244
+ {
245
+ $ref: '#/definitions/link_mark',
246
+ },
247
+ {
248
+ $ref: '#/definitions/annotation_mark',
249
+ },
250
+ {
251
+ $ref: '#/definitions/border_mark',
252
+ },
253
+ ],
254
+ },
243
255
  },
244
256
  },
245
257
  },
@@ -251,7 +263,19 @@ const jsonWithTypes = {
251
263
  },
252
264
  marks: {
253
265
  type: 'array',
254
- items: {},
266
+ items: {
267
+ anyOf: [
268
+ {
269
+ $ref: '#/definitions/link_mark',
270
+ },
271
+ {
272
+ $ref: '#/definitions/annotation_mark',
273
+ },
274
+ {
275
+ $ref: '#/definitions/border_mark',
276
+ },
277
+ ],
278
+ },
255
279
  },
256
280
  },
257
281
  },