@atlaskit/adf-schema 19.3.1 → 20.0.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.
Files changed (82) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/dist/cjs/index.js +12 -6
  3. package/dist/cjs/schema/create-schema.js +5 -2
  4. package/dist/cjs/schema/default-schema.js +7 -13
  5. package/dist/cjs/schema/index.js +12 -6
  6. package/dist/cjs/schema/jira-schema.js +1 -1
  7. package/dist/cjs/schema/marks/fragment.js +77 -0
  8. package/dist/cjs/schema/marks/index.js +15 -1
  9. package/dist/cjs/schema/marks/unsupported-mark.js +1 -0
  10. package/dist/cjs/schema/nodes/bodied-extension.js +1 -1
  11. package/dist/cjs/schema/nodes/caption.js +0 -1
  12. package/dist/cjs/schema/nodes/doc.js +1 -1
  13. package/dist/cjs/schema/nodes/expand.js +1 -1
  14. package/dist/cjs/schema/nodes/index.js +0 -6
  15. package/dist/cjs/schema/nodes/layout-column.js +1 -1
  16. package/dist/cjs/schema/nodes/media-single.js +1 -1
  17. package/dist/cjs/schema/nodes/panel.js +2 -28
  18. package/dist/cjs/schema/nodes/paragraph.js +1 -1
  19. package/dist/cjs/schema/nodes/tableNodes.js +3 -3
  20. package/dist/cjs/utils/url.js +7 -1
  21. package/dist/cjs/version.json +1 -1
  22. package/dist/es2019/index.js +1 -1
  23. package/dist/es2019/schema/create-schema.js +7 -4
  24. package/dist/es2019/schema/default-schema.js +7 -11
  25. package/dist/es2019/schema/index.js +2 -2
  26. package/dist/es2019/schema/jira-schema.js +1 -1
  27. package/dist/es2019/schema/marks/fragment.js +59 -0
  28. package/dist/es2019/schema/marks/index.js +2 -1
  29. package/dist/es2019/schema/marks/unsupported-mark.js +1 -0
  30. package/dist/es2019/schema/nodes/bodied-extension.js +1 -1
  31. package/dist/es2019/schema/nodes/caption.js +0 -1
  32. package/dist/es2019/schema/nodes/doc.js +1 -1
  33. package/dist/es2019/schema/nodes/expand.js +1 -1
  34. package/dist/es2019/schema/nodes/index.js +1 -1
  35. package/dist/es2019/schema/nodes/layout-column.js +1 -1
  36. package/dist/es2019/schema/nodes/media-single.js +1 -1
  37. package/dist/es2019/schema/nodes/panel.js +1 -28
  38. package/dist/es2019/schema/nodes/paragraph.js +1 -1
  39. package/dist/es2019/schema/nodes/tableNodes.js +3 -3
  40. package/dist/es2019/utils/url.js +7 -1
  41. package/dist/es2019/version.json +1 -1
  42. package/dist/esm/index.js +1 -1
  43. package/dist/esm/schema/create-schema.js +7 -4
  44. package/dist/esm/schema/default-schema.js +7 -11
  45. package/dist/esm/schema/index.js +2 -2
  46. package/dist/esm/schema/jira-schema.js +1 -1
  47. package/dist/esm/schema/marks/fragment.js +64 -0
  48. package/dist/esm/schema/marks/index.js +2 -1
  49. package/dist/esm/schema/marks/unsupported-mark.js +1 -0
  50. package/dist/esm/schema/nodes/bodied-extension.js +1 -1
  51. package/dist/esm/schema/nodes/caption.js +0 -1
  52. package/dist/esm/schema/nodes/doc.js +1 -1
  53. package/dist/esm/schema/nodes/expand.js +1 -1
  54. package/dist/esm/schema/nodes/index.js +1 -1
  55. package/dist/esm/schema/nodes/layout-column.js +1 -1
  56. package/dist/esm/schema/nodes/media-single.js +1 -1
  57. package/dist/esm/schema/nodes/panel.js +1 -26
  58. package/dist/esm/schema/nodes/paragraph.js +1 -1
  59. package/dist/esm/schema/nodes/tableNodes.js +3 -3
  60. package/dist/esm/utils/url.js +7 -1
  61. package/dist/esm/version.json +1 -1
  62. package/dist/json-schema/v1/full.json +108 -73
  63. package/dist/json-schema/v1/stage-0.json +63 -26
  64. package/dist/types/index.d.ts +2 -2
  65. package/dist/types/schema/index.d.ts +3 -3
  66. package/dist/types/schema/marks/fragment.d.ts +30 -0
  67. package/dist/types/schema/marks/index.d.ts +2 -0
  68. package/dist/types/schema/marks/link.d.ts +3 -0
  69. package/dist/types/schema/nodes/block-card.d.ts +3 -0
  70. package/dist/types/schema/nodes/bodied-extension.d.ts +7 -5
  71. package/dist/types/schema/nodes/caption.d.ts +0 -1
  72. package/dist/types/schema/nodes/embed-card.d.ts +3 -0
  73. package/dist/types/schema/nodes/extension.d.ts +7 -5
  74. package/dist/types/schema/nodes/index.d.ts +1 -1
  75. package/dist/types/schema/nodes/inline-card.d.ts +0 -9
  76. package/dist/types/schema/nodes/inline-extension.d.ts +7 -5
  77. package/dist/types/schema/nodes/media-single.d.ts +0 -1
  78. package/dist/types/schema/nodes/panel.d.ts +1 -11
  79. package/json-schema/v1/full.json +108 -73
  80. package/json-schema/v1/stage-0.json +63 -26
  81. package/package.json +11 -8
  82. package/test-helpers/schema.ts +1 -0
@@ -427,6 +427,37 @@
427
427
  ],
428
428
  "additionalProperties": false
429
429
  },
430
+ "fragment_mark": {
431
+ "type": "object",
432
+ "properties": {
433
+ "type": {
434
+ "enum": [
435
+ "fragment"
436
+ ]
437
+ },
438
+ "attrs": {
439
+ "type": "object",
440
+ "properties": {
441
+ "localId": {
442
+ "type": "string",
443
+ "minLength": 1
444
+ },
445
+ "name": {
446
+ "type": "string"
447
+ }
448
+ },
449
+ "required": [
450
+ "localId"
451
+ ],
452
+ "additionalProperties": false
453
+ }
454
+ },
455
+ "required": [
456
+ "type",
457
+ "attrs"
458
+ ],
459
+ "additionalProperties": false
460
+ },
430
461
  "hardBreak_node": {
431
462
  "type": "object",
432
463
  "properties": {
@@ -569,7 +600,7 @@
569
600
  ],
570
601
  "additionalProperties": false
571
602
  },
572
- "inlineExtension_with_no_marks_node": {
603
+ "inlineExtension_with_marks_node": {
573
604
  "allOf": [
574
605
  {
575
606
  "$ref": "#/definitions/inlineExtension_node"
@@ -579,14 +610,16 @@
579
610
  "properties": {
580
611
  "marks": {
581
612
  "type": "array",
582
- "maxItems": 0
613
+ "items": {
614
+ "$ref": "#/definitions/dataConsumer_mark"
615
+ }
583
616
  }
584
617
  },
585
618
  "additionalProperties": true
586
619
  }
587
620
  ]
588
621
  },
589
- "inlineExtension_with_marks_node": {
622
+ "inlineExtension_with_experimental_marks_node": {
590
623
  "allOf": [
591
624
  {
592
625
  "$ref": "#/definitions/inlineExtension_node"
@@ -597,7 +630,7 @@
597
630
  "marks": {
598
631
  "type": "array",
599
632
  "items": {
600
- "$ref": "#/definitions/dataConsumer_mark"
633
+ "$ref": "#/definitions/fragment_mark"
601
634
  }
602
635
  }
603
636
  },
@@ -1013,10 +1046,10 @@
1013
1046
  "$ref": "#/definitions/emoji_node"
1014
1047
  },
1015
1048
  {
1016
- "$ref": "#/definitions/inlineExtension_with_no_marks_node"
1049
+ "$ref": "#/definitions/inlineExtension_with_marks_node"
1017
1050
  },
1018
1051
  {
1019
- "$ref": "#/definitions/inlineExtension_with_marks_node"
1052
+ "$ref": "#/definitions/inlineExtension_with_experimental_marks_node"
1020
1053
  },
1021
1054
  {
1022
1055
  "$ref": "#/definitions/date_node"
@@ -1809,7 +1842,7 @@
1809
1842
  ],
1810
1843
  "additionalProperties": false
1811
1844
  },
1812
- "extension_with_no_marks_node": {
1845
+ "extension_with_marks_node": {
1813
1846
  "allOf": [
1814
1847
  {
1815
1848
  "$ref": "#/definitions/extension_node"
@@ -1819,14 +1852,16 @@
1819
1852
  "properties": {
1820
1853
  "marks": {
1821
1854
  "type": "array",
1822
- "maxItems": 0
1855
+ "items": {
1856
+ "$ref": "#/definitions/dataConsumer_mark"
1857
+ }
1823
1858
  }
1824
1859
  },
1825
1860
  "additionalProperties": true
1826
1861
  }
1827
1862
  ]
1828
1863
  },
1829
- "extension_with_marks_node": {
1864
+ "extension_with_experimental_marks_node": {
1830
1865
  "allOf": [
1831
1866
  {
1832
1867
  "$ref": "#/definitions/extension_node"
@@ -1837,7 +1872,7 @@
1837
1872
  "marks": {
1838
1873
  "type": "array",
1839
1874
  "items": {
1840
- "$ref": "#/definitions/dataConsumer_mark"
1875
+ "$ref": "#/definitions/fragment_mark"
1841
1876
  }
1842
1877
  }
1843
1878
  },
@@ -2089,10 +2124,10 @@
2089
2124
  "$ref": "#/definitions/taskList_node"
2090
2125
  },
2091
2126
  {
2092
- "$ref": "#/definitions/extension_with_no_marks_node"
2127
+ "$ref": "#/definitions/extension_with_marks_node"
2093
2128
  },
2094
2129
  {
2095
- "$ref": "#/definitions/extension_with_marks_node"
2130
+ "$ref": "#/definitions/extension_with_experimental_marks_node"
2096
2131
  },
2097
2132
  {
2098
2133
  "$ref": "#/definitions/embedCard_node"
@@ -2227,10 +2262,10 @@
2227
2262
  "$ref": "#/definitions/taskList_node"
2228
2263
  },
2229
2264
  {
2230
- "$ref": "#/definitions/extension_with_no_marks_node"
2265
+ "$ref": "#/definitions/extension_with_marks_node"
2231
2266
  },
2232
2267
  {
2233
- "$ref": "#/definitions/extension_with_marks_node"
2268
+ "$ref": "#/definitions/extension_with_experimental_marks_node"
2234
2269
  },
2235
2270
  {
2236
2271
  "$ref": "#/definitions/embedCard_node"
@@ -2370,7 +2405,7 @@
2370
2405
  ],
2371
2406
  "additionalProperties": false
2372
2407
  },
2373
- "bodiedExtension_with_no_marks_node": {
2408
+ "bodiedExtension_with_marks_node": {
2374
2409
  "allOf": [
2375
2410
  {
2376
2411
  "$ref": "#/definitions/bodiedExtension_node"
@@ -2380,14 +2415,16 @@
2380
2415
  "properties": {
2381
2416
  "marks": {
2382
2417
  "type": "array",
2383
- "maxItems": 0
2418
+ "items": {
2419
+ "$ref": "#/definitions/dataConsumer_mark"
2420
+ }
2384
2421
  }
2385
2422
  },
2386
2423
  "additionalProperties": true
2387
2424
  }
2388
2425
  ]
2389
2426
  },
2390
- "bodiedExtension_with_marks_node": {
2427
+ "bodiedExtension_with_experimental_marks_node": {
2391
2428
  "allOf": [
2392
2429
  {
2393
2430
  "$ref": "#/definitions/bodiedExtension_node"
@@ -2398,7 +2435,7 @@
2398
2435
  "marks": {
2399
2436
  "type": "array",
2400
2437
  "items": {
2401
- "$ref": "#/definitions/dataConsumer_mark"
2438
+ "$ref": "#/definitions/fragment_mark"
2402
2439
  }
2403
2440
  }
2404
2441
  },
@@ -2460,10 +2497,10 @@
2460
2497
  "$ref": "#/definitions/taskList_node"
2461
2498
  },
2462
2499
  {
2463
- "$ref": "#/definitions/extension_with_no_marks_node"
2500
+ "$ref": "#/definitions/extension_with_marks_node"
2464
2501
  },
2465
2502
  {
2466
- "$ref": "#/definitions/extension_with_marks_node"
2503
+ "$ref": "#/definitions/extension_with_experimental_marks_node"
2467
2504
  },
2468
2505
  {
2469
2506
  "$ref": "#/definitions/embedCard_node"
@@ -2475,10 +2512,10 @@
2475
2512
  "$ref": "#/definitions/expand_with_no_mark_node"
2476
2513
  },
2477
2514
  {
2478
- "$ref": "#/definitions/bodiedExtension_with_no_marks_node"
2515
+ "$ref": "#/definitions/bodiedExtension_with_marks_node"
2479
2516
  },
2480
2517
  {
2481
- "$ref": "#/definitions/bodiedExtension_with_marks_node"
2518
+ "$ref": "#/definitions/bodiedExtension_with_experimental_marks_node"
2482
2519
  }
2483
2520
  ]
2484
2521
  },
@@ -2693,10 +2730,10 @@
2693
2730
  "$ref": "#/definitions/taskList_node"
2694
2731
  },
2695
2732
  {
2696
- "$ref": "#/definitions/extension_with_no_marks_node"
2733
+ "$ref": "#/definitions/extension_with_marks_node"
2697
2734
  },
2698
2735
  {
2699
- "$ref": "#/definitions/extension_with_marks_node"
2736
+ "$ref": "#/definitions/extension_with_experimental_marks_node"
2700
2737
  },
2701
2738
  {
2702
2739
  "$ref": "#/definitions/embedCard_node"
@@ -2711,10 +2748,10 @@
2711
2748
  "$ref": "#/definitions/expand_with_breakout_mark_node"
2712
2749
  },
2713
2750
  {
2714
- "$ref": "#/definitions/bodiedExtension_with_no_marks_node"
2751
+ "$ref": "#/definitions/bodiedExtension_with_marks_node"
2715
2752
  },
2716
2753
  {
2717
- "$ref": "#/definitions/bodiedExtension_with_marks_node"
2754
+ "$ref": "#/definitions/bodiedExtension_with_experimental_marks_node"
2718
2755
  },
2719
2756
  {
2720
2757
  "$ref": "#/definitions/layoutSection_full_node"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/adf-schema",
3
- "version": "19.3.1",
3
+ "version": "20.0.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/"
@@ -28,7 +28,7 @@
28
28
  "ak-postbuild": "yarn build:json-schema"
29
29
  },
30
30
  "dependencies": {
31
- "@atlaskit/editor-tables": "^2.0.0",
31
+ "@atlaskit/editor-tables": "^2.1.0",
32
32
  "@babel/runtime": "^7.0.0",
33
33
  "@types/linkify-it": "^2.0.4",
34
34
  "@types/prosemirror-model": "^1.11.0",
@@ -36,20 +36,20 @@
36
36
  "css-color-names": "0.0.4",
37
37
  "linkify-it": "^2.0.3",
38
38
  "memoize-one": "^6.0.0",
39
- "prosemirror-model": "1.11.0",
40
- "prosemirror-transform": "1.2.8"
39
+ "prosemirror-model": "1.14.3",
40
+ "prosemirror-transform": "1.3.2"
41
41
  },
42
42
  "devDependencies": {
43
- "@atlaskit/editor-json-transformer": "^8.6.0",
44
- "@atlaskit/editor-test-helpers": "^15.5.0",
45
- "@atlaskit/json-schema-generator": "^3.1.0",
43
+ "@atlaskit/editor-json-transformer": "^8.7.0",
44
+ "@atlaskit/editor-test-helpers": "^15.6.0",
45
+ "@atlaskit/json-schema-generator": "^3.2.0",
46
46
  "@atlassian/adf-sample": "^1.0.0",
47
47
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
48
48
  "@types/prosemirror-history": "^1.0.1",
49
49
  "ajv": "^6.12.6",
50
50
  "json-schema-diff-validator": "^0.4.1",
51
51
  "prosemirror-history": "^1.1.3",
52
- "prosemirror-state": "1.3.3",
52
+ "prosemirror-state": "1.3.4",
53
53
  "typescript": "3.9.6"
54
54
  },
55
55
  "techstack": {
@@ -57,6 +57,9 @@
57
57
  "circular-dependencies": [
58
58
  "file-level"
59
59
  ]
60
+ },
61
+ "@repo/internal": {
62
+ "deprecation": "no-deprecated-imports"
60
63
  }
61
64
  },
62
65
  "prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
@@ -72,6 +72,7 @@ export default createSchema({
72
72
  'unsupportedNodeAttribute',
73
73
  'annotation',
74
74
  'dataConsumer',
75
+ 'fragment',
75
76
  ],
76
77
  customNodeSpecs: {
77
78
  plain: { ...paragraph, content: 'text*', marks: '' },