@atlaskit/adf-utils 19.2.1 → 19.3.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.
- package/CHANGELOG.md +968 -957
- package/afm-jira/tsconfig.json +24 -0
- package/codemods/17.0.0-update-imports-to-new-entry-points.ts +128 -136
- package/codemods/__tests__/next-update-imports-to-new-entry-points.ts +35 -35
- package/codemods/helpers/entry-points.ts +20 -28
- package/codemods/types/entry-points.ts +4 -4
- package/dist/cjs/validator/validator.js +3 -4
- package/dist/es2019/validator/validator.js +3 -4
- package/dist/esm/validator/validator.js +3 -4
- package/dist/types/builders/marks/alignment.d.ts +2 -2
- package/dist/types/builders/marks/annotation.d.ts +2 -2
- package/dist/types/builders/marks/border.d.ts +2 -2
- package/dist/types/builders/marks/breakout.d.ts +2 -2
- package/dist/types/builders/marks/code.d.ts +1 -1
- package/dist/types/builders/marks/data-consumer.d.ts +2 -2
- package/dist/types/builders/marks/em.d.ts +1 -1
- package/dist/types/builders/marks/fragment.d.ts +2 -2
- package/dist/types/builders/marks/indentation.d.ts +2 -2
- package/dist/types/builders/marks/link.d.ts +2 -2
- package/dist/types/builders/marks/strike.d.ts +1 -1
- package/dist/types/builders/marks/strong.d.ts +1 -1
- package/dist/types/builders/marks/subsup.d.ts +2 -2
- package/dist/types/builders/marks/text-color.d.ts +2 -2
- package/dist/types/builders/marks/underline.d.ts +1 -1
- package/dist/types/builders/nodes/block-card.d.ts +1 -1
- package/dist/types/builders/nodes/blockquote.d.ts +1 -1
- package/dist/types/builders/nodes/bodied-extension.d.ts +1 -1
- package/dist/types/builders/nodes/bullet-list.d.ts +1 -1
- package/dist/types/builders/nodes/caption.d.ts +1 -1
- package/dist/types/builders/nodes/code-block.d.ts +1 -1
- package/dist/types/builders/nodes/date.d.ts +1 -1
- package/dist/types/builders/nodes/decision-item.d.ts +1 -1
- package/dist/types/builders/nodes/decision-list.d.ts +1 -1
- package/dist/types/builders/nodes/embed-card.d.ts +1 -1
- package/dist/types/builders/nodes/expand.d.ts +1 -1
- package/dist/types/builders/nodes/extension.d.ts +1 -1
- package/dist/types/builders/nodes/hard-break.d.ts +1 -1
- package/dist/types/builders/nodes/heading.d.ts +1 -1
- package/dist/types/builders/nodes/inline-card.d.ts +1 -1
- package/dist/types/builders/nodes/inline-extension.d.ts +1 -1
- package/dist/types/builders/nodes/layout-column.d.ts +1 -1
- package/dist/types/builders/nodes/layout-section.d.ts +1 -1
- package/dist/types/builders/nodes/list-item.d.ts +1 -1
- package/dist/types/builders/nodes/media-group.d.ts +1 -1
- package/dist/types/builders/nodes/media-inline.d.ts +1 -1
- package/dist/types/builders/nodes/media-single.d.ts +1 -1
- package/dist/types/builders/nodes/media.d.ts +1 -1
- package/dist/types/builders/nodes/mention.d.ts +1 -1
- package/dist/types/builders/nodes/nested-expand.d.ts +1 -1
- package/dist/types/builders/nodes/ordered-list.d.ts +1 -1
- package/dist/types/builders/nodes/panel.d.ts +1 -1
- package/dist/types/builders/nodes/paragraph.d.ts +1 -1
- package/dist/types/builders/nodes/placeholder.d.ts +1 -1
- package/dist/types/builders/nodes/rule.d.ts +1 -1
- package/dist/types/builders/nodes/status.d.ts +1 -1
- package/dist/types/builders/nodes/table-cell.d.ts +1 -1
- package/dist/types/builders/nodes/table-header.d.ts +1 -1
- package/dist/types/builders/nodes/table-row.d.ts +1 -1
- package/dist/types/builders/nodes/table.d.ts +1 -1
- package/dist/types/builders/nodes/task-item.d.ts +1 -1
- package/dist/types/builders/nodes/task-list.d.ts +1 -1
- package/dist/types/builders/nodes/text.d.ts +1 -1
- package/dist/types/builders/utils/apply-mark.d.ts +1 -1
- package/dist/types/builders/utils/create-text-nodes.d.ts +1 -1
- package/dist/types/empty-adf.d.ts +1 -1
- package/dist/types/scrub/default-node-replacements.d.ts +2 -2
- package/dist/types/scrub/scrub-adf.d.ts +3 -3
- package/dist/types/scrub/scrub-content.d.ts +1 -1
- package/dist/types/transforms/helpers.d.ts +1 -1
- package/dist/types/transforms/indentation-marks-transform.d.ts +1 -1
- package/dist/types/transforms/invalid-media-content-transform.d.ts +1 -1
- package/dist/types/transforms/media-link-transform.d.ts +1 -1
- package/dist/types/transforms/nodes-missing-content-transform.d.ts +1 -1
- package/dist/types/transforms/text-link-code-transform.d.ts +1 -1
- package/dist/types/traverse/filter.d.ts +1 -1
- package/dist/types/traverse/map.d.ts +1 -1
- package/dist/types/traverse/reduce.d.ts +1 -1
- package/dist/types/traverse/traverse.d.ts +1 -1
- package/dist/types-ts4.5/builders/marks/alignment.d.ts +2 -2
- package/dist/types-ts4.5/builders/marks/annotation.d.ts +2 -2
- package/dist/types-ts4.5/builders/marks/border.d.ts +2 -2
- package/dist/types-ts4.5/builders/marks/breakout.d.ts +2 -2
- package/dist/types-ts4.5/builders/marks/code.d.ts +1 -1
- package/dist/types-ts4.5/builders/marks/data-consumer.d.ts +2 -2
- package/dist/types-ts4.5/builders/marks/em.d.ts +1 -1
- package/dist/types-ts4.5/builders/marks/fragment.d.ts +2 -2
- package/dist/types-ts4.5/builders/marks/indentation.d.ts +2 -2
- package/dist/types-ts4.5/builders/marks/link.d.ts +2 -2
- package/dist/types-ts4.5/builders/marks/strike.d.ts +1 -1
- package/dist/types-ts4.5/builders/marks/strong.d.ts +1 -1
- package/dist/types-ts4.5/builders/marks/subsup.d.ts +2 -2
- package/dist/types-ts4.5/builders/marks/text-color.d.ts +2 -2
- package/dist/types-ts4.5/builders/marks/underline.d.ts +1 -1
- package/dist/types-ts4.5/builders/nodes/block-card.d.ts +1 -1
- package/dist/types-ts4.5/builders/nodes/blockquote.d.ts +1 -1
- package/dist/types-ts4.5/builders/nodes/bodied-extension.d.ts +1 -1
- package/dist/types-ts4.5/builders/nodes/bullet-list.d.ts +1 -1
- package/dist/types-ts4.5/builders/nodes/caption.d.ts +1 -1
- package/dist/types-ts4.5/builders/nodes/code-block.d.ts +1 -1
- package/dist/types-ts4.5/builders/nodes/date.d.ts +1 -1
- package/dist/types-ts4.5/builders/nodes/decision-item.d.ts +1 -1
- package/dist/types-ts4.5/builders/nodes/decision-list.d.ts +1 -1
- package/dist/types-ts4.5/builders/nodes/embed-card.d.ts +1 -1
- package/dist/types-ts4.5/builders/nodes/expand.d.ts +1 -1
- package/dist/types-ts4.5/builders/nodes/extension.d.ts +1 -1
- package/dist/types-ts4.5/builders/nodes/hard-break.d.ts +1 -1
- package/dist/types-ts4.5/builders/nodes/heading.d.ts +1 -1
- package/dist/types-ts4.5/builders/nodes/inline-card.d.ts +1 -1
- package/dist/types-ts4.5/builders/nodes/inline-extension.d.ts +1 -1
- package/dist/types-ts4.5/builders/nodes/layout-column.d.ts +1 -1
- package/dist/types-ts4.5/builders/nodes/layout-section.d.ts +1 -1
- package/dist/types-ts4.5/builders/nodes/list-item.d.ts +1 -1
- package/dist/types-ts4.5/builders/nodes/media-group.d.ts +1 -1
- package/dist/types-ts4.5/builders/nodes/media-inline.d.ts +1 -1
- package/dist/types-ts4.5/builders/nodes/media-single.d.ts +1 -1
- package/dist/types-ts4.5/builders/nodes/media.d.ts +1 -1
- package/dist/types-ts4.5/builders/nodes/mention.d.ts +1 -1
- package/dist/types-ts4.5/builders/nodes/nested-expand.d.ts +1 -1
- package/dist/types-ts4.5/builders/nodes/ordered-list.d.ts +1 -1
- package/dist/types-ts4.5/builders/nodes/panel.d.ts +1 -1
- package/dist/types-ts4.5/builders/nodes/paragraph.d.ts +1 -1
- package/dist/types-ts4.5/builders/nodes/placeholder.d.ts +1 -1
- package/dist/types-ts4.5/builders/nodes/rule.d.ts +1 -1
- package/dist/types-ts4.5/builders/nodes/status.d.ts +1 -1
- package/dist/types-ts4.5/builders/nodes/table-cell.d.ts +1 -1
- package/dist/types-ts4.5/builders/nodes/table-header.d.ts +1 -1
- package/dist/types-ts4.5/builders/nodes/table-row.d.ts +1 -1
- package/dist/types-ts4.5/builders/nodes/table.d.ts +1 -1
- package/dist/types-ts4.5/builders/nodes/task-item.d.ts +1 -1
- package/dist/types-ts4.5/builders/nodes/task-list.d.ts +1 -1
- package/dist/types-ts4.5/builders/nodes/text.d.ts +1 -1
- package/dist/types-ts4.5/builders/utils/apply-mark.d.ts +1 -1
- package/dist/types-ts4.5/builders/utils/create-text-nodes.d.ts +1 -1
- package/dist/types-ts4.5/empty-adf.d.ts +1 -1
- package/dist/types-ts4.5/scrub/default-node-replacements.d.ts +2 -2
- package/dist/types-ts4.5/scrub/scrub-adf.d.ts +3 -3
- package/dist/types-ts4.5/scrub/scrub-content.d.ts +1 -1
- package/dist/types-ts4.5/transforms/helpers.d.ts +1 -1
- package/dist/types-ts4.5/transforms/indentation-marks-transform.d.ts +1 -1
- package/dist/types-ts4.5/transforms/invalid-media-content-transform.d.ts +1 -1
- package/dist/types-ts4.5/transforms/media-link-transform.d.ts +1 -1
- package/dist/types-ts4.5/transforms/nodes-missing-content-transform.d.ts +1 -1
- package/dist/types-ts4.5/transforms/text-link-code-transform.d.ts +1 -1
- package/dist/types-ts4.5/traverse/filter.d.ts +1 -1
- package/dist/types-ts4.5/traverse/map.d.ts +1 -1
- package/dist/types-ts4.5/traverse/reduce.d.ts +1 -1
- package/dist/types-ts4.5/traverse/traverse.d.ts +1 -1
- package/docs/0-intro.tsx +406 -406
- package/package.json +68 -70
- package/report.api.md +2 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BlockContent, LayoutColumnDefinition } from '@atlaskit/adf-schema';
|
|
1
|
+
import { type BlockContent, type LayoutColumnDefinition } from '@atlaskit/adf-schema';
|
|
2
2
|
export declare const layoutColumn: (attrs: {
|
|
3
3
|
width: number;
|
|
4
4
|
}) => (content: BlockContent[]) => LayoutColumnDefinition;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { LayoutColumnDefinition, LayoutSectionDefinition } from '@atlaskit/adf-schema';
|
|
1
|
+
import { type LayoutColumnDefinition, type LayoutSectionDefinition } from '@atlaskit/adf-schema';
|
|
2
2
|
export declare const layoutSection: () => (content: Array<LayoutColumnDefinition>) => LayoutSectionDefinition;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ListItemDefinition, ListItemArray } from '@atlaskit/adf-schema';
|
|
1
|
+
import { type ListItemDefinition, type ListItemArray } from '@atlaskit/adf-schema';
|
|
2
2
|
export declare const listItem: (content: ListItemArray) => ListItemDefinition;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { MediaGroupDefinition, MediaDefinition } from '@atlaskit/adf-schema';
|
|
1
|
+
import { type MediaGroupDefinition, type MediaDefinition } from '@atlaskit/adf-schema';
|
|
2
2
|
export declare const mediaGroup: (...content: Array<MediaDefinition>) => MediaGroupDefinition;
|
|
@@ -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,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,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.
|