@atlaskit/adf-schema 52.7.1 → 52.8.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 (67) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/cjs/index.js +6 -0
  3. package/dist/cjs/next-schema/full-schema.adf.js +1 -1
  4. package/dist/cjs/next-schema/generated/nodeTypes.js +48 -1
  5. package/dist/cjs/next-schema/groups/blockContentGroup.js +1 -1
  6. package/dist/cjs/next-schema/groups/blockGroup.js +1 -1
  7. package/dist/cjs/next-schema/groups/nonNestableBlockContentGroup.js +1 -1
  8. package/dist/cjs/next-schema/groups/tableCellContentPseudoGroup.js +1 -1
  9. package/dist/cjs/next-schema/nodes/codeBlock.js +65 -0
  10. package/dist/cjs/schema/createPMSpecFactory.js +4 -0
  11. package/dist/cjs/schema/default-schema.js +2 -1
  12. package/dist/cjs/schema/index.js +6 -0
  13. package/dist/cjs/schema/nodes/code-block.js +110 -2
  14. package/dist/cjs/schema/nodes/index.js +6 -0
  15. package/dist/cjs/validator-schema/generated/validatorSpec.js +868 -805
  16. package/dist/es2019/index.js +1 -1
  17. package/dist/es2019/next-schema/full-schema.adf.js +1 -1
  18. package/dist/es2019/next-schema/generated/nodeTypes.js +47 -0
  19. package/dist/es2019/next-schema/groups/blockContentGroup.js +1 -1
  20. package/dist/es2019/next-schema/groups/blockGroup.js +1 -1
  21. package/dist/es2019/next-schema/groups/nonNestableBlockContentGroup.js +1 -1
  22. package/dist/es2019/next-schema/groups/tableCellContentPseudoGroup.js +1 -1
  23. package/dist/es2019/next-schema/nodes/codeBlock.js +65 -0
  24. package/dist/es2019/schema/createPMSpecFactory.js +4 -0
  25. package/dist/es2019/schema/default-schema.js +3 -2
  26. package/dist/es2019/schema/index.js +1 -1
  27. package/dist/es2019/schema/nodes/code-block.js +107 -3
  28. package/dist/es2019/schema/nodes/index.js +1 -1
  29. package/dist/es2019/validator-schema/generated/validatorSpec.js +867 -804
  30. package/dist/esm/index.js +1 -1
  31. package/dist/esm/next-schema/full-schema.adf.js +1 -1
  32. package/dist/esm/next-schema/generated/nodeTypes.js +47 -0
  33. package/dist/esm/next-schema/groups/blockContentGroup.js +1 -1
  34. package/dist/esm/next-schema/groups/blockGroup.js +1 -1
  35. package/dist/esm/next-schema/groups/nonNestableBlockContentGroup.js +1 -1
  36. package/dist/esm/next-schema/groups/tableCellContentPseudoGroup.js +1 -1
  37. package/dist/esm/next-schema/nodes/codeBlock.js +65 -0
  38. package/dist/esm/schema/createPMSpecFactory.js +4 -0
  39. package/dist/esm/schema/default-schema.js +3 -2
  40. package/dist/esm/schema/index.js +1 -1
  41. package/dist/esm/schema/nodes/code-block.js +109 -2
  42. package/dist/esm/schema/nodes/index.js +1 -1
  43. package/dist/esm/validator-schema/generated/validatorSpec.js +867 -804
  44. package/dist/json-schema/v1/stage-0.json +99 -0
  45. package/dist/types/index.d.ts +1 -1
  46. package/dist/types/next-schema/generated/markTypes.d.ts +22 -21
  47. package/dist/types/next-schema/generated/nodeGroupTypes.d.ts +3 -3
  48. package/dist/types/next-schema/generated/nodeTypes.d.ts +120 -92
  49. package/dist/types/next-schema/nodes/codeBlock.d.ts +3 -1
  50. package/dist/types/schema/createPMSpecFactory.d.ts +4 -0
  51. package/dist/types/schema/index.d.ts +1 -1
  52. package/dist/types/schema/nodes/code-block.d.ts +10 -0
  53. package/dist/types/schema/nodes/index.d.ts +1 -1
  54. package/dist/types/validator-schema/generated/validatorSpec.d.ts +701 -638
  55. package/dist/types-ts4.5/index.d.ts +1 -1
  56. package/dist/types-ts4.5/next-schema/generated/markTypes.d.ts +22 -21
  57. package/dist/types-ts4.5/next-schema/generated/nodeGroupTypes.d.ts +3 -3
  58. package/dist/types-ts4.5/next-schema/generated/nodeTypes.d.ts +120 -92
  59. package/dist/types-ts4.5/next-schema/nodes/codeBlock.d.ts +3 -1
  60. package/dist/types-ts4.5/schema/createPMSpecFactory.d.ts +4 -0
  61. package/dist/types-ts4.5/schema/index.d.ts +1 -1
  62. package/dist/types-ts4.5/schema/nodes/code-block.d.ts +10 -0
  63. package/dist/types-ts4.5/schema/nodes/index.d.ts +1 -1
  64. package/dist/types-ts4.5/validator-schema/generated/validatorSpec.d.ts +701 -638
  65. package/json-schema/v1/stage-0.json +99 -0
  66. package/package.json +2 -2
  67. package/schema-generators/validator-full-schema.ts +59 -1
@@ -1,7 +1,9 @@
1
1
  import type { ADFCommonNodeSpec, ADFNode } from '@atlaskit/adf-schema-generator';
2
2
  export declare const codeBlock: ADFNode<[
3
3
  string,
4
- 'root_only'
4
+ 'root_only',
5
+ 'with_extended_attributes',
6
+ 'root_only_with_extended_attributes'
5
7
  ], ADFCommonNodeSpec & {
6
8
  marks: any[];
7
9
  noExtend: true;
@@ -11,6 +11,10 @@ export type MarkSpecOptions<M extends Mark> = {
11
11
  toDOM?: (mark: M, inline: boolean) => DOMOutputSpec;
12
12
  };
13
13
  export type MarkSpecFactory = typeof createPMMarkSpecFactory;
14
+ /** Result of calling {@link createPMMarkSpecFactory} with a concrete mark spec (for isolated declarations). */
15
+ export type PMMarkSpecFactoryInstance<M extends Omit<Mark, 'toDOM' | 'parseDOM'> = Mark> = (options: MarkSpecOptions<M>) => MarkSpec;
16
+ /** Result of calling {@link createPMNodeSpecFactory} with a concrete node spec (for isolated declarations). */
17
+ export type PMNodeSpecFactoryInstance<N extends Omit<PMNode, 'toDOM' | 'parseDOM'> = PMNode> = (options: NodeSpecOptions<N>) => NodeSpec;
14
18
  /**
15
19
  * Factory method to attach custom parseDOM and/or toDOM for nodeSpec
16
20
  *
@@ -1,4 +1,4 @@
1
- export { PanelType, blockCard, blockCardWithLocalId, blockquote, extendedBlockquote, extendedBlockquoteWithLocalId, bodiedExtension, bulletList, bulletListSelector, bulletListWithLocalId, caption, captionWithLocalId, codeBlock, codeBlockWithLocalId, codeBlockToJSON, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, date, dateWithLocalId, decisionItem, decisionList, decisionListSelector, doc, embedCard, embedCardWithLocalId, emoji, emojiWithLocalId, expandWithNestedExpand, expandWithNestedExpandLocalId, expandToJSON, extension, hardBreak, heading, image, inlineCard, inlineCardWithLocalId, inlineExtension, layoutColumn, layoutColumnWithLocalId, layoutSection, layoutSectionWithLocalId, layoutSectionWithSingleColumn, layoutSectionWithSingleColumnLocalId, listItem, listItemWithLocalId, media, mediaGroup, mediaSingle, mediaSingleSpec, mediaInline, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleFullWithLocalId, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, nestedExpandWithLocalId, orderedList, orderedListSelector, orderedListWithLocalId, orderedListWithOrder, orderedListWithOrderAndLocalId, extendedPanel, extendedPanelWithLocalId, paragraph, placeholder, placeholderWithLocalId, rule, ruleWithLocalId, getCellAttrs, getCellDomAttrs, status, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, blockTaskItem, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline, extensionFrame, multiBodiedExtension, syncBlock, bodiedSyncBlock, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId, tableRowWithNestedTableWithLocalId, tableCellWithNestedTableWithLocalId, tableHeaderWithNestedTableWithLocalId, } from './nodes';
1
+ export { PanelType, blockCard, blockCardWithLocalId, blockquote, extendedBlockquote, extendedBlockquoteWithLocalId, bodiedExtension, bulletList, bulletListSelector, bulletListWithLocalId, caption, captionWithLocalId, codeBlock, codeBlockWithLocalId, codeBlockWithExtendedAttributes, codeBlockToJSON, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, date, dateWithLocalId, decisionItem, decisionList, decisionListSelector, doc, embedCard, embedCardWithLocalId, emoji, emojiWithLocalId, expandWithNestedExpand, expandWithNestedExpandLocalId, expandToJSON, extension, hardBreak, heading, image, inlineCard, inlineCardWithLocalId, inlineExtension, layoutColumn, layoutColumnWithLocalId, layoutSection, layoutSectionWithLocalId, layoutSectionWithSingleColumn, layoutSectionWithSingleColumnLocalId, listItem, listItemWithLocalId, media, mediaGroup, mediaSingle, mediaSingleSpec, mediaInline, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleFullWithLocalId, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, nestedExpandWithLocalId, orderedList, orderedListSelector, orderedListWithLocalId, orderedListWithOrder, orderedListWithOrderAndLocalId, extendedPanel, extendedPanelWithLocalId, paragraph, placeholder, placeholderWithLocalId, rule, ruleWithLocalId, getCellAttrs, getCellDomAttrs, status, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, blockTaskItem, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline, extensionFrame, multiBodiedExtension, syncBlock, bodiedSyncBlock, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId, tableRowWithNestedTableWithLocalId, tableCellWithNestedTableWithLocalId, tableHeaderWithNestedTableWithLocalId, } 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, 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, TableWithNestedTableDefinition, TableRowWithNestedTableDefinition, TableCellWithNestedTableDefinition, TableHeaderWithNestedTableDefinition, TableDisplayMode, TableHeaderDefinition, TableLayout, TableRowDefinition, TaskItemDefinition, BlockTaskItemDefinition, TaskListContent, TaskListDefinition, TextDefinition, UrlType, RichMediaAttributes, ExtendedMediaAttributes, RichMediaLayout, CellDomAttrs, ExtensionFrameDefinition, MultiBodiedExtensionDefinition, SyncBlockDefinition, BodiedSyncBlockDefinition, } from './nodes';
3
3
  export { AnnotationTypes, alignment, alignmentPositionMap, annotation, fontSize, breakout, code, colorPalette,
4
4
  /** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
@@ -13,9 +13,11 @@ export type CodeBlockBaseDefinition = {
13
13
  type: 'codeBlock';
14
14
  };
15
15
  export type CodeBlockAttrs = {
16
+ hideLineNumbers?: boolean;
16
17
  language?: string;
17
18
  localId?: string;
18
19
  uniqueId?: string;
20
+ wrap?: boolean;
19
21
  };
20
22
  /**
21
23
  * @name codeBlock_with_no_marks_node
@@ -29,4 +31,12 @@ export declare const codeBlock: NodeSpec;
29
31
  export declare const toJSON: (node: PMNode) => {
30
32
  attrs: Record<string, any>;
31
33
  };
34
+ /**
35
+ * @name codeBlock_with_extended_attributes
36
+ * @description stage-0 codeBlock variant with wrap and hideLineNumbers attributes (ADF Change 101)
37
+ *
38
+ * Stage-0 variant: adds wrap and hideLineNumbers attributes (ADF Change 101).
39
+ * The DSL variant includes all attrs (base + new), so the generated factory provides the full set.
40
+ */
41
+ export declare const codeBlockWithExtendedAttributes: NodeSpec;
32
42
  export declare const codeBlockWithLocalId: NodeSpec;
@@ -9,7 +9,7 @@ export { blockquote, extendedBlockquote, extendedBlockquoteWithLocalId } from '.
9
9
  export type { BlockQuoteDefinition } from './blockquote';
10
10
  export { bulletList, bulletListSelector, bulletListWithLocalId } from './bullet-list';
11
11
  export type { BulletListDefinition } from './types/list';
12
- export { codeBlock, codeBlockWithLocalId, toJSON as codeBlockToJSON } from './code-block';
12
+ export { codeBlock, codeBlockWithLocalId, codeBlockWithExtendedAttributes, toJSON as codeBlockToJSON, } from './code-block';
13
13
  export type { CodeBlockDefinition, CodeBlockAttrs, CodeBlockBaseDefinition, CodeBlockWithMarksDefinition, } from './code-block';
14
14
  export { hardBreak } from './hard-break';
15
15
  export type { HardBreakDefinition } from './hard-break';