@atlaskit/adf-schema 36.18.3 → 37.0.1

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 (47) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/index.js +0 -24
  3. package/dist/cjs/next-schema/generated/markTypes.js +77 -77
  4. package/dist/cjs/next-schema/generated/nodeTypes.js +577 -545
  5. package/dist/cjs/next-schema/nodes/heading.js +5 -0
  6. package/dist/cjs/next-schema/nodes/paragraph.js +7 -0
  7. package/dist/cjs/schema/create-schema.js +2 -2
  8. package/dist/cjs/schema/default-schema.js +1 -3
  9. package/dist/cjs/schema/index.js +0 -24
  10. package/dist/cjs/schema/nodes/heading.js +2 -51
  11. package/dist/cjs/schema/nodes/index.js +0 -24
  12. package/dist/cjs/schema/nodes/paragraph.js +2 -18
  13. package/dist/es2019/index.js +1 -1
  14. package/dist/es2019/next-schema/generated/markTypes.js +77 -77
  15. package/dist/es2019/next-schema/generated/nodeTypes.js +577 -545
  16. package/dist/es2019/next-schema/nodes/heading.js +5 -0
  17. package/dist/es2019/next-schema/nodes/paragraph.js +7 -0
  18. package/dist/es2019/schema/create-schema.js +3 -3
  19. package/dist/es2019/schema/default-schema.js +2 -4
  20. package/dist/es2019/schema/index.js +1 -1
  21. package/dist/es2019/schema/nodes/heading.js +2 -48
  22. package/dist/es2019/schema/nodes/index.js +2 -2
  23. package/dist/es2019/schema/nodes/paragraph.js +2 -15
  24. package/dist/esm/index.js +1 -1
  25. package/dist/esm/next-schema/generated/markTypes.js +77 -77
  26. package/dist/esm/next-schema/generated/nodeTypes.js +577 -545
  27. package/dist/esm/next-schema/nodes/heading.js +5 -0
  28. package/dist/esm/next-schema/nodes/paragraph.js +7 -0
  29. package/dist/esm/schema/create-schema.js +3 -3
  30. package/dist/esm/schema/default-schema.js +2 -4
  31. package/dist/esm/schema/index.js +1 -1
  32. package/dist/esm/schema/nodes/heading.js +1 -50
  33. package/dist/esm/schema/nodes/index.js +2 -2
  34. package/dist/esm/schema/nodes/paragraph.js +1 -17
  35. package/dist/json-schema/v1/full.json +12 -0
  36. package/dist/types/index.d.ts +1 -1
  37. package/dist/types/next-schema/generated/markTypes.d.ts +122 -122
  38. package/dist/types/next-schema/generated/nodeGroupTypes.d.ts +2 -2
  39. package/dist/types/next-schema/generated/nodeTypes.d.ts +474 -458
  40. package/dist/types/schema/index.d.ts +1 -1
  41. package/dist/types/schema/nodes/heading.d.ts +1 -3
  42. package/dist/types/schema/nodes/index.d.ts +2 -2
  43. package/dist/types/schema/nodes/paragraph.d.ts +1 -6
  44. package/json-schema/v1/full.json +12 -0
  45. package/package.json +3 -3
  46. package/schema-generators/__tests__/unit/adfToValidatorSpec.unit.ts +7 -1
  47. package/schema-generators/__tests__/unit/json-full-schema.unit.ts +12 -0
@@ -1,4 +1,4 @@
1
- export { PanelType, blockCard, blockquote, blockquoteWithList, bodiedExtension, bulletList, bulletListSelector, caption, codeBlock, codeBlockToJSON, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, date, decisionItem, decisionList, decisionListSelector, doc, embedCard, emoji, expand, expandToJSON, extension, hardBreak, heading, headingNodeSpec, headingStage0, image, inlineCard, inlineExtension, layoutColumn, layoutSection, layoutSectionWithSingleColumn, listItem, listItemWithTask, media, mediaGroup, mediaSingle, mediaSingleSpec, mediaInline, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, orderedList, orderedListSelector, orderedListWithOrder, panel, extendedPanel, paragraph, paragraphStage0, paragraphNodeSpec, placeholder, rule, getCellAttrs, getCellDomAttrs, status, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline, extensionFrame, multiBodiedExtension, } from './nodes';
1
+ export { PanelType, blockCard, blockquote, blockquoteWithList, bodiedExtension, bulletList, bulletListSelector, caption, codeBlock, codeBlockToJSON, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, date, decisionItem, decisionList, decisionListSelector, doc, embedCard, emoji, expand, expandToJSON, extension, hardBreak, heading, image, inlineCard, inlineExtension, layoutColumn, layoutSection, layoutSectionWithSingleColumn, listItem, listItemWithTask, media, mediaGroup, mediaSingle, mediaSingleSpec, mediaInline, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, orderedList, orderedListSelector, orderedListWithOrder, panel, extendedPanel, paragraph, placeholder, rule, getCellAttrs, getCellDomAttrs, status, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline, extensionFrame, multiBodiedExtension, } from './nodes';
2
2
  export type { BlockCardDefinition, BlockContent, BlockQuoteDefinition, BodiedExtensionDefinition, BulletListDefinition, CaptionDefinition, CardAttributes, CellAttributes, CodeBlockAttrs, CodeBlockBaseDefinition, CodeBlockDefinition, CodeBlockWithMarksDefinition, DatasourceAttributes, DatasourceAttributeProperties, DataType, DateDefinition, DecisionItemDefinition, DecisionListDefinition, DocNode, EmbedCardDefinition, EmbedCardAttributes, EmojiAttributes, EmojiDefinition, ExpandDefinition, ExtensionDefinition, ExtensionLayout, ExternalMediaAttributes, HardBreakDefinition, HeadingBaseDefinition, HeadingDefinition, HeadingWithAlignmentDefinition, HeadingWithIndentationDefinition, HeadingWithMarksDefinition, Inline, InlineAtomic, InlineCardDefinition, InlineCode, InlineExtensionDefinition, InlineFormattedText, InlineLinkText, LayoutColumnDefinition, LayoutSectionDefinition, LayoutSectionBaseDefinition, LayoutSectionFullDefinition, LayoutSectionWithSingleColumnDefinition, ListItemArray, ListItemDefinition, MarksObject, MediaADFAttrs, MediaAttributes, MediaInlineAttributes, MediaInlineDefinition, MediaBaseAttributes, MediaDefinition, MediaDisplayType, MediaGroupDefinition, MediaSingleDefinition, MediaType, MentionAttributes, MentionDefinition, MentionUserType, NestedExpandContent, NestedExpandDefinition, NoMark, NonNestableBlockContent, OrderedListDefinition, PanelAttributes, PanelDefinition, ParagraphBaseDefinition, ParagraphDefinition, ParagraphWithAlignmentDefinition, ParagraphWithIndentationDefinition, ParagraphWithMarksDefinition, PlaceholderDefinition, RuleDefinition, StatusDefinition, TableAttributes, TableCellDefinition, TableDefinition, TableDisplayMode, TableHeaderDefinition, TableLayout, TableRowDefinition, TaskItemDefinition, TaskListContent, TaskListDefinition, TextDefinition, UrlType, RichMediaAttributes, ExtendedMediaAttributes, RichMediaLayout, CellDomAttrs, ExtensionFrameDefinition, MultiBodiedExtensionDefinition, } from './nodes';
3
3
  export { AnnotationTypes, alignment, alignmentPositionMap, annotation, breakout, code, colorPalette,
4
4
  /** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
@@ -19,7 +19,7 @@ export interface HeadingBaseDefinition {
19
19
  */
20
20
  level: number;
21
21
  /**
22
- * @stage 0
22
+ * An optional UUID for unique identification of the node
23
23
  */
24
24
  localId?: string;
25
25
  };
@@ -37,6 +37,4 @@ export type HeadingWithAlignmentDefinition = HeadingBaseDefinition & MarksObject
37
37
  */
38
38
  export type HeadingWithIndentationDefinition = HeadingBaseDefinition & MarksObject<IndentationMarkDefinition>;
39
39
  export type HeadingWithMarksDefinition = HeadingWithAlignmentDefinition | HeadingWithIndentationDefinition;
40
- export declare const headingStage0: NodeSpec;
41
40
  export declare const heading: NodeSpec;
42
- export declare const headingNodeSpec: (adfStage?: string) => NodeSpec;
@@ -14,13 +14,13 @@ export { codeBlock, toJSON as codeBlockToJSON } from './code-block';
14
14
  export type { CodeBlockDefinition, CodeBlockAttrs, CodeBlockBaseDefinition, CodeBlockWithMarksDefinition, } from './code-block';
15
15
  export { hardBreak } from './hard-break';
16
16
  export type { HardBreakDefinition } from './hard-break';
17
- export { headingNodeSpec, heading, headingStage0 } from './heading';
17
+ export { heading } from './heading';
18
18
  export type { HeadingDefinition, HeadingBaseDefinition, HeadingWithAlignmentDefinition, HeadingWithIndentationDefinition, HeadingWithMarksDefinition, } from './heading';
19
19
  export { rule } from './rule';
20
20
  export type { RuleDefinition } from './rule';
21
21
  export { orderedList, orderedListSelector, orderedListWithOrder, } from './ordered-list';
22
22
  export type { OrderedListDefinition } from './types/list';
23
- export { paragraph, paragraphStage0, paragraphNodeSpec } from './paragraph';
23
+ export { paragraph } from './paragraph';
24
24
  export type { ParagraphDefinition, ParagraphBaseDefinition, ParagraphWithAlignmentDefinition, ParagraphWithIndentationDefinition, ParagraphWithMarksDefinition, } from './paragraph';
25
25
  export { emoji } from './emoji';
26
26
  export type { EmojiAttributes, EmojiDefinition } from './emoji';
@@ -4,7 +4,7 @@ import { MarksObject, NoMark } from './types/mark';
4
4
  import { Inline } from './types/inline-content';
5
5
  export interface ParagraphAttributes {
6
6
  /**
7
- * @stage 0
7
+ * An optional UUID for unique identification of the node
8
8
  */
9
9
  localId?: string;
10
10
  }
@@ -17,9 +17,6 @@ export interface ParagraphBaseDefinition {
17
17
  * @allowUnsupportedInline true
18
18
  */
19
19
  content?: Array<Inline>;
20
- /**
21
- * @stage 0
22
- */
23
20
  attrs?: ParagraphAttributes;
24
21
  marks?: Array<any>;
25
22
  }
@@ -44,6 +41,4 @@ export type ParagraphWithAlignmentDefinition = ParagraphBaseDefinition & MarksOb
44
41
  */
45
42
  export type ParagraphWithIndentationDefinition = ParagraphBaseDefinition & MarksObject<IndentationMarkDefinition>;
46
43
  export type ParagraphWithMarksDefinition = ParagraphWithAlignmentDefinition | ParagraphWithIndentationDefinition;
47
- export declare const paragraphStage0: NodeSpec;
48
44
  export declare const paragraph: NodeSpec;
49
- export declare const paragraphNodeSpec: (adfStage?: string) => NodeSpec;
@@ -1226,6 +1226,15 @@
1226
1226
  "$ref": "#/definitions/inline_node"
1227
1227
  }
1228
1228
  },
1229
+ "attrs": {
1230
+ "type": "object",
1231
+ "properties": {
1232
+ "localId": {
1233
+ "type": "string"
1234
+ }
1235
+ },
1236
+ "additionalProperties": false
1237
+ },
1229
1238
  "marks": {
1230
1239
  "type": "array"
1231
1240
  }
@@ -1705,6 +1714,9 @@
1705
1714
  "type": "number",
1706
1715
  "minimum": 1,
1707
1716
  "maximum": 6
1717
+ },
1718
+ "localId": {
1719
+ "type": "string"
1708
1720
  }
1709
1721
  },
1710
1722
  "required": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/adf-schema",
3
- "version": "36.18.3",
3
+ "version": "37.0.1",
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,8 +43,8 @@
43
43
  "memoize-one": "^6.0.0"
44
44
  },
45
45
  "devDependencies": {
46
- "@atlassian/adf-schema-json": "^1.15.0",
47
- "@atlaskit/adf-schema-generator": "^1.17.2",
46
+ "@atlassian/adf-schema-json": "^1.16.0",
47
+ "@atlaskit/adf-schema-generator": "^1.17.3",
48
48
  "@atlaskit/codemod-utils": "^4.2.4",
49
49
  "@atlaskit/json-schema-generator": "^3.3.9",
50
50
  "@babel/cli": "^7.22.9",
@@ -64,6 +64,7 @@ const paragraph = {
64
64
  optional: true,
65
65
  },
66
66
  marks: { type: 'array', items: [], optional: true },
67
+ attrs: { props: { localId: { type: 'string', optional: true } } },
67
68
  },
68
69
  };
69
70
 
@@ -142,6 +143,11 @@ const heading = {
142
143
  optional: true,
143
144
  },
144
145
  marks: { type: 'array', items: [], optional: true },
145
- attrs: { props: { level: { type: 'number', minimum: 1, maximum: 6 } } },
146
+ attrs: {
147
+ props: {
148
+ level: { type: 'number', minimum: 1, maximum: 6 },
149
+ localId: { type: 'string', optional: true },
150
+ },
151
+ },
146
152
  },
147
153
  };
@@ -822,6 +822,9 @@ const jsonWithTypes = {
822
822
  minimum: 1,
823
823
  type: 'number',
824
824
  },
825
+ localId: {
826
+ type: 'string',
827
+ },
825
828
  },
826
829
  required: ['level'],
827
830
  type: 'object',
@@ -1480,6 +1483,15 @@ const jsonWithTypes = {
1480
1483
  type: {
1481
1484
  enum: ['paragraph'],
1482
1485
  },
1486
+ attrs: {
1487
+ additionalProperties: false,
1488
+ properties: {
1489
+ localId: {
1490
+ type: 'string',
1491
+ },
1492
+ },
1493
+ type: 'object',
1494
+ },
1483
1495
  },
1484
1496
  required: ['type'],
1485
1497
  type: 'object',