@atlaskit/adf-utils 17.1.3 → 17.1.4

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 (181) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/builders/package.json +8 -1
  3. package/dist/cjs/version.json +1 -1
  4. package/dist/es2019/version.json +1 -1
  5. package/dist/esm/version.json +1 -1
  6. package/dist/types-ts4.0/builders/marks/alignment.d.ts +3 -0
  7. package/dist/types-ts4.0/builders/marks/annotation.d.ts +3 -0
  8. package/dist/types-ts4.0/builders/marks/breakout.d.ts +3 -0
  9. package/dist/types-ts4.0/builders/marks/code.d.ts +2 -0
  10. package/dist/types-ts4.0/builders/marks/data-consumer.d.ts +3 -0
  11. package/dist/types-ts4.0/builders/marks/em.d.ts +2 -0
  12. package/dist/types-ts4.0/builders/marks/fragment.d.ts +3 -0
  13. package/dist/types-ts4.0/builders/marks/indentation.d.ts +3 -0
  14. package/dist/types-ts4.0/builders/marks/link.d.ts +3 -0
  15. package/dist/types-ts4.0/builders/marks/strike.d.ts +2 -0
  16. package/dist/types-ts4.0/builders/marks/strong.d.ts +2 -0
  17. package/dist/types-ts4.0/builders/marks/subsup.d.ts +3 -0
  18. package/dist/types-ts4.0/builders/marks/text-color.d.ts +3 -0
  19. package/dist/types-ts4.0/builders/marks/underline.d.ts +2 -0
  20. package/dist/types-ts4.0/builders/nodes/block-card.d.ts +2 -0
  21. package/dist/types-ts4.0/builders/nodes/blockquote.d.ts +2 -0
  22. package/dist/types-ts4.0/builders/nodes/bodied-extension.d.ts +2 -0
  23. package/dist/types-ts4.0/builders/nodes/bullet-list.d.ts +2 -0
  24. package/dist/types-ts4.0/builders/nodes/caption.d.ts +2 -0
  25. package/dist/types-ts4.0/builders/nodes/code-block.d.ts +3 -0
  26. package/dist/types-ts4.0/builders/nodes/date.d.ts +2 -0
  27. package/dist/types-ts4.0/builders/nodes/decision-item.d.ts +2 -0
  28. package/dist/types-ts4.0/builders/nodes/decision-list.d.ts +2 -0
  29. package/dist/types-ts4.0/builders/nodes/doc.d.ts +2 -0
  30. package/dist/types-ts4.0/builders/nodes/embed-card.d.ts +2 -0
  31. package/dist/types-ts4.0/builders/nodes/emoji.d.ts +2 -0
  32. package/dist/types-ts4.0/builders/nodes/expand.d.ts +2 -0
  33. package/dist/types-ts4.0/builders/nodes/extension.d.ts +2 -0
  34. package/dist/types-ts4.0/builders/nodes/hard-break.d.ts +2 -0
  35. package/dist/types-ts4.0/builders/nodes/heading.d.ts +2 -0
  36. package/dist/types-ts4.0/builders/nodes/inline-card.d.ts +2 -0
  37. package/dist/types-ts4.0/builders/nodes/inline-extension.d.ts +2 -0
  38. package/dist/types-ts4.0/builders/nodes/layout-column.d.ts +4 -0
  39. package/dist/types-ts4.0/builders/nodes/layout-section.d.ts +2 -0
  40. package/dist/types-ts4.0/builders/nodes/list-item.d.ts +2 -0
  41. package/dist/types-ts4.0/builders/nodes/media-group.d.ts +2 -0
  42. package/dist/types-ts4.0/builders/nodes/media-inline.d.ts +2 -0
  43. package/dist/types-ts4.0/builders/nodes/media-single.d.ts +7 -0
  44. package/dist/types-ts4.0/builders/nodes/media.d.ts +2 -0
  45. package/dist/types-ts4.0/builders/nodes/mention.d.ts +2 -0
  46. package/dist/types-ts4.0/builders/nodes/nested-expand.d.ts +2 -0
  47. package/dist/types-ts4.0/builders/nodes/ordered-list.d.ts +2 -0
  48. package/dist/types-ts4.0/builders/nodes/panel.d.ts +2 -0
  49. package/dist/types-ts4.0/builders/nodes/paragraph.d.ts +2 -0
  50. package/dist/types-ts4.0/builders/nodes/placeholder.d.ts +2 -0
  51. package/dist/types-ts4.0/builders/nodes/rule.d.ts +2 -0
  52. package/dist/types-ts4.0/builders/nodes/status.d.ts +2 -0
  53. package/dist/types-ts4.0/builders/nodes/table-cell.d.ts +2 -0
  54. package/dist/types-ts4.0/builders/nodes/table-header.d.ts +2 -0
  55. package/dist/types-ts4.0/builders/nodes/table-row.d.ts +2 -0
  56. package/dist/types-ts4.0/builders/nodes/table.d.ts +2 -0
  57. package/dist/types-ts4.0/builders/nodes/task-item.d.ts +2 -0
  58. package/dist/types-ts4.0/builders/nodes/task-list.d.ts +2 -0
  59. package/dist/types-ts4.0/builders/nodes/text.d.ts +2 -0
  60. package/dist/types-ts4.0/builders/types.d.ts +8 -0
  61. package/dist/types-ts4.0/builders/utils/apply-mark.d.ts +4 -0
  62. package/dist/types-ts4.0/builders/utils/create-text-nodes.d.ts +3 -0
  63. package/dist/types-ts4.0/builders/utils/is-duplicate-mark.d.ts +6 -0
  64. package/dist/types-ts4.0/builders.d.ts +63 -0
  65. package/dist/types-ts4.0/empty-adf.d.ts +2 -0
  66. package/dist/types-ts4.0/index.d.ts +1 -0
  67. package/dist/types-ts4.0/scrub/default-node-replacements.d.ts +10 -0
  68. package/dist/types-ts4.0/scrub/default-value-replacements.d.ts +6 -0
  69. package/dist/types-ts4.0/scrub/hash.d.ts +1 -0
  70. package/dist/types-ts4.0/scrub/scrub-adf.d.ts +9 -0
  71. package/dist/types-ts4.0/scrub/scrub-content.d.ts +11 -0
  72. package/dist/types-ts4.0/scrub.d.ts +1 -0
  73. package/dist/types-ts4.0/transforms/dedupe-marks-transform.d.ts +8 -0
  74. package/dist/types-ts4.0/transforms/indentation-marks-transform.d.ts +7 -0
  75. package/dist/types-ts4.0/transforms/media-link-transform.d.ts +5 -0
  76. package/dist/types-ts4.0/transforms/nodes-missing-content-transform.d.ts +7 -0
  77. package/dist/types-ts4.0/transforms/text-link-code-transform.d.ts +5 -0
  78. package/dist/types-ts4.0/transforms.d.ts +5 -0
  79. package/dist/types-ts4.0/traverse/filter.d.ts +2 -0
  80. package/dist/types-ts4.0/traverse/map.d.ts +2 -0
  81. package/dist/types-ts4.0/traverse/reduce.d.ts +2 -0
  82. package/dist/types-ts4.0/traverse/traverse.d.ts +12 -0
  83. package/dist/types-ts4.0/traverse.d.ts +4 -0
  84. package/dist/types-ts4.0/types/index.d.ts +24 -0
  85. package/dist/types-ts4.0/types/validatorTypes.d.ts +137 -0
  86. package/dist/types-ts4.0/validator/entry.d.ts +1 -0
  87. package/dist/types-ts4.0/validator/rules.d.ts +3 -0
  88. package/dist/types-ts4.0/validator/specs/alignment.d.ts +17 -0
  89. package/dist/types-ts4.0/validator/specs/annotation.d.ts +20 -0
  90. package/dist/types-ts4.0/validator/specs/atomic_inline.d.ts +2 -0
  91. package/dist/types-ts4.0/validator/specs/blockCard.d.ts +26 -0
  92. package/dist/types-ts4.0/validator/specs/block_content.d.ts +2 -0
  93. package/dist/types-ts4.0/validator/specs/blockquote.d.ts +15 -0
  94. package/dist/types-ts4.0/validator/specs/bodiedExtension.d.ts +50 -0
  95. package/dist/types-ts4.0/validator/specs/bodiedExtension_with_marks.d.ts +10 -0
  96. package/dist/types-ts4.0/validator/specs/breakout.d.ts +17 -0
  97. package/dist/types-ts4.0/validator/specs/bulletList.d.ts +14 -0
  98. package/dist/types-ts4.0/validator/specs/caption.d.ts +14 -0
  99. package/dist/types-ts4.0/validator/specs/code.d.ts +9 -0
  100. package/dist/types-ts4.0/validator/specs/codeBlock.d.ts +38 -0
  101. package/dist/types-ts4.0/validator/specs/codeBlock_with_marks.d.ts +10 -0
  102. package/dist/types-ts4.0/validator/specs/codeBlock_with_no_marks.d.ts +11 -0
  103. package/dist/types-ts4.0/validator/specs/code_inline.d.ts +10 -0
  104. package/dist/types-ts4.0/validator/specs/dataConsumer.d.ts +20 -0
  105. package/dist/types-ts4.0/validator/specs/date.d.ts +17 -0
  106. package/dist/types-ts4.0/validator/specs/decisionItem.d.ts +25 -0
  107. package/dist/types-ts4.0/validator/specs/decisionList.d.ts +22 -0
  108. package/dist/types-ts4.0/validator/specs/doc.d.ts +18 -0
  109. package/dist/types-ts4.0/validator/specs/em.d.ts +9 -0
  110. package/dist/types-ts4.0/validator/specs/embedCard.d.ts +35 -0
  111. package/dist/types-ts4.0/validator/specs/emoji.d.ts +24 -0
  112. package/dist/types-ts4.0/validator/specs/expand.d.ts +28 -0
  113. package/dist/types-ts4.0/validator/specs/expand_with_breakout_mark.d.ts +10 -0
  114. package/dist/types-ts4.0/validator/specs/expand_with_no_mark.d.ts +11 -0
  115. package/dist/types-ts4.0/validator/specs/extension.d.ts +44 -0
  116. package/dist/types-ts4.0/validator/specs/extension_with_marks.d.ts +10 -0
  117. package/dist/types-ts4.0/validator/specs/formatted_text_inline.d.ts +10 -0
  118. package/dist/types-ts4.0/validator/specs/fragment.d.ts +21 -0
  119. package/dist/types-ts4.0/validator/specs/hardBreak.d.ts +19 -0
  120. package/dist/types-ts4.0/validator/specs/heading.d.ts +29 -0
  121. package/dist/types-ts4.0/validator/specs/heading_with_alignment.d.ts +10 -0
  122. package/dist/types-ts4.0/validator/specs/heading_with_indentation.d.ts +10 -0
  123. package/dist/types-ts4.0/validator/specs/heading_with_no_marks.d.ts +11 -0
  124. package/dist/types-ts4.0/validator/specs/indentation.d.ts +18 -0
  125. package/dist/types-ts4.0/validator/specs/index.d.ts +82 -0
  126. package/dist/types-ts4.0/validator/specs/inline.d.ts +2 -0
  127. package/dist/types-ts4.0/validator/specs/inlineCard.d.ts +26 -0
  128. package/dist/types-ts4.0/validator/specs/inlineExtension.d.ts +39 -0
  129. package/dist/types-ts4.0/validator/specs/inlineExtension_with_marks.d.ts +10 -0
  130. package/dist/types-ts4.0/validator/specs/inline_comment_marker.d.ts +16 -0
  131. package/dist/types-ts4.0/validator/specs/layoutColumn.d.ts +24 -0
  132. package/dist/types-ts4.0/validator/specs/layoutSection.d.ts +18 -0
  133. package/dist/types-ts4.0/validator/specs/layoutSection_full.d.ts +21 -0
  134. package/dist/types-ts4.0/validator/specs/layoutSection_with_single_column.d.ts +21 -0
  135. package/dist/types-ts4.0/validator/specs/link.d.ts +33 -0
  136. package/dist/types-ts4.0/validator/specs/link_text_inline.d.ts +10 -0
  137. package/dist/types-ts4.0/validator/specs/listItem.d.ts +15 -0
  138. package/dist/types-ts4.0/validator/specs/media.d.ts +73 -0
  139. package/dist/types-ts4.0/validator/specs/mediaGroup.d.ts +15 -0
  140. package/dist/types-ts4.0/validator/specs/mediaInline.d.ts +51 -0
  141. package/dist/types-ts4.0/validator/specs/mediaSingle.d.ts +29 -0
  142. package/dist/types-ts4.0/validator/specs/mediaSingle_caption.d.ts +13 -0
  143. package/dist/types-ts4.0/validator/specs/mediaSingle_full.d.ts +12 -0
  144. package/dist/types-ts4.0/validator/specs/mention.d.ts +29 -0
  145. package/dist/types-ts4.0/validator/specs/nestedExpand.d.ts +19 -0
  146. package/dist/types-ts4.0/validator/specs/nestedExpand_content.d.ts +7 -0
  147. package/dist/types-ts4.0/validator/specs/nestedExpand_with_no_marks.d.ts +11 -0
  148. package/dist/types-ts4.0/validator/specs/non_nestable_block_content.d.ts +2 -0
  149. package/dist/types-ts4.0/validator/specs/orderedList.d.ts +23 -0
  150. package/dist/types-ts4.0/validator/specs/panel.d.ts +39 -0
  151. package/dist/types-ts4.0/validator/specs/paragraph.d.ts +20 -0
  152. package/dist/types-ts4.0/validator/specs/paragraph_with_alignment.d.ts +10 -0
  153. package/dist/types-ts4.0/validator/specs/paragraph_with_indentation.d.ts +10 -0
  154. package/dist/types-ts4.0/validator/specs/paragraph_with_no_marks.d.ts +11 -0
  155. package/dist/types-ts4.0/validator/specs/placeholder.d.ts +16 -0
  156. package/dist/types-ts4.0/validator/specs/rule.d.ts +9 -0
  157. package/dist/types-ts4.0/validator/specs/status.d.ts +29 -0
  158. package/dist/types-ts4.0/validator/specs/strike.d.ts +9 -0
  159. package/dist/types-ts4.0/validator/specs/strong.d.ts +9 -0
  160. package/dist/types-ts4.0/validator/specs/subsup.d.ts +17 -0
  161. package/dist/types-ts4.0/validator/specs/table.d.ts +38 -0
  162. package/dist/types-ts4.0/validator/specs/tableCell.d.ts +35 -0
  163. package/dist/types-ts4.0/validator/specs/tableCell_content.d.ts +7 -0
  164. package/dist/types-ts4.0/validator/specs/tableHeader.d.ts +35 -0
  165. package/dist/types-ts4.0/validator/specs/tableRow.d.ts +13 -0
  166. package/dist/types-ts4.0/validator/specs/taskItem.d.ts +26 -0
  167. package/dist/types-ts4.0/validator/specs/taskList.d.ts +23 -0
  168. package/dist/types-ts4.0/validator/specs/text.d.ts +18 -0
  169. package/dist/types-ts4.0/validator/specs/textColor.d.ts +17 -0
  170. package/dist/types-ts4.0/validator/specs/underline.d.ts +9 -0
  171. package/dist/types-ts4.0/validator/utils.d.ts +8 -0
  172. package/dist/types-ts4.0/validator/validator.d.ts +3 -0
  173. package/dist/types-ts4.0/validator.d.ts +1 -0
  174. package/empty-adf/package.json +8 -1
  175. package/package.json +9 -2
  176. package/scrub/package.json +8 -1
  177. package/transforms/package.json +8 -1
  178. package/traverse/package.json +8 -1
  179. package/types/package.json +8 -1
  180. package/validator/package.json +8 -1
  181. package/validatorTypes/package.json +8 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atlaskit/adf-utils
2
2
 
3
+ ## 17.1.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [`8cc2f888c83`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8cc2f888c83) - Upgrade Typescript from `4.3.5` to `4.5.5`
8
+
3
9
  ## 17.1.3
4
10
 
5
11
  ### Patch Changes
@@ -4,5 +4,12 @@
4
4
  "module": "../dist/esm/builders.js",
5
5
  "module:es2019": "../dist/es2019/builders.js",
6
6
  "sideEffects": false,
7
- "types": "../dist/types/builders.d.ts"
7
+ "types": "../dist/types/builders.d.ts",
8
+ "typesVersions": {
9
+ ">=4.0 <4.5": {
10
+ "*": [
11
+ "../dist/types-ts4.0/builders.d.ts"
12
+ ]
13
+ }
14
+ }
8
15
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/adf-utils",
3
- "version": "17.1.3",
3
+ "version": "17.1.4",
4
4
  "sideEffects": false
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/adf-utils",
3
- "version": "17.1.3",
3
+ "version": "17.1.4",
4
4
  "sideEffects": false
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/adf-utils",
3
- "version": "17.1.3",
3
+ "version": "17.1.4",
4
4
  "sideEffects": false
5
5
  }
@@ -0,0 +1,3 @@
1
+ import { AlignmentMarkDefinition, AlignmentAttributes, ParagraphDefinition, HeadingDefinition } from '@atlaskit/adf-schema';
2
+ import { WithMark, WithAppliedMark } from '../types';
3
+ export declare const alignment: (attrs: AlignmentAttributes) => (maybeNode: WithMark | string) => WithAppliedMark<ParagraphDefinition | HeadingDefinition, AlignmentMarkDefinition>;
@@ -0,0 +1,3 @@
1
+ import { AnnotationMarkAttributes } from '@atlaskit/adf-schema';
2
+ import { WithMark } from '../types';
3
+ export declare const annotation: (attrs: AnnotationMarkAttributes) => (maybeNode: WithMark | string) => WithMark;
@@ -0,0 +1,3 @@
1
+ import { BreakoutMarkAttrs, BreakoutMarkDefinition, CodeBlockDefinition, LayoutSectionDefinition } from '@atlaskit/adf-schema';
2
+ import { WithAppliedMark } from '../types';
3
+ export declare const breakout: (attrs: BreakoutMarkAttrs) => (maybeNode: CodeBlockDefinition | LayoutSectionDefinition) => WithAppliedMark<CodeBlockDefinition | LayoutSectionDefinition, BreakoutMarkDefinition>;
@@ -0,0 +1,2 @@
1
+ import { WithMark } from '../types';
2
+ export declare const code: (maybeNode: WithMark | string) => WithMark;
@@ -0,0 +1,3 @@
1
+ import { ExtensionDefinition, BodiedExtensionDefinition, InlineExtensionDefinition, DataConsumerAttributes, DataConsumerDefinition } from '@atlaskit/adf-schema';
2
+ import { WithAppliedMark } from '../types';
3
+ export declare const dataConsumer: (attrs: DataConsumerAttributes) => (maybeNode: ExtensionDefinition | BodiedExtensionDefinition | InlineExtensionDefinition) => WithAppliedMark<ExtensionDefinition | BodiedExtensionDefinition | InlineExtensionDefinition, DataConsumerDefinition>;
@@ -0,0 +1,2 @@
1
+ import { WithMark } from '../types';
2
+ export declare const em: (maybeNode: WithMark | string) => WithMark;
@@ -0,0 +1,3 @@
1
+ import { ExtensionDefinition, BodiedExtensionDefinition, InlineExtensionDefinition, TableDefinition, FragmentAttributes, FragmentDefinition } from '@atlaskit/adf-schema';
2
+ import { WithAppliedMark } from '../types';
3
+ export declare const fragment: (attrs: FragmentAttributes) => (maybeNode: TableDefinition | ExtensionDefinition | BodiedExtensionDefinition | InlineExtensionDefinition) => WithAppliedMark<ExtensionDefinition | BodiedExtensionDefinition | InlineExtensionDefinition | TableDefinition, FragmentDefinition>;
@@ -0,0 +1,3 @@
1
+ import { IndentationMarkDefinition, IndentationMarkAttributes, ParagraphDefinition } from '@atlaskit/adf-schema';
2
+ import { WithMark, WithAppliedMark } from '../types';
3
+ export declare const indentation: (attrs: IndentationMarkAttributes) => (maybeNode: WithMark | string) => WithAppliedMark<ParagraphDefinition, IndentationMarkDefinition>;
@@ -0,0 +1,3 @@
1
+ import { LinkAttributes } from '@atlaskit/adf-schema';
2
+ import { WithMark } from '../types';
3
+ export declare const link: (attrs: LinkAttributes) => (maybeNode: WithMark | string) => WithMark;
@@ -0,0 +1,2 @@
1
+ import { WithMark } from '../types';
2
+ export declare const strike: (maybeNode: WithMark | string) => WithMark;
@@ -0,0 +1,2 @@
1
+ import { WithMark } from '../types';
2
+ export declare const strong: (maybeNode: WithMark | string) => WithMark;
@@ -0,0 +1,3 @@
1
+ import { SubSupAttributes } from '@atlaskit/adf-schema';
2
+ import { WithMark } from '../types';
3
+ export declare const subsup: (attrs: SubSupAttributes) => (maybeNode: WithMark | string) => WithMark;
@@ -0,0 +1,3 @@
1
+ import { TextColorAttributes } from '@atlaskit/adf-schema';
2
+ import { WithMark } from '../types';
3
+ export declare const textColor: (attrs: TextColorAttributes) => (maybeNode: WithMark | string) => WithMark;
@@ -0,0 +1,2 @@
1
+ import { WithMark } from '../types';
2
+ export declare const underline: (maybeNode: WithMark | string) => WithMark;
@@ -0,0 +1,2 @@
1
+ import { BlockCardDefinition, CardAttributes } from '@atlaskit/adf-schema';
2
+ export declare const blockCard: (attrs: CardAttributes) => BlockCardDefinition;
@@ -0,0 +1,2 @@
1
+ import { ParagraphDefinition, BlockQuoteDefinition } from '@atlaskit/adf-schema';
2
+ export declare const blockQuote: (...content: Array<ParagraphDefinition>) => BlockQuoteDefinition;
@@ -0,0 +1,2 @@
1
+ import { BodiedExtensionDefinition, NonNestableBlockContent } from '@atlaskit/adf-schema';
2
+ export declare const bodiedExtension: (attrs: BodiedExtensionDefinition['attrs']) => (...content: Array<NonNestableBlockContent>) => BodiedExtensionDefinition;
@@ -0,0 +1,2 @@
1
+ import { BulletListDefinition, ListItemDefinition } from '@atlaskit/adf-schema';
2
+ export declare const bulletList: (...content: Array<ListItemDefinition>) => BulletListDefinition;
@@ -0,0 +1,2 @@
1
+ import { CaptionDefinition } from '@atlaskit/adf-schema';
2
+ export declare const caption: (...content: CaptionDefinition['content']) => CaptionDefinition;
@@ -0,0 +1,3 @@
1
+ import { CodeBlockDefinition, TextDefinition, NoMark } from '@atlaskit/adf-schema';
2
+ export declare type CodeBlockContent = TextDefinition & NoMark;
3
+ export declare const codeBlock: (attrs: CodeBlockDefinition['attrs'] | undefined) => (...content: Array<CodeBlockContent>) => CodeBlockDefinition;
@@ -0,0 +1,2 @@
1
+ import { DateDefinition } from '@atlaskit/adf-schema';
2
+ export declare const date: (attrs?: DateDefinition['attrs']) => DateDefinition;
@@ -0,0 +1,2 @@
1
+ import { DecisionItemDefinition, Inline } from '@atlaskit/adf-schema';
2
+ export declare const decisionItem: (attrs: DecisionItemDefinition['attrs']) => (...content: Array<Inline>) => DecisionItemDefinition;
@@ -0,0 +1,2 @@
1
+ import { DecisionListDefinition, DecisionItemDefinition } from '@atlaskit/adf-schema';
2
+ export declare const decisionList: (attrs: DecisionListDefinition['attrs']) => (...content: Array<DecisionItemDefinition>) => DecisionListDefinition;
@@ -0,0 +1,2 @@
1
+ import { DocNode, BlockContent, LayoutSectionDefinition } from '@atlaskit/adf-schema';
2
+ export declare const doc: (...content: Array<BlockContent | LayoutSectionDefinition>) => DocNode;
@@ -0,0 +1,2 @@
1
+ import { EmbedCardDefinition, EmbedCardAttributes } from '@atlaskit/adf-schema';
2
+ export declare const embedCard: (attrs: EmbedCardAttributes) => EmbedCardDefinition;
@@ -0,0 +1,2 @@
1
+ import { EmojiDefinition, EmojiAttributes } from '@atlaskit/adf-schema';
2
+ export declare const emoji: (attrs: EmojiAttributes) => EmojiDefinition;
@@ -0,0 +1,2 @@
1
+ import { ExpandDefinition, NonNestableBlockContent } from '@atlaskit/adf-schema';
2
+ export declare const expand: (attrs: ExpandDefinition['attrs']) => (...content: Array<NonNestableBlockContent>) => ExpandDefinition;
@@ -0,0 +1,2 @@
1
+ import { ExtensionDefinition } from '@atlaskit/adf-schema';
2
+ export declare const extension: (attrs: ExtensionDefinition['attrs']) => ExtensionDefinition;
@@ -0,0 +1,2 @@
1
+ import { HardBreakDefinition } from '@atlaskit/adf-schema';
2
+ export declare const hardBreak: (attrs?: HardBreakDefinition['attrs']) => HardBreakDefinition;
@@ -0,0 +1,2 @@
1
+ import { Inline, HeadingDefinition } from '@atlaskit/adf-schema';
2
+ export declare const heading: (attrs: HeadingDefinition['attrs']) => (...content: Array<Inline>) => HeadingDefinition;
@@ -0,0 +1,2 @@
1
+ import { InlineCardDefinition, CardAttributes } from '@atlaskit/adf-schema';
2
+ export declare const inlineCard: (attrs: CardAttributes) => InlineCardDefinition;
@@ -0,0 +1,2 @@
1
+ import { InlineExtensionDefinition } from '@atlaskit/adf-schema';
2
+ export declare const inlineExtension: (attrs: InlineExtensionDefinition['attrs']) => () => InlineExtensionDefinition;
@@ -0,0 +1,4 @@
1
+ import { BlockContent, LayoutColumnDefinition } from '@atlaskit/adf-schema';
2
+ export declare const layoutColumn: (attrs: {
3
+ width: number;
4
+ }) => (content: BlockContent[]) => LayoutColumnDefinition;
@@ -0,0 +1,2 @@
1
+ import { LayoutColumnDefinition, LayoutSectionDefinition } from '@atlaskit/adf-schema';
2
+ export declare const layoutSection: () => (content: Array<LayoutColumnDefinition>) => LayoutSectionDefinition;
@@ -0,0 +1,2 @@
1
+ import { ListItemDefinition, ListItemArray } from '@atlaskit/adf-schema';
2
+ export declare const listItem: (content: ListItemArray) => ListItemDefinition;
@@ -0,0 +1,2 @@
1
+ import { MediaGroupDefinition, MediaDefinition } from '@atlaskit/adf-schema';
2
+ export declare const mediaGroup: (...content: Array<MediaDefinition>) => MediaGroupDefinition;
@@ -0,0 +1,2 @@
1
+ import { MediaInlineDefinition, MediaInlineAttributes } from '@atlaskit/adf-schema';
2
+ export declare const mediaInline: (attrs: MediaInlineAttributes) => MediaInlineDefinition;
@@ -0,0 +1,7 @@
1
+ import { MediaSingleDefinition, MediaDefinition, RichMediaAttributes as MediaSingleAttributes, CaptionDefinition } from '@atlaskit/adf-schema';
2
+ export declare const mediaSingle: (attrs: MediaSingleAttributes | undefined) => (content: MediaDefinition | [
3
+ MediaDefinition
4
+ ] | [
5
+ MediaDefinition,
6
+ CaptionDefinition
7
+ ]) => MediaSingleDefinition;
@@ -0,0 +1,2 @@
1
+ import { MediaDefinition, MediaAttributes } from '@atlaskit/adf-schema';
2
+ export declare const media: (attrs: MediaAttributes) => MediaDefinition;
@@ -0,0 +1,2 @@
1
+ import { MentionDefinition, MentionAttributes } from '@atlaskit/adf-schema';
2
+ export declare const mention: (attrs: MentionAttributes) => MentionDefinition;
@@ -0,0 +1,2 @@
1
+ import { NestedExpandDefinition, NestedExpandContent } from '@atlaskit/adf-schema';
2
+ export declare const nestedExpand: (attrs: NestedExpandDefinition['attrs']) => (...content: NestedExpandContent) => NestedExpandDefinition;
@@ -0,0 +1,2 @@
1
+ import { ListItemDefinition, OrderedListDefinition } from '@atlaskit/adf-schema';
2
+ export declare const orderedList: (attrs?: OrderedListDefinition['attrs']) => (...content: Array<ListItemDefinition>) => OrderedListDefinition;
@@ -0,0 +1,2 @@
1
+ import { PanelDefinition, PanelAttributes } from '@atlaskit/adf-schema';
2
+ export declare const panel: (attrs: PanelAttributes) => (...content: PanelDefinition['content']) => PanelDefinition;
@@ -0,0 +1,2 @@
1
+ import { ParagraphDefinition, Inline } from '@atlaskit/adf-schema';
2
+ export declare const paragraph: (...content: Array<Inline | string>) => ParagraphDefinition;
@@ -0,0 +1,2 @@
1
+ import { PlaceholderDefinition } from '@atlaskit/adf-schema';
2
+ export declare const placeholder: (attrs: PlaceholderDefinition['attrs']) => PlaceholderDefinition;
@@ -0,0 +1,2 @@
1
+ import { RuleDefinition } from '@atlaskit/adf-schema';
2
+ export declare const rule: () => RuleDefinition;
@@ -0,0 +1,2 @@
1
+ import { StatusDefinition } from '@atlaskit/adf-schema';
2
+ export declare const status: (attrs?: StatusDefinition['attrs']) => StatusDefinition;
@@ -0,0 +1,2 @@
1
+ import { TableCellDefinition, CellAttributes } from '@atlaskit/adf-schema';
2
+ export declare const tableCell: (attrs?: CellAttributes | undefined) => (...content: TableCellDefinition['content']) => TableCellDefinition;
@@ -0,0 +1,2 @@
1
+ import { TableHeaderDefinition, CellAttributes } from '@atlaskit/adf-schema';
2
+ export declare const tableHeader: (attrs?: CellAttributes | undefined) => (...content: TableHeaderDefinition['content']) => TableHeaderDefinition;
@@ -0,0 +1,2 @@
1
+ import { TableRowDefinition, TableHeaderDefinition, TableCellDefinition } from '@atlaskit/adf-schema';
2
+ export declare const tableRow: (content: Array<TableHeaderDefinition> | Array<TableCellDefinition>) => TableRowDefinition;
@@ -0,0 +1,2 @@
1
+ import { TableDefinition, TableRowDefinition } from '@atlaskit/adf-schema';
2
+ export declare const table: (...content: Array<TableRowDefinition>) => TableDefinition;
@@ -0,0 +1,2 @@
1
+ import { Inline, TaskItemDefinition } from '@atlaskit/adf-schema';
2
+ export declare const taskItem: (attrs: TaskItemDefinition['attrs']) => (...content: Array<Inline>) => TaskItemDefinition;
@@ -0,0 +1,2 @@
1
+ import { TaskListDefinition, TaskListContent } from '@atlaskit/adf-schema';
2
+ export declare const taskList: (attrs: TaskListDefinition['attrs']) => (...content: TaskListContent) => TaskListDefinition;
@@ -0,0 +1,2 @@
1
+ import { TextDefinition } from '@atlaskit/adf-schema';
2
+ export declare const text: (text: string) => TextDefinition;
@@ -0,0 +1,8 @@
1
+ export declare type WithMark = {
2
+ type: any;
3
+ marks?: Array<any>;
4
+ [prop: string]: any;
5
+ };
6
+ export declare type WithAppliedMark<T, M> = T & {
7
+ marks?: Array<M>;
8
+ };
@@ -0,0 +1,4 @@
1
+ import { WithMark } from '../types';
2
+ export declare function applyMark<T>(mark: T & {
3
+ type: string;
4
+ }, maybeNode: WithMark | string): WithMark;
@@ -0,0 +1,3 @@
1
+ import { TextDefinition } from '@atlaskit/adf-schema';
2
+ export declare function createTextNodes<T = any>(nodes: Array<T | string>): Array<T | TextDefinition>;
3
+ export declare function createTextFromString<T = any>(str: T | string): T | TextDefinition;
@@ -0,0 +1,6 @@
1
+ export declare function isDuplicateMark(node: {
2
+ marks?: Array<any>;
3
+ }, type: string): boolean;
4
+ export declare function duplicateMarkError(node: {
5
+ marks?: Array<any>;
6
+ }, type: string): string;
@@ -0,0 +1,63 @@
1
+ export { breakout } from './builders/marks/breakout';
2
+ export { code } from './builders/marks/code';
3
+ export { em } from './builders/marks/em';
4
+ export { link } from './builders/marks/link';
5
+ export { link as a } from './builders/marks/link';
6
+ export { strike } from './builders/marks/strike';
7
+ export { strong } from './builders/marks/strong';
8
+ export { strong as b } from './builders/marks/strong';
9
+ export { subsup } from './builders/marks/subsup';
10
+ export { textColor } from './builders/marks/text-color';
11
+ export { underline } from './builders/marks/underline';
12
+ export { underline as u } from './builders/marks/underline';
13
+ export { alignment } from './builders/marks/alignment';
14
+ export { indentation } from './builders/marks/indentation';
15
+ export { dataConsumer } from './builders/marks/data-consumer';
16
+ export { fragment } from './builders/marks/fragment';
17
+ export { blockQuote } from './builders/nodes/blockquote';
18
+ export { bodiedExtension } from './builders/nodes/bodied-extension';
19
+ export { blockCard } from './builders/nodes/block-card';
20
+ export { bulletList } from './builders/nodes/bullet-list';
21
+ export { bulletList as ul } from './builders/nodes/bullet-list';
22
+ export { codeBlock } from './builders/nodes/code-block';
23
+ export { date } from './builders/nodes/date';
24
+ export { decisionItem } from './builders/nodes/decision-item';
25
+ export { decisionList } from './builders/nodes/decision-list';
26
+ export { doc } from './builders/nodes/doc';
27
+ export { emoji } from './builders/nodes/emoji';
28
+ export { extension } from './builders/nodes/extension';
29
+ export { expand } from './builders/nodes/expand';
30
+ export { nestedExpand } from './builders/nodes/nested-expand';
31
+ export { hardBreak } from './builders/nodes/hard-break';
32
+ export { hardBreak as br } from './builders/nodes/hard-break';
33
+ export { heading } from './builders/nodes/heading';
34
+ export { inlineExtension } from './builders/nodes/inline-extension';
35
+ export { inlineCard } from './builders/nodes/inline-card';
36
+ export { layoutColumn } from './builders/nodes/layout-column';
37
+ export { layoutSection } from './builders/nodes/layout-section';
38
+ export { listItem } from './builders/nodes/list-item';
39
+ export { listItem as li } from './builders/nodes/list-item';
40
+ export { mediaGroup } from './builders/nodes/media-group';
41
+ export { mediaSingle } from './builders/nodes/media-single';
42
+ export { media } from './builders/nodes/media';
43
+ export { mention } from './builders/nodes/mention';
44
+ export { orderedList } from './builders/nodes/ordered-list';
45
+ export { orderedList as ol } from './builders/nodes/ordered-list';
46
+ export { panel } from './builders/nodes/panel';
47
+ export { paragraph } from './builders/nodes/paragraph';
48
+ export { paragraph as p } from './builders/nodes/paragraph';
49
+ export { placeholder } from './builders/nodes/placeholder';
50
+ export { rule } from './builders/nodes/rule';
51
+ export { rule as hr } from './builders/nodes/rule';
52
+ export { status } from './builders/nodes/status';
53
+ export { tableCell } from './builders/nodes/table-cell';
54
+ export { tableCell as td } from './builders/nodes/table-cell';
55
+ export { tableHeader } from './builders/nodes/table-header';
56
+ export { tableHeader as th } from './builders/nodes/table-header';
57
+ export { tableRow } from './builders/nodes/table-row';
58
+ export { tableRow as tr } from './builders/nodes/table-row';
59
+ export { table } from './builders/nodes/table';
60
+ export { taskItem } from './builders/nodes/task-item';
61
+ export { taskList } from './builders/nodes/task-list';
62
+ export { text } from './builders/nodes/text';
63
+ export { embedCard } from './builders/nodes/embed-card';
@@ -0,0 +1,2 @@
1
+ import { DocNode } from './validator/entry';
2
+ export declare const getEmptyADF: () => DocNode;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,10 @@
1
+ import { ADFEntity, EntityParent } from '../types';
2
+ import { ValueReplacements } from './default-value-replacements';
3
+ export declare type NodeReplacer = (node: ADFEntity, context: {
4
+ parent: EntityParent;
5
+ valueReplacements: ValueReplacements;
6
+ }) => ADFEntity | null | false;
7
+ export declare type NodeReplacements = {
8
+ [key: string]: NodeReplacer;
9
+ };
10
+ export declare const defaultNodeReplacements: NodeReplacements;
@@ -0,0 +1,6 @@
1
+ export declare type Value = string | number | boolean | undefined | null;
2
+ export declare type ValueReplacer<V extends Value> = (value: V) => V;
3
+ export declare type ValueReplacements = {
4
+ href: ValueReplacer<string>;
5
+ };
6
+ export declare const defaultValueReplacements: ValueReplacements;
@@ -0,0 +1 @@
1
+ export declare const hash: (input: string) => string;
@@ -0,0 +1,9 @@
1
+ import { ADFEntity } from '../types';
2
+ import { NodeReplacements } from './default-node-replacements';
3
+ import { ValueReplacements } from './default-value-replacements';
4
+ export interface ScrubAdfOptions {
5
+ nodeReplacements?: NodeReplacements;
6
+ valueReplacements?: ValueReplacements;
7
+ }
8
+ declare const _default: (adf: ADFEntity, options?: ScrubAdfOptions) => false | ADFEntity;
9
+ export default _default;
@@ -0,0 +1,11 @@
1
+ import { ValueReplacements } from './default-value-replacements';
2
+ export declare const scrubStr: (val: string, offset?: number) => string;
3
+ export declare type ScrubLinkOptions = {
4
+ valueReplacements: ValueReplacements;
5
+ };
6
+ export declare const scrubLink: (marks: {
7
+ [key: string]: any;
8
+ }[], { valueReplacements }: ScrubLinkOptions) => {
9
+ [key: string]: any;
10
+ }[];
11
+ export declare const scrubAttrs: (nodeType: string, attrs: unknown, offset?: number) => any;
@@ -0,0 +1 @@
1
+ export { default as scrubAdf } from './scrub/scrub-adf';
@@ -0,0 +1,8 @@
1
+ import { ADFEntity, ADFEntityMark } from '../types';
2
+ interface TransformDedupeMarksResult {
3
+ transformedAdf: ADFEntity;
4
+ isTransformed: boolean;
5
+ discardedMarks: ADFEntityMark[];
6
+ }
7
+ export declare const transformDedupeMarks: (adf: ADFEntity) => TransformDedupeMarksResult;
8
+ export {};
@@ -0,0 +1,7 @@
1
+ import { ADFEntity } from '../types';
2
+ interface TransformIndentationMarksResult {
3
+ transformedAdf: ADFEntity;
4
+ isTransformed: boolean;
5
+ }
6
+ export declare const transformIndentationMarks: (adf: ADFEntity) => TransformIndentationMarksResult;
7
+ export {};
@@ -0,0 +1,5 @@
1
+ import { ADFEntity } from '../types';
2
+ export declare const transformMediaLinkMarks: (adf: ADFEntity) => {
3
+ transformedAdf: false | ADFEntity;
4
+ isTransformed: boolean;
5
+ };
@@ -0,0 +1,7 @@
1
+ import { ADFEntity } from '../types';
2
+ interface TransformNodesMissingContentResult {
3
+ transformedAdf: ADFEntity;
4
+ isTransformed: boolean;
5
+ }
6
+ export declare const transformNodesMissingContent: (adf: ADFEntity) => TransformNodesMissingContentResult;
7
+ export {};
@@ -0,0 +1,5 @@
1
+ import { ADFEntity } from '../types';
2
+ export declare const transformTextLinkCodeMarks: (adf: ADFEntity) => {
3
+ transformedAdf: false | ADFEntity;
4
+ isTransformed: boolean;
5
+ };
@@ -0,0 +1,5 @@
1
+ export { transformMediaLinkMarks } from './transforms/media-link-transform';
2
+ export { transformTextLinkCodeMarks } from './transforms/text-link-code-transform';
3
+ export { transformDedupeMarks } from './transforms/dedupe-marks-transform';
4
+ export { transformNodesMissingContent } from './transforms/nodes-missing-content-transform';
5
+ export { transformIndentationMarks } from './transforms/indentation-marks-transform';
@@ -0,0 +1,2 @@
1
+ import { ADFEntity } from '../types';
2
+ export declare function filter(adf: ADFEntity, callback: (node: ADFEntity) => boolean): Array<ADFEntity>;
@@ -0,0 +1,2 @@
1
+ import { ADFEntity } from '../types';
2
+ export declare function map<T = any>(adf: ADFEntity, callback: (node: ADFEntity) => T): Array<T>;
@@ -0,0 +1,2 @@
1
+ import { ADFEntity } from '../types';
2
+ export declare function reduce<T = any>(adf: ADFEntity, callback: (accunulator: T, node: ADFEntity) => T, initial: T): T;
@@ -0,0 +1,12 @@
1
+ import { ADFEntity, VisitorCollection } from '../types';
2
+ export declare function validateVisitors(_visitors: VisitorCollection): boolean;
3
+ /**
4
+ * Provides recursive, depth-first search document traversal. Use visitors collection to define nodes of interest.
5
+ * If no visitor for given node is defined, no-op happens.
6
+ * If visitor returns new node, the old node is replaced.
7
+ * If visitor returns false, node is dropped from the document.
8
+ * If visitor returns null/undefined/void, original node is used.
9
+ * @param adf Document to traverse.
10
+ * @param visitors Collection of visitors.
11
+ */
12
+ export declare function traverse(adf: ADFEntity, visitors: VisitorCollection): false | ADFEntity;
@@ -0,0 +1,4 @@
1
+ export { traverse } from './traverse/traverse';
2
+ export { map } from './traverse/map';
3
+ export { reduce } from './traverse/reduce';
4
+ export { filter } from './traverse/filter';
@@ -0,0 +1,24 @@
1
+ export interface ADFEntityMark {
2
+ type: string;
3
+ attrs?: {
4
+ [name: string]: any;
5
+ };
6
+ }
7
+ export interface ADFEntity {
8
+ type: string;
9
+ attrs?: {
10
+ [name: string]: any;
11
+ };
12
+ content?: Array<ADFEntity | undefined>;
13
+ marks?: Array<ADFEntityMark>;
14
+ text?: string;
15
+ [key: string]: any;
16
+ }
17
+ export declare type Visitor = (node: ADFEntity, parent: EntityParent, index: number, depth: number) => ADFEntity | false | undefined | void;
18
+ export declare type VisitorCollection = {
19
+ [nodeType: string]: Visitor;
20
+ };
21
+ export declare type EntityParent = {
22
+ node?: ADFEntity;
23
+ parent?: EntityParent;
24
+ };