@atlaskit/adf-utils 19.2.0 → 19.2.2

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 (179) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/afm-cc/tsconfig.json +0 -3
  3. package/dist/cjs/builders/nodes/emoji.js +8 -1
  4. package/dist/cjs/validator/specs/date.js +5 -0
  5. package/dist/cjs/validator/specs/emoji.js +5 -0
  6. package/dist/cjs/validator/specs/mention.js +5 -0
  7. package/dist/cjs/validator/specs/paragraph.js +7 -7
  8. package/dist/cjs/validator/specs/status.js +5 -0
  9. package/dist/cjs/validator/validator.js +5 -12
  10. package/dist/es2019/builders/nodes/emoji.js +13 -4
  11. package/dist/es2019/validator/specs/date.js +5 -0
  12. package/dist/es2019/validator/specs/emoji.js +5 -0
  13. package/dist/es2019/validator/specs/mention.js +5 -0
  14. package/dist/es2019/validator/specs/paragraph.js +7 -7
  15. package/dist/es2019/validator/specs/status.js +5 -0
  16. package/dist/es2019/validator/validator.js +5 -14
  17. package/dist/esm/builders/nodes/emoji.js +8 -1
  18. package/dist/esm/validator/specs/date.js +5 -0
  19. package/dist/esm/validator/specs/emoji.js +5 -0
  20. package/dist/esm/validator/specs/mention.js +5 -0
  21. package/dist/esm/validator/specs/paragraph.js +7 -7
  22. package/dist/esm/validator/specs/status.js +5 -0
  23. package/dist/esm/validator/validator.js +5 -12
  24. package/dist/types/builders/marks/alignment.d.ts +2 -2
  25. package/dist/types/builders/marks/annotation.d.ts +2 -2
  26. package/dist/types/builders/marks/border.d.ts +2 -2
  27. package/dist/types/builders/marks/breakout.d.ts +2 -2
  28. package/dist/types/builders/marks/code.d.ts +1 -1
  29. package/dist/types/builders/marks/data-consumer.d.ts +2 -2
  30. package/dist/types/builders/marks/em.d.ts +1 -1
  31. package/dist/types/builders/marks/fragment.d.ts +2 -2
  32. package/dist/types/builders/marks/indentation.d.ts +2 -2
  33. package/dist/types/builders/marks/link.d.ts +2 -2
  34. package/dist/types/builders/marks/strike.d.ts +1 -1
  35. package/dist/types/builders/marks/strong.d.ts +1 -1
  36. package/dist/types/builders/marks/subsup.d.ts +2 -2
  37. package/dist/types/builders/marks/text-color.d.ts +2 -2
  38. package/dist/types/builders/marks/underline.d.ts +1 -1
  39. package/dist/types/builders/nodes/block-card.d.ts +1 -1
  40. package/dist/types/builders/nodes/blockquote.d.ts +1 -1
  41. package/dist/types/builders/nodes/bodied-extension.d.ts +1 -1
  42. package/dist/types/builders/nodes/bullet-list.d.ts +1 -1
  43. package/dist/types/builders/nodes/caption.d.ts +1 -1
  44. package/dist/types/builders/nodes/code-block.d.ts +1 -1
  45. package/dist/types/builders/nodes/date.d.ts +1 -1
  46. package/dist/types/builders/nodes/decision-item.d.ts +1 -1
  47. package/dist/types/builders/nodes/decision-list.d.ts +1 -1
  48. package/dist/types/builders/nodes/embed-card.d.ts +1 -1
  49. package/dist/types/builders/nodes/emoji.d.ts +4 -2
  50. package/dist/types/builders/nodes/expand.d.ts +1 -1
  51. package/dist/types/builders/nodes/extension.d.ts +1 -1
  52. package/dist/types/builders/nodes/hard-break.d.ts +1 -1
  53. package/dist/types/builders/nodes/heading.d.ts +1 -1
  54. package/dist/types/builders/nodes/inline-card.d.ts +1 -1
  55. package/dist/types/builders/nodes/inline-extension.d.ts +1 -1
  56. package/dist/types/builders/nodes/layout-column.d.ts +1 -1
  57. package/dist/types/builders/nodes/layout-section.d.ts +1 -1
  58. package/dist/types/builders/nodes/list-item.d.ts +1 -1
  59. package/dist/types/builders/nodes/media-group.d.ts +1 -1
  60. package/dist/types/builders/nodes/media-inline.d.ts +1 -1
  61. package/dist/types/builders/nodes/media-single.d.ts +1 -1
  62. package/dist/types/builders/nodes/media.d.ts +1 -1
  63. package/dist/types/builders/nodes/mention.d.ts +1 -1
  64. package/dist/types/builders/nodes/nested-expand.d.ts +1 -1
  65. package/dist/types/builders/nodes/ordered-list.d.ts +1 -1
  66. package/dist/types/builders/nodes/panel.d.ts +1 -1
  67. package/dist/types/builders/nodes/paragraph.d.ts +1 -1
  68. package/dist/types/builders/nodes/placeholder.d.ts +1 -1
  69. package/dist/types/builders/nodes/rule.d.ts +1 -1
  70. package/dist/types/builders/nodes/status.d.ts +1 -1
  71. package/dist/types/builders/nodes/table-cell.d.ts +1 -1
  72. package/dist/types/builders/nodes/table-header.d.ts +1 -1
  73. package/dist/types/builders/nodes/table-row.d.ts +1 -1
  74. package/dist/types/builders/nodes/table.d.ts +1 -1
  75. package/dist/types/builders/nodes/task-item.d.ts +1 -1
  76. package/dist/types/builders/nodes/task-list.d.ts +1 -1
  77. package/dist/types/builders/nodes/text.d.ts +1 -1
  78. package/dist/types/builders/utils/apply-mark.d.ts +1 -1
  79. package/dist/types/builders/utils/create-text-nodes.d.ts +1 -1
  80. package/dist/types/empty-adf.d.ts +1 -1
  81. package/dist/types/scrub/default-node-replacements.d.ts +2 -2
  82. package/dist/types/scrub/scrub-adf.d.ts +3 -3
  83. package/dist/types/scrub/scrub-content.d.ts +1 -1
  84. package/dist/types/transforms/helpers.d.ts +1 -1
  85. package/dist/types/transforms/indentation-marks-transform.d.ts +1 -1
  86. package/dist/types/transforms/invalid-media-content-transform.d.ts +1 -1
  87. package/dist/types/transforms/media-link-transform.d.ts +1 -1
  88. package/dist/types/transforms/nodes-missing-content-transform.d.ts +1 -1
  89. package/dist/types/transforms/text-link-code-transform.d.ts +1 -1
  90. package/dist/types/traverse/filter.d.ts +1 -1
  91. package/dist/types/traverse/map.d.ts +1 -1
  92. package/dist/types/traverse/reduce.d.ts +1 -1
  93. package/dist/types/traverse/traverse.d.ts +1 -1
  94. package/dist/types/validator/specs/date.d.ts +5 -0
  95. package/dist/types/validator/specs/emoji.d.ts +5 -0
  96. package/dist/types/validator/specs/mention.d.ts +5 -0
  97. package/dist/types/validator/specs/paragraph.d.ts +6 -6
  98. package/dist/types/validator/specs/status.d.ts +5 -0
  99. package/dist/types-ts4.5/builders/marks/alignment.d.ts +2 -2
  100. package/dist/types-ts4.5/builders/marks/annotation.d.ts +2 -2
  101. package/dist/types-ts4.5/builders/marks/border.d.ts +2 -2
  102. package/dist/types-ts4.5/builders/marks/breakout.d.ts +2 -2
  103. package/dist/types-ts4.5/builders/marks/code.d.ts +1 -1
  104. package/dist/types-ts4.5/builders/marks/data-consumer.d.ts +2 -2
  105. package/dist/types-ts4.5/builders/marks/em.d.ts +1 -1
  106. package/dist/types-ts4.5/builders/marks/fragment.d.ts +2 -2
  107. package/dist/types-ts4.5/builders/marks/indentation.d.ts +2 -2
  108. package/dist/types-ts4.5/builders/marks/link.d.ts +2 -2
  109. package/dist/types-ts4.5/builders/marks/strike.d.ts +1 -1
  110. package/dist/types-ts4.5/builders/marks/strong.d.ts +1 -1
  111. package/dist/types-ts4.5/builders/marks/subsup.d.ts +2 -2
  112. package/dist/types-ts4.5/builders/marks/text-color.d.ts +2 -2
  113. package/dist/types-ts4.5/builders/marks/underline.d.ts +1 -1
  114. package/dist/types-ts4.5/builders/nodes/block-card.d.ts +1 -1
  115. package/dist/types-ts4.5/builders/nodes/blockquote.d.ts +1 -1
  116. package/dist/types-ts4.5/builders/nodes/bodied-extension.d.ts +1 -1
  117. package/dist/types-ts4.5/builders/nodes/bullet-list.d.ts +1 -1
  118. package/dist/types-ts4.5/builders/nodes/caption.d.ts +1 -1
  119. package/dist/types-ts4.5/builders/nodes/code-block.d.ts +1 -1
  120. package/dist/types-ts4.5/builders/nodes/date.d.ts +1 -1
  121. package/dist/types-ts4.5/builders/nodes/decision-item.d.ts +1 -1
  122. package/dist/types-ts4.5/builders/nodes/decision-list.d.ts +1 -1
  123. package/dist/types-ts4.5/builders/nodes/embed-card.d.ts +1 -1
  124. package/dist/types-ts4.5/builders/nodes/emoji.d.ts +4 -2
  125. package/dist/types-ts4.5/builders/nodes/expand.d.ts +1 -1
  126. package/dist/types-ts4.5/builders/nodes/extension.d.ts +1 -1
  127. package/dist/types-ts4.5/builders/nodes/hard-break.d.ts +1 -1
  128. package/dist/types-ts4.5/builders/nodes/heading.d.ts +1 -1
  129. package/dist/types-ts4.5/builders/nodes/inline-card.d.ts +1 -1
  130. package/dist/types-ts4.5/builders/nodes/inline-extension.d.ts +1 -1
  131. package/dist/types-ts4.5/builders/nodes/layout-column.d.ts +1 -1
  132. package/dist/types-ts4.5/builders/nodes/layout-section.d.ts +1 -1
  133. package/dist/types-ts4.5/builders/nodes/list-item.d.ts +1 -1
  134. package/dist/types-ts4.5/builders/nodes/media-group.d.ts +1 -1
  135. package/dist/types-ts4.5/builders/nodes/media-inline.d.ts +1 -1
  136. package/dist/types-ts4.5/builders/nodes/media-single.d.ts +1 -1
  137. package/dist/types-ts4.5/builders/nodes/media.d.ts +1 -1
  138. package/dist/types-ts4.5/builders/nodes/mention.d.ts +1 -1
  139. package/dist/types-ts4.5/builders/nodes/nested-expand.d.ts +1 -1
  140. package/dist/types-ts4.5/builders/nodes/ordered-list.d.ts +1 -1
  141. package/dist/types-ts4.5/builders/nodes/panel.d.ts +1 -1
  142. package/dist/types-ts4.5/builders/nodes/paragraph.d.ts +1 -1
  143. package/dist/types-ts4.5/builders/nodes/placeholder.d.ts +1 -1
  144. package/dist/types-ts4.5/builders/nodes/rule.d.ts +1 -1
  145. package/dist/types-ts4.5/builders/nodes/status.d.ts +1 -1
  146. package/dist/types-ts4.5/builders/nodes/table-cell.d.ts +1 -1
  147. package/dist/types-ts4.5/builders/nodes/table-header.d.ts +1 -1
  148. package/dist/types-ts4.5/builders/nodes/table-row.d.ts +1 -1
  149. package/dist/types-ts4.5/builders/nodes/table.d.ts +1 -1
  150. package/dist/types-ts4.5/builders/nodes/task-item.d.ts +1 -1
  151. package/dist/types-ts4.5/builders/nodes/task-list.d.ts +1 -1
  152. package/dist/types-ts4.5/builders/nodes/text.d.ts +1 -1
  153. package/dist/types-ts4.5/builders/utils/apply-mark.d.ts +1 -1
  154. package/dist/types-ts4.5/builders/utils/create-text-nodes.d.ts +1 -1
  155. package/dist/types-ts4.5/empty-adf.d.ts +1 -1
  156. package/dist/types-ts4.5/scrub/default-node-replacements.d.ts +2 -2
  157. package/dist/types-ts4.5/scrub/scrub-adf.d.ts +3 -3
  158. package/dist/types-ts4.5/scrub/scrub-content.d.ts +1 -1
  159. package/dist/types-ts4.5/transforms/helpers.d.ts +1 -1
  160. package/dist/types-ts4.5/transforms/indentation-marks-transform.d.ts +1 -1
  161. package/dist/types-ts4.5/transforms/invalid-media-content-transform.d.ts +1 -1
  162. package/dist/types-ts4.5/transforms/media-link-transform.d.ts +1 -1
  163. package/dist/types-ts4.5/transforms/nodes-missing-content-transform.d.ts +1 -1
  164. package/dist/types-ts4.5/transforms/text-link-code-transform.d.ts +1 -1
  165. package/dist/types-ts4.5/traverse/filter.d.ts +1 -1
  166. package/dist/types-ts4.5/traverse/map.d.ts +1 -1
  167. package/dist/types-ts4.5/traverse/reduce.d.ts +1 -1
  168. package/dist/types-ts4.5/traverse/traverse.d.ts +1 -1
  169. package/dist/types-ts4.5/validator/specs/date.d.ts +5 -0
  170. package/dist/types-ts4.5/validator/specs/emoji.d.ts +5 -0
  171. package/dist/types-ts4.5/validator/specs/mention.d.ts +5 -0
  172. package/dist/types-ts4.5/validator/specs/paragraph.d.ts +6 -6
  173. package/dist/types-ts4.5/validator/specs/status.d.ts +5 -0
  174. package/package.json +3 -9
  175. package/dist/cjs/validator/custom-specs/inline-card-with-annotation.js +0 -35
  176. package/dist/es2019/validator/custom-specs/inline-card-with-annotation.js +0 -29
  177. package/dist/esm/validator/custom-specs/inline-card-with-annotation.js +0 -29
  178. package/dist/types/validator/custom-specs/inline-card-with-annotation.d.ts +0 -30
  179. package/dist/types-ts4.5/validator/custom-specs/inline-card-with-annotation.d.ts +0 -30
@@ -1,2 +1,2 @@
1
- import { MediaInlineDefinition, MediaInlineAttributes } from '@atlaskit/adf-schema';
1
+ import { type MediaInlineDefinition, type MediaInlineAttributes } from '@atlaskit/adf-schema';
2
2
  export declare const mediaInline: (attrs: MediaInlineAttributes) => MediaInlineDefinition;
@@ -1,4 +1,4 @@
1
- import { MediaSingleDefinition, MediaDefinition, ExtendedMediaAttributes as MediaSingleAttributes, CaptionDefinition } from '@atlaskit/adf-schema';
1
+ import { type MediaSingleDefinition, type MediaDefinition, type ExtendedMediaAttributes as MediaSingleAttributes, type CaptionDefinition } from '@atlaskit/adf-schema';
2
2
  export declare const mediaSingle: (attrs: MediaSingleAttributes | undefined) => (content: MediaDefinition | [
3
3
  MediaDefinition
4
4
  ] | [
@@ -1,2 +1,2 @@
1
- import { MediaDefinition, MediaAttributes } from '@atlaskit/adf-schema';
1
+ import { type MediaDefinition, type MediaAttributes } from '@atlaskit/adf-schema';
2
2
  export declare const media: (attrs: MediaAttributes) => MediaDefinition;
@@ -1,2 +1,2 @@
1
- import { MentionDefinition, MentionAttributes } from '@atlaskit/adf-schema';
1
+ import { type MentionDefinition, type MentionAttributes } from '@atlaskit/adf-schema';
2
2
  export declare const mention: (attrs: MentionAttributes) => MentionDefinition;
@@ -1,2 +1,2 @@
1
- import { NestedExpandDefinition, NestedExpandContent } from '@atlaskit/adf-schema';
1
+ import { type NestedExpandDefinition, type NestedExpandContent } from '@atlaskit/adf-schema';
2
2
  export declare const nestedExpand: (attrs: NestedExpandDefinition['attrs']) => (...content: NestedExpandContent) => NestedExpandDefinition;
@@ -1,2 +1,2 @@
1
- import { ListItemDefinition, OrderedListDefinition } from '@atlaskit/adf-schema';
1
+ import { type ListItemDefinition, type OrderedListDefinition } from '@atlaskit/adf-schema';
2
2
  export declare const orderedList: (attrs?: OrderedListDefinition['attrs']) => (...content: Array<ListItemDefinition>) => OrderedListDefinition;
@@ -1,2 +1,2 @@
1
- import { PanelDefinition, PanelAttributes } from '@atlaskit/adf-schema';
1
+ import { type PanelDefinition, type PanelAttributes } from '@atlaskit/adf-schema';
2
2
  export declare const panel: (attrs: PanelAttributes) => (...content: PanelDefinition['content']) => PanelDefinition;
@@ -1,2 +1,2 @@
1
- import { ParagraphDefinition, Inline } from '@atlaskit/adf-schema';
1
+ import { type ParagraphDefinition, type Inline } from '@atlaskit/adf-schema';
2
2
  export declare const paragraph: (...content: Array<Inline | string>) => ParagraphDefinition;
@@ -1,2 +1,2 @@
1
- import { PlaceholderDefinition } from '@atlaskit/adf-schema';
1
+ import { type PlaceholderDefinition } from '@atlaskit/adf-schema';
2
2
  export declare const placeholder: (attrs: PlaceholderDefinition['attrs']) => PlaceholderDefinition;
@@ -1,2 +1,2 @@
1
- import { RuleDefinition } from '@atlaskit/adf-schema';
1
+ import { type RuleDefinition } from '@atlaskit/adf-schema';
2
2
  export declare const rule: () => RuleDefinition;
@@ -1,2 +1,2 @@
1
- import { StatusDefinition } from '@atlaskit/adf-schema';
1
+ import { type StatusDefinition } from '@atlaskit/adf-schema';
2
2
  export declare const status: (attrs?: StatusDefinition['attrs']) => StatusDefinition;
@@ -1,2 +1,2 @@
1
- import { TableCellDefinition, CellAttributes } from '@atlaskit/adf-schema';
1
+ import { type TableCellDefinition, type CellAttributes } from '@atlaskit/adf-schema';
2
2
  export declare const tableCell: (attrs?: CellAttributes) => (...content: TableCellDefinition['content']) => TableCellDefinition;
@@ -1,2 +1,2 @@
1
- import { TableHeaderDefinition, CellAttributes } from '@atlaskit/adf-schema';
1
+ import { type TableHeaderDefinition, type CellAttributes } from '@atlaskit/adf-schema';
2
2
  export declare const tableHeader: (attrs?: CellAttributes) => (...content: TableHeaderDefinition['content']) => TableHeaderDefinition;
@@ -1,2 +1,2 @@
1
- import { TableRowDefinition, TableHeaderDefinition, TableCellDefinition } from '@atlaskit/adf-schema';
1
+ import { type TableRowDefinition, type TableHeaderDefinition, type TableCellDefinition } from '@atlaskit/adf-schema';
2
2
  export declare const tableRow: (content: Array<TableHeaderDefinition> | Array<TableCellDefinition>) => TableRowDefinition;
@@ -1,2 +1,2 @@
1
- import { TableDefinition, TableRowDefinition } from '@atlaskit/adf-schema';
1
+ import { type TableDefinition, type TableRowDefinition } from '@atlaskit/adf-schema';
2
2
  export declare const table: (...content: Array<TableRowDefinition>) => TableDefinition;
@@ -1,2 +1,2 @@
1
- import { Inline, TaskItemDefinition } from '@atlaskit/adf-schema';
1
+ import { type Inline, type TaskItemDefinition } from '@atlaskit/adf-schema';
2
2
  export declare const taskItem: (attrs: TaskItemDefinition['attrs']) => (...content: Array<Inline>) => TaskItemDefinition;
@@ -1,2 +1,2 @@
1
- import { TaskListDefinition, TaskListContent } from '@atlaskit/adf-schema';
1
+ import { type TaskListDefinition, type TaskListContent } from '@atlaskit/adf-schema';
2
2
  export declare const taskList: (attrs: TaskListDefinition['attrs']) => (...content: TaskListContent) => TaskListDefinition;
@@ -1,2 +1,2 @@
1
- import { TextDefinition } from '@atlaskit/adf-schema';
1
+ import { type TextDefinition } from '@atlaskit/adf-schema';
2
2
  export declare const text: (text: string) => TextDefinition;
@@ -1,4 +1,4 @@
1
- import { WithMark } from '../types';
1
+ import { type WithMark } from '../types';
2
2
  export declare function applyMark<T>(mark: T & {
3
3
  type: string;
4
4
  }, maybeNode: WithMark | string): WithMark | import("@atlaskit/adf-schema").TextDefinition;
@@ -1,3 +1,3 @@
1
- import { TextDefinition } from '@atlaskit/adf-schema';
1
+ import { type TextDefinition } from '@atlaskit/adf-schema';
2
2
  export declare function createTextNodes<T = any>(nodes: Array<T | string>): Array<T | TextDefinition>;
3
3
  export declare function createTextFromString<T = any>(str: T | string): T | TextDefinition;
@@ -1,2 +1,2 @@
1
- import { DocNode } from './validator/entry';
1
+ import { type DocNode } from './validator/entry';
2
2
  export declare const getEmptyADF: () => DocNode;
@@ -1,5 +1,5 @@
1
- import { ADFEntity, EntityParent } from '../types';
2
- import { ValueReplacements } from './default-value-replacements';
1
+ import { type ADFEntity, type EntityParent } from '../types';
2
+ import { type ValueReplacements } from './default-value-replacements';
3
3
  export type NodeReplacer = (node: ADFEntity, context: {
4
4
  parent: EntityParent;
5
5
  valueReplacements: ValueReplacements;
@@ -1,6 +1,6 @@
1
- import { ADFEntity } from '../types';
2
- import { NodeReplacements } from './default-node-replacements';
3
- import { ValueReplacements } from './default-value-replacements';
1
+ import { type ADFEntity } from '../types';
2
+ import { type NodeReplacements } from './default-node-replacements';
3
+ import { type ValueReplacements } from './default-value-replacements';
4
4
  export interface ScrubAdfOptions {
5
5
  nodeReplacements?: NodeReplacements;
6
6
  valueReplacements?: ValueReplacements;
@@ -1,4 +1,4 @@
1
- import { ValueReplacements } from './default-value-replacements';
1
+ import { type ValueReplacements } from './default-value-replacements';
2
2
  export declare const scrubStr: (val: string, offset?: number) => string;
3
3
  export type ScrubLinkOptions = {
4
4
  valueReplacements: ValueReplacements;
@@ -1,2 +1,2 @@
1
- import { ADFEntity } from '../types';
1
+ import { type ADFEntity } from '../types';
2
2
  export declare const isEmpty: (node: ADFEntity) => boolean;
@@ -1,4 +1,4 @@
1
- import { ADFEntity } from '../types';
1
+ import { type ADFEntity } from '../types';
2
2
  interface TransformIndentationMarksResult {
3
3
  transformedAdf: ADFEntity;
4
4
  isTransformed: boolean;
@@ -1,4 +1,4 @@
1
- import { ADFEntity } from '../types';
1
+ import { type ADFEntity } from '../types';
2
2
  export declare const transformInvalidMediaContent: (adf: ADFEntity) => {
3
3
  transformedAdf: ADFEntity;
4
4
  isTransformed: boolean;
@@ -1,4 +1,4 @@
1
- import { ADFEntity } from '../types';
1
+ import { type ADFEntity } from '../types';
2
2
  export declare const transformMediaLinkMarks: (adf: ADFEntity) => {
3
3
  transformedAdf: false | ADFEntity;
4
4
  isTransformed: boolean;
@@ -1,4 +1,4 @@
1
- import { ADFEntity } from '../types';
1
+ import { type ADFEntity } from '../types';
2
2
  interface TransformNodesMissingContentResult {
3
3
  transformedAdf: ADFEntity;
4
4
  isTransformed: boolean;
@@ -1,4 +1,4 @@
1
- import { ADFEntity } from '../types';
1
+ import { type ADFEntity } from '../types';
2
2
  export declare const transformTextLinkCodeMarks: (adf: ADFEntity) => {
3
3
  transformedAdf: false | ADFEntity;
4
4
  isTransformed: boolean;
@@ -1,2 +1,2 @@
1
- import { ADFEntity } from '../types';
1
+ import { type ADFEntity } from '../types';
2
2
  export declare function filter(adf: ADFEntity, callback: (node: ADFEntity) => boolean): Array<ADFEntity>;
@@ -1,2 +1,2 @@
1
- import { ADFEntity } from '../types';
1
+ import { type ADFEntity } from '../types';
2
2
  export declare function map<T = any>(adf: ADFEntity, callback: (node: ADFEntity) => T): Array<T>;
@@ -1,2 +1,2 @@
1
- import { ADFEntity } from '../types';
1
+ import { type ADFEntity } from '../types';
2
2
  export declare function reduce<T = any>(adf: ADFEntity, callback: (accunulator: T, node: ADFEntity) => T, initial: T): T;
@@ -1,4 +1,4 @@
1
- import { ADFEntity, VisitorCollection } from '../types';
1
+ import { type ADFEntity, type VisitorCollection } from '../types';
2
2
  export declare function validateVisitors(_visitors: VisitorCollection): boolean;
3
3
  /**
4
4
  * Provides recursive, depth-first search document traversal. Use visitors collection to define nodes of interest.
@@ -12,6 +12,11 @@ declare const _default: {
12
12
  };
13
13
  };
14
14
  };
15
+ marks: {
16
+ type: string;
17
+ items: string[];
18
+ optional: boolean;
19
+ };
15
20
  };
16
21
  };
17
22
  export default _default;
@@ -19,6 +19,11 @@ declare const _default: {
19
19
  };
20
20
  };
21
21
  };
22
+ marks: {
23
+ type: string;
24
+ items: string[];
25
+ optional: boolean;
26
+ };
22
27
  };
23
28
  };
24
29
  export default _default;
@@ -28,6 +28,11 @@ declare const _default: {
28
28
  };
29
29
  };
30
30
  };
31
+ marks: {
32
+ type: string;
33
+ items: string[];
34
+ optional: boolean;
35
+ };
31
36
  };
32
37
  };
33
38
  export default _default;
@@ -10,19 +10,19 @@ declare const _default: {
10
10
  allowUnsupportedInline: boolean;
11
11
  optional: boolean;
12
12
  };
13
- marks: {
14
- type: string;
15
- items: never[];
16
- optional: boolean;
17
- };
18
13
  attrs: {
19
- optional: boolean;
20
14
  props: {
21
15
  localId: {
22
16
  type: string;
23
17
  optional: boolean;
24
18
  };
25
19
  };
20
+ optional: boolean;
21
+ };
22
+ marks: {
23
+ type: string;
24
+ items: never[];
25
+ optional: boolean;
26
26
  };
27
27
  };
28
28
  };
@@ -24,6 +24,11 @@ declare const _default: {
24
24
  };
25
25
  };
26
26
  };
27
+ marks: {
28
+ type: string;
29
+ items: string[];
30
+ optional: boolean;
31
+ };
27
32
  };
28
33
  };
29
34
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/adf-utils",
3
- "version": "19.2.0",
3
+ "version": "19.2.2",
4
4
  "description": "Set of utilities to traverse, modify and create ADF documents.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -41,15 +41,13 @@
41
41
  "generate:spec": "rm -rf ./src/validator/specs/ && yarn json-schema-generator --outDir=./src/validator/specs/ --mode=Spec --stage=0 ./src/validator/entry.ts"
42
42
  },
43
43
  "dependencies": {
44
- "@atlaskit/adf-schema": "^36.3.0",
44
+ "@atlaskit/adf-schema": "^36.10.7",
45
45
  "@atlaskit/codemod-utils": "^4.2.0",
46
- "@atlaskit/platform-feature-flags": "^0.2.0",
47
46
  "@babel/runtime": "^7.0.0"
48
47
  },
49
48
  "devDependencies": {
50
49
  "@atlassian/adf-schema-json": "^1.14.0",
51
50
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
52
- "@atlassian/feature-flags-test-utils": "*",
53
51
  "jscodeshift": "^0.13.0",
54
52
  "react": "^16.8.0",
55
53
  "typescript": "~5.4.2",
@@ -69,9 +67,5 @@
69
67
  }
70
68
  },
71
69
  "prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1",
72
- "platform-feature-flags": {
73
- "platform.editor.allow-inline-comments-for-inline-nodes": {
74
- "type": "boolean"
75
- }
76
- }
70
+ "platform-feature-flags": {}
77
71
  }
@@ -1,35 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.inlineCardWithAnnotation = void 0;
7
- // This is a custom spec we're using for inline card till the inline comments feature is fully rolled out.
8
- var inlineCardWithAnnotation = exports.inlineCardWithAnnotation = {
9
- props: {
10
- type: {
11
- type: 'enum',
12
- values: ['inlineCard']
13
- },
14
- attrs: [{
15
- props: {
16
- url: {
17
- type: 'string',
18
- validatorFn: 'safeUrl'
19
- }
20
- }
21
- }, {
22
- props: {
23
- data: {
24
- type: 'object'
25
- }
26
- }
27
- }],
28
- marks: {
29
- type: 'array',
30
- items: ['annotation'],
31
- optional: true
32
- }
33
- },
34
- required: ['attrs']
35
- };
@@ -1,29 +0,0 @@
1
- // This is a custom spec we're using for inline card till the inline comments feature is fully rolled out.
2
- export const inlineCardWithAnnotation = {
3
- props: {
4
- type: {
5
- type: 'enum',
6
- values: ['inlineCard']
7
- },
8
- attrs: [{
9
- props: {
10
- url: {
11
- type: 'string',
12
- validatorFn: 'safeUrl'
13
- }
14
- }
15
- }, {
16
- props: {
17
- data: {
18
- type: 'object'
19
- }
20
- }
21
- }],
22
- marks: {
23
- type: 'array',
24
- items: ['annotation'],
25
- optional: true
26
- }
27
- },
28
- required: ['attrs']
29
- };
@@ -1,29 +0,0 @@
1
- // This is a custom spec we're using for inline card till the inline comments feature is fully rolled out.
2
- export var inlineCardWithAnnotation = {
3
- props: {
4
- type: {
5
- type: 'enum',
6
- values: ['inlineCard']
7
- },
8
- attrs: [{
9
- props: {
10
- url: {
11
- type: 'string',
12
- validatorFn: 'safeUrl'
13
- }
14
- }
15
- }, {
16
- props: {
17
- data: {
18
- type: 'object'
19
- }
20
- }
21
- }],
22
- marks: {
23
- type: 'array',
24
- items: ['annotation'],
25
- optional: true
26
- }
27
- },
28
- required: ['attrs']
29
- };
@@ -1,30 +0,0 @@
1
- export declare const inlineCardWithAnnotation: {
2
- props: {
3
- type: {
4
- type: string;
5
- values: string[];
6
- };
7
- attrs: ({
8
- props: {
9
- url: {
10
- type: string;
11
- validatorFn: string;
12
- };
13
- data?: undefined;
14
- };
15
- } | {
16
- props: {
17
- data: {
18
- type: string;
19
- };
20
- url?: undefined;
21
- };
22
- })[];
23
- marks: {
24
- type: string;
25
- items: string[];
26
- optional: boolean;
27
- };
28
- };
29
- required: string[];
30
- };
@@ -1,30 +0,0 @@
1
- export declare const inlineCardWithAnnotation: {
2
- props: {
3
- type: {
4
- type: string;
5
- values: string[];
6
- };
7
- attrs: ({
8
- props: {
9
- url: {
10
- type: string;
11
- validatorFn: string;
12
- };
13
- data?: undefined;
14
- };
15
- } | {
16
- props: {
17
- data: {
18
- type: string;
19
- };
20
- url?: undefined;
21
- };
22
- })[];
23
- marks: {
24
- type: string;
25
- items: string[];
26
- optional: boolean;
27
- };
28
- };
29
- required: string[];
30
- };