@atlaskit/adf-schema 24.0.1 → 24.0.3
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 +14 -0
- package/dist/cjs/schema/marks/text-color.js +16 -2
- package/dist/cjs/schema/nodes/block-card.js +3 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/schema/marks/text-color.js +15 -2
- package/dist/es2019/schema/nodes/block-card.js +3 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/schema/marks/text-color.js +15 -2
- package/dist/esm/schema/nodes/block-card.js +3 -1
- package/dist/esm/version.json +1 -1
- package/package.json +8 -11
- package/report.api.md +1035 -1044
- package/dist/types-ts4.0/index.d.ts +0 -4
- package/dist/types-ts4.0/json-schema/index.d.ts +0 -2
- package/dist/types-ts4.0/schema/bitbucket-schema.d.ts +0 -2
- package/dist/types-ts4.0/schema/confluence-schema.d.ts +0 -3
- package/dist/types-ts4.0/schema/create-schema.d.ts +0 -32
- package/dist/types-ts4.0/schema/default-schema.d.ts +0 -7
- package/dist/types-ts4.0/schema/groups.d.ts +0 -6
- package/dist/types-ts4.0/schema/index.d.ts +0 -7
- package/dist/types-ts4.0/schema/inline-nodes.d.ts +0 -1
- package/dist/types-ts4.0/schema/jira-schema.d.ts +0 -26
- package/dist/types-ts4.0/schema/marks/alignment.d.ts +0 -16
- package/dist/types-ts4.0/schema/marks/annotation.d.ts +0 -32
- package/dist/types-ts4.0/schema/marks/breakout.d.ts +0 -12
- package/dist/types-ts4.0/schema/marks/code.d.ts +0 -8
- package/dist/types-ts4.0/schema/marks/confluence-inline-comment.d.ts +0 -12
- package/dist/types-ts4.0/schema/marks/data-consumer.d.ts +0 -48
- package/dist/types-ts4.0/schema/marks/em.d.ts +0 -8
- package/dist/types-ts4.0/schema/marks/fragment.d.ts +0 -29
- package/dist/types-ts4.0/schema/marks/indentation.d.ts +0 -16
- package/dist/types-ts4.0/schema/marks/index.d.ts +0 -32
- package/dist/types-ts4.0/schema/marks/link.d.ts +0 -35
- package/dist/types-ts4.0/schema/marks/strike.d.ts +0 -8
- package/dist/types-ts4.0/schema/marks/strong.d.ts +0 -8
- package/dist/types-ts4.0/schema/marks/subsup.d.ts +0 -15
- package/dist/types-ts4.0/schema/marks/text-color.d.ts +0 -21
- package/dist/types-ts4.0/schema/marks/type-ahead-query.d.ts +0 -2
- package/dist/types-ts4.0/schema/marks/underline.d.ts +0 -8
- package/dist/types-ts4.0/schema/marks/unsupported-mark.d.ts +0 -2
- package/dist/types-ts4.0/schema/marks/unsupported-node-attributes.d.ts +0 -2
- package/dist/types-ts4.0/schema/nodes/block-card.d.ts +0 -22
- package/dist/types-ts4.0/schema/nodes/blockquote.d.ts +0 -14
- package/dist/types-ts4.0/schema/nodes/bodied-extension.d.ts +0 -24
- package/dist/types-ts4.0/schema/nodes/bullet-list.d.ts +0 -14
- package/dist/types-ts4.0/schema/nodes/caption.d.ts +0 -20
- package/dist/types-ts4.0/schema/nodes/code-block.d.ts +0 -31
- package/dist/types-ts4.0/schema/nodes/confluence-jira-issue.d.ts +0 -2
- package/dist/types-ts4.0/schema/nodes/confluence-unsupported-block.d.ts +0 -2
- package/dist/types-ts4.0/schema/nodes/confluence-unsupported-inline.d.ts +0 -2
- package/dist/types-ts4.0/schema/nodes/date.d.ts +0 -14
- package/dist/types-ts4.0/schema/nodes/decision-item.d.ts +0 -17
- package/dist/types-ts4.0/schema/nodes/decision-list.d.ts +0 -18
- package/dist/types-ts4.0/schema/nodes/doc.d.ts +0 -18
- package/dist/types-ts4.0/schema/nodes/embed-card.d.ts +0 -18
- package/dist/types-ts4.0/schema/nodes/emoji.d.ts +0 -14
- package/dist/types-ts4.0/schema/nodes/expand.d.ts +0 -33
- package/dist/types-ts4.0/schema/nodes/extension.d.ts +0 -18
- package/dist/types-ts4.0/schema/nodes/hard-break.d.ts +0 -11
- package/dist/types-ts4.0/schema/nodes/heading.d.ts +0 -36
- package/dist/types-ts4.0/schema/nodes/image.d.ts +0 -2
- package/dist/types-ts4.0/schema/nodes/index.d.ts +0 -93
- package/dist/types-ts4.0/schema/nodes/inline-card.d.ts +0 -10
- package/dist/types-ts4.0/schema/nodes/inline-extension.d.ts +0 -18
- package/dist/types-ts4.0/schema/nodes/layout-column.d.ts +0 -21
- package/dist/types-ts4.0/schema/nodes/layout-section.d.ts +0 -44
- package/dist/types-ts4.0/schema/nodes/list-item.d.ts +0 -20
- package/dist/types-ts4.0/schema/nodes/media-group.d.ts +0 -14
- package/dist/types-ts4.0/schema/nodes/media-inline.d.ts +0 -16
- package/dist/types-ts4.0/schema/nodes/media-single.d.ts +0 -61
- package/dist/types-ts4.0/schema/nodes/media.d.ts +0 -60
- package/dist/types-ts4.0/schema/nodes/mention.d.ts +0 -26
- package/dist/types-ts4.0/schema/nodes/nested-expand.d.ts +0 -27
- package/dist/types-ts4.0/schema/nodes/ordered-list.d.ts +0 -20
- package/dist/types-ts4.0/schema/nodes/panel.d.ts +0 -38
- package/dist/types-ts4.0/schema/nodes/paragraph.d.ts +0 -37
- package/dist/types-ts4.0/schema/nodes/placeholder.d.ts +0 -11
- package/dist/types-ts4.0/schema/nodes/rule.d.ts +0 -8
- package/dist/types-ts4.0/schema/nodes/status.d.ts +0 -20
- package/dist/types-ts4.0/schema/nodes/tableNodes.d.ts +0 -113
- package/dist/types-ts4.0/schema/nodes/task-item.d.ts +0 -17
- package/dist/types-ts4.0/schema/nodes/task-list.d.ts +0 -21
- package/dist/types-ts4.0/schema/nodes/text.d.ts +0 -15
- package/dist/types-ts4.0/schema/nodes/types/block-content.d.ts +0 -22
- package/dist/types-ts4.0/schema/nodes/types/extensions.d.ts +0 -34
- package/dist/types-ts4.0/schema/nodes/types/inline-content.d.ts +0 -32
- package/dist/types-ts4.0/schema/nodes/types/mark.d.ts +0 -15
- package/dist/types-ts4.0/schema/nodes/types/non-nestable-block-content.d.ts +0 -20
- package/dist/types-ts4.0/schema/nodes/types/rich-media-common.d.ts +0 -9
- package/dist/types-ts4.0/schema/nodes/unknown-block.d.ts +0 -3
- package/dist/types-ts4.0/schema/nodes/unsupported-block.d.ts +0 -2
- package/dist/types-ts4.0/schema/nodes/unsupported-inline.d.ts +0 -2
- package/dist/types-ts4.0/schema/unsupported.d.ts +0 -1
- package/dist/types-ts4.0/steps/analytics.d.ts +0 -59
- package/dist/types-ts4.0/steps/set-attrs.d.ts +0 -23
- package/dist/types-ts4.0/steps/table/add-column.d.ts +0 -88
- package/dist/types-ts4.0/steps/table/constants.d.ts +0 -4
- package/dist/types-ts4.0/steps/table/sort-column.d.ts +0 -18
- package/dist/types-ts4.0/steps/table/types.d.ts +0 -39
- package/dist/types-ts4.0/steps/table/utils/cell-step.d.ts +0 -51
- package/dist/types-ts4.0/steps/table/utils/cells-at-column.d.ts +0 -20
- package/dist/types-ts4.0/steps/table/utils/find-column.d.ts +0 -8
- package/dist/types-ts4.0/steps/table/utils/get-table-rect-from-doc.d.ts +0 -8
- package/dist/types-ts4.0/steps/table/utils/side-effects/rows.d.ts +0 -25
- package/dist/types-ts4.0/steps/table/utils/side-effects/side-effects.d.ts +0 -15
- package/dist/types-ts4.0/steps/table/utils/side-effects/table.d.ts +0 -16
- package/dist/types-ts4.0/steps/table/utils/side-effects/types.d.ts +0 -33
- package/dist/types-ts4.0/steps/table/utils/table-map.d.ts +0 -6
- package/dist/types-ts4.0/steps/type-ahead.d.ts +0 -35
- package/dist/types-ts4.0/steps.d.ts +0 -8
- package/dist/types-ts4.0/utils/colors.d.ts +0 -71
- package/dist/types-ts4.0/utils/confluence/emoji.d.ts +0 -50
- package/dist/types-ts4.0/utils/extensions.d.ts +0 -3
- package/dist/types-ts4.0/utils/index.d.ts +0 -6
- package/dist/types-ts4.0/utils/parseDOM.d.ts +0 -1
- package/dist/types-ts4.0/utils/url.d.ts +0 -23
- package/dist/types-ts4.0/utils/uuid.d.ts +0 -5
@@ -1,38 +0,0 @@
|
|
1
|
-
import { NodeSpec } from 'prosemirror-model';
|
2
|
-
import { ParagraphDefinition as Paragraph } from './paragraph';
|
3
|
-
import { OrderedListDefinition as OrderedList } from './ordered-list';
|
4
|
-
import { BulletListDefinition as BulletList } from './bullet-list';
|
5
|
-
import { HeadingDefinition as Heading } from './heading';
|
6
|
-
import { BlockCardDefinition as BlockCard } from './block-card';
|
7
|
-
export declare enum PanelType {
|
8
|
-
INFO = "info",
|
9
|
-
NOTE = "note",
|
10
|
-
TIP = "tip",
|
11
|
-
WARNING = "warning",
|
12
|
-
ERROR = "error",
|
13
|
-
SUCCESS = "success",
|
14
|
-
CUSTOM = "custom"
|
15
|
-
}
|
16
|
-
export interface PanelAttributes {
|
17
|
-
panelType: PanelType;
|
18
|
-
panelIcon?: string;
|
19
|
-
panelIconId?: string;
|
20
|
-
panelIconText?: string;
|
21
|
-
panelColor?: string;
|
22
|
-
}
|
23
|
-
/**
|
24
|
-
* @name panel_node
|
25
|
-
*/
|
26
|
-
export interface PanelDefinition {
|
27
|
-
type: 'panel';
|
28
|
-
attrs: PanelAttributes;
|
29
|
-
/**
|
30
|
-
* @minItems 1
|
31
|
-
* @allowUnsupportedBlock true
|
32
|
-
*/
|
33
|
-
content: Array<Paragraph | Heading | OrderedList | BulletList | BlockCard>;
|
34
|
-
}
|
35
|
-
export interface DOMAttributes {
|
36
|
-
[propName: string]: string;
|
37
|
-
}
|
38
|
-
export declare const panel: (allowCustomPanel: boolean) => NodeSpec;
|
@@ -1,37 +0,0 @@
|
|
1
|
-
import { NodeSpec } from 'prosemirror-model';
|
2
|
-
import { AlignmentMarkDefinition, IndentationMarkDefinition } from '../marks';
|
3
|
-
import { MarksObject, NoMark } from './types/mark';
|
4
|
-
import { Inline } from './types/inline-content';
|
5
|
-
/**
|
6
|
-
* @name paragraph_node
|
7
|
-
*/
|
8
|
-
export interface ParagraphBaseDefinition {
|
9
|
-
type: 'paragraph';
|
10
|
-
/**
|
11
|
-
* @allowUnsupportedInline true
|
12
|
-
*/
|
13
|
-
content?: Array<Inline>;
|
14
|
-
marks?: Array<any>;
|
15
|
-
}
|
16
|
-
/**
|
17
|
-
* @name paragraph_with_no_marks_node
|
18
|
-
*/
|
19
|
-
export declare type ParagraphDefinition = ParagraphBaseDefinition & NoMark;
|
20
|
-
/**
|
21
|
-
* NOTE: Need this because TS is too smart and inline everything.
|
22
|
-
* So we need to give them separate identity.
|
23
|
-
* Probably there's a way to solve it but that will need time and exploration.
|
24
|
-
* // http://bit.ly/2raXFX5
|
25
|
-
* type T1 = X | Y
|
26
|
-
* type T2 = A | T1 | B // T2 = A | X | Y | B
|
27
|
-
*/
|
28
|
-
/**
|
29
|
-
* @name paragraph_with_alignment_node
|
30
|
-
*/
|
31
|
-
export declare type ParagraphWithAlignmentDefinition = ParagraphBaseDefinition & MarksObject<AlignmentMarkDefinition>;
|
32
|
-
/**
|
33
|
-
* @name paragraph_with_indentation_node
|
34
|
-
*/
|
35
|
-
export declare type ParagraphWithIndentationDefinition = ParagraphBaseDefinition & MarksObject<IndentationMarkDefinition>;
|
36
|
-
export declare type ParagraphWithMarksDefinition = ParagraphWithAlignmentDefinition | ParagraphWithIndentationDefinition;
|
37
|
-
export declare const paragraph: NodeSpec;
|
@@ -1,20 +0,0 @@
|
|
1
|
-
import { NodeSpec } from 'prosemirror-model';
|
2
|
-
/**
|
3
|
-
* @name status_node
|
4
|
-
*/
|
5
|
-
export interface StatusDefinition {
|
6
|
-
type: 'status';
|
7
|
-
attrs: {
|
8
|
-
/**
|
9
|
-
* @minLength 1
|
10
|
-
*/
|
11
|
-
text: string;
|
12
|
-
color: 'neutral' | 'purple' | 'blue' | 'red' | 'yellow' | 'green';
|
13
|
-
localId?: string;
|
14
|
-
/**
|
15
|
-
* Supported values are bold and subtle
|
16
|
-
*/
|
17
|
-
style?: string;
|
18
|
-
};
|
19
|
-
}
|
20
|
-
export declare const status: NodeSpec;
|
@@ -1,113 +0,0 @@
|
|
1
|
-
import { Node as PmNode, NodeSpec } from 'prosemirror-model';
|
2
|
-
import { CellAttributes } from '@atlaskit/editor-tables/types';
|
3
|
-
import { PanelDefinition as Panel } from './panel';
|
4
|
-
import { ParagraphDefinition as Paragraph, ParagraphWithAlignmentDefinition as ParagraphWithMarks } from './paragraph';
|
5
|
-
import { BlockQuoteDefinition as Blockquote } from './blockquote';
|
6
|
-
import { OrderedListDefinition as OrderedList } from './ordered-list';
|
7
|
-
import { BulletListDefinition as BulletList } from './bullet-list';
|
8
|
-
import { RuleDefinition as Rule } from './rule';
|
9
|
-
import { HeadingDefinition as Heading, HeadingWithMarksDefinition as HeadingWithMarks } from './heading';
|
10
|
-
import { CodeBlockDefinition as CodeBlock } from './code-block';
|
11
|
-
import { MediaGroupDefinition as MediaGroup } from './media-group';
|
12
|
-
import { MediaSingleDefinition as MediaSingle } from './media-single';
|
13
|
-
import { DecisionListDefinition as DecisionList } from './decision-list';
|
14
|
-
import { TaskListDefinition as TaskList } from './task-list';
|
15
|
-
import { ExtensionDefinition as Extension } from './extension';
|
16
|
-
import { BlockCardDefinition as BlockCard } from './block-card';
|
17
|
-
import { EmbedCardDefinition as EmbedCard } from './embed-card';
|
18
|
-
import { NestedExpandDefinition as NestedExpand } from './nested-expand';
|
19
|
-
import { FragmentDefinition } from '../marks/fragment';
|
20
|
-
export type { CellAttributes };
|
21
|
-
export declare const tablePrefixSelector = "pm-table";
|
22
|
-
export declare const tableCellSelector: string;
|
23
|
-
export declare const tableHeaderSelector: string;
|
24
|
-
export declare const tableCellContentWrapperSelector: string;
|
25
|
-
export declare const tableCellContentDomSelector: string;
|
26
|
-
export declare const getCellAttrs: (dom: HTMLElement, defaultValues?: CellAttributes) => {
|
27
|
-
colspan: number;
|
28
|
-
rowspan: number;
|
29
|
-
colwidth: number[] | null;
|
30
|
-
background: string | null;
|
31
|
-
};
|
32
|
-
export declare type CellDomAttrs = {
|
33
|
-
colspan?: string;
|
34
|
-
rowspan?: string;
|
35
|
-
style?: string;
|
36
|
-
colorname?: string;
|
37
|
-
'data-colwidth'?: string;
|
38
|
-
class?: string;
|
39
|
-
};
|
40
|
-
/**
|
41
|
-
* gets cell dom attributes based on node attributes
|
42
|
-
* @returns CellDomAttrs
|
43
|
-
*/
|
44
|
-
export declare const getCellDomAttrs: (node: PmNode) => CellDomAttrs;
|
45
|
-
export declare const tableBackgroundColorPalette: Map<string, string>;
|
46
|
-
export declare const tableBackgroundBorderColor: string;
|
47
|
-
export declare const tableBackgroundColorNames: Map<string, string>;
|
48
|
-
export declare type Layout = 'default' | 'full-width' | 'wide';
|
49
|
-
export interface TableAttributes {
|
50
|
-
isNumberColumnEnabled?: boolean;
|
51
|
-
layout?: Layout;
|
52
|
-
__autoSize?: boolean;
|
53
|
-
/**
|
54
|
-
* @minLength 1
|
55
|
-
*/
|
56
|
-
localId?: string;
|
57
|
-
}
|
58
|
-
/**
|
59
|
-
* @name table_node
|
60
|
-
*/
|
61
|
-
export interface TableDefinition {
|
62
|
-
type: 'table';
|
63
|
-
attrs?: TableAttributes;
|
64
|
-
/**
|
65
|
-
* @minItems 1
|
66
|
-
*/
|
67
|
-
content: Array<TableRow>;
|
68
|
-
marks?: Array<FragmentDefinition>;
|
69
|
-
}
|
70
|
-
/**
|
71
|
-
* @name table_row_node
|
72
|
-
*/
|
73
|
-
export interface TableRow {
|
74
|
-
type: 'tableRow';
|
75
|
-
content: Array<TableHeader | TableCell>;
|
76
|
-
}
|
77
|
-
/**
|
78
|
-
* @name table_cell_content
|
79
|
-
* @minItems 1
|
80
|
-
* @allowUnsupportedBlock true
|
81
|
-
*/
|
82
|
-
export declare type TableCellContent = Array<Panel | Paragraph | ParagraphWithMarks | Blockquote | OrderedList | BulletList | Rule | Heading | HeadingWithMarks | CodeBlock | MediaGroup | MediaSingle | DecisionList | TaskList | Extension | BlockCard | NestedExpand | EmbedCard>;
|
83
|
-
/**
|
84
|
-
* @name table_cell_node
|
85
|
-
*/
|
86
|
-
export interface TableCell {
|
87
|
-
type: 'tableCell';
|
88
|
-
attrs?: CellAttributes;
|
89
|
-
content: TableCellContent;
|
90
|
-
}
|
91
|
-
/**
|
92
|
-
* @name table_header_node
|
93
|
-
*/
|
94
|
-
export interface TableHeader {
|
95
|
-
type: 'tableHeader';
|
96
|
-
attrs?: CellAttributes;
|
97
|
-
content: TableCellContent;
|
98
|
-
}
|
99
|
-
export declare const table: NodeSpec;
|
100
|
-
export declare const tableToJSON: (node: PmNode) => {
|
101
|
-
attrs: {
|
102
|
-
[key: string]: any;
|
103
|
-
};
|
104
|
-
};
|
105
|
-
export declare const tableRow: NodeSpec;
|
106
|
-
export declare const tableCell: NodeSpec;
|
107
|
-
export declare const toJSONTableCell: (node: PmNode) => {
|
108
|
-
attrs: Record<string, any>;
|
109
|
-
};
|
110
|
-
export declare const tableHeader: NodeSpec;
|
111
|
-
export declare const toJSONTableHeader: (node: PmNode) => {
|
112
|
-
attrs: Record<string, any>;
|
113
|
-
};
|
@@ -1,17 +0,0 @@
|
|
1
|
-
import { NodeSpec } from 'prosemirror-model';
|
2
|
-
import { Inline } from './types/inline-content';
|
3
|
-
/**
|
4
|
-
* @name taskItem_node
|
5
|
-
*/
|
6
|
-
export interface TaskItemDefinition {
|
7
|
-
type: 'taskItem';
|
8
|
-
/**
|
9
|
-
* @allowUnsupportedInline true
|
10
|
-
*/
|
11
|
-
content?: Array<Inline>;
|
12
|
-
attrs: {
|
13
|
-
localId: string;
|
14
|
-
state: 'TODO' | 'DONE';
|
15
|
-
};
|
16
|
-
}
|
17
|
-
export declare const taskItem: NodeSpec;
|
@@ -1,21 +0,0 @@
|
|
1
|
-
import { NodeSpec } from 'prosemirror-model';
|
2
|
-
import { TaskItemDefinition as TaskItemNode } from './task-item';
|
3
|
-
export interface TaskListContent extends Array<TaskItemNode | TaskListDefinition> {
|
4
|
-
0: TaskItemNode;
|
5
|
-
}
|
6
|
-
/**
|
7
|
-
* @name taskList_node
|
8
|
-
*/
|
9
|
-
export interface TaskListDefinition {
|
10
|
-
type: 'taskList';
|
11
|
-
/**
|
12
|
-
* @minItems 1
|
13
|
-
* @allowUnsupportedBlock true
|
14
|
-
*/
|
15
|
-
content: TaskListContent;
|
16
|
-
attrs: {
|
17
|
-
localId: string;
|
18
|
-
};
|
19
|
-
}
|
20
|
-
export declare const taskListSelector: string;
|
21
|
-
export declare const taskList: NodeSpec;
|
@@ -1,15 +0,0 @@
|
|
1
|
-
import { NodeSpec } from 'prosemirror-model';
|
2
|
-
/**
|
3
|
-
* @name text_node
|
4
|
-
*/
|
5
|
-
export interface TextDefinition {
|
6
|
-
type: 'text';
|
7
|
-
/**
|
8
|
-
* @minLength 1
|
9
|
-
*/
|
10
|
-
text: string;
|
11
|
-
marks?: Array<any>;
|
12
|
-
}
|
13
|
-
export declare const text: NodeSpec & {
|
14
|
-
toDebugString?: () => string;
|
15
|
-
};
|
@@ -1,22 +0,0 @@
|
|
1
|
-
import { ExpandDefinition as Expand } from '../expand';
|
2
|
-
import { BodiedExtensionDefinition as BodiedExtension } from '../bodied-extension';
|
3
|
-
import { PanelDefinition as Panel } from '../panel';
|
4
|
-
import { ParagraphDefinition as Paragraph, ParagraphWithMarksDefinition as ParagraphWithMarks } from '../paragraph';
|
5
|
-
import { BlockQuoteDefinition as Blockquote } from '../blockquote';
|
6
|
-
import { OrderedListDefinition as OrderedList } from '../ordered-list';
|
7
|
-
import { BulletListDefinition as BulletList } from '../bullet-list';
|
8
|
-
import { RuleDefinition as Rule } from '../rule';
|
9
|
-
import { HeadingDefinition as Heading, HeadingWithMarksDefinition as HeadingWithMarks } from '../heading';
|
10
|
-
import { CodeBlockDefinition as CodeBlock } from '../code-block';
|
11
|
-
import { MediaGroupDefinition as MediaGroup } from '../media-group';
|
12
|
-
import { MediaSingleDefinition as MediaSingle } from '../media-single';
|
13
|
-
import { DecisionListDefinition as DecisionList } from '../decision-list';
|
14
|
-
import { TaskListDefinition as TaskList } from '../task-list';
|
15
|
-
import { TableDefinition as Table } from '../tableNodes';
|
16
|
-
import { ExtensionDefinition as Extension } from '../extension';
|
17
|
-
import { BlockCardDefinition as BlockCard } from '../block-card';
|
18
|
-
import { EmbedCardDefinition as EmbedCard } from '../embed-card';
|
19
|
-
/**
|
20
|
-
* @name block_content
|
21
|
-
*/
|
22
|
-
export declare type BlockContent = Panel | Paragraph | ParagraphWithMarks | Blockquote | OrderedList | BulletList | Rule | Heading | HeadingWithMarks | CodeBlock | MediaGroup | MediaSingle | DecisionList | TaskList | Table | Expand | Extension | BodiedExtension | BlockCard | EmbedCard;
|
@@ -1,34 +0,0 @@
|
|
1
|
-
export declare type Layout = 'default' | 'wide' | 'full-width';
|
2
|
-
export interface ExtensionAttributes {
|
3
|
-
/**
|
4
|
-
* @minLength 1
|
5
|
-
*/
|
6
|
-
extensionKey: string;
|
7
|
-
/**
|
8
|
-
* @minLength 1
|
9
|
-
*/
|
10
|
-
extensionType: string;
|
11
|
-
parameters?: object;
|
12
|
-
text?: string;
|
13
|
-
layout?: Layout;
|
14
|
-
/**
|
15
|
-
* @minLength 1
|
16
|
-
*/
|
17
|
-
localId?: string;
|
18
|
-
}
|
19
|
-
export interface InlineExtensionAttributes {
|
20
|
-
/**
|
21
|
-
* @minLength 1
|
22
|
-
*/
|
23
|
-
extensionKey: string;
|
24
|
-
/**
|
25
|
-
* @minLength 1
|
26
|
-
*/
|
27
|
-
extensionType: string;
|
28
|
-
parameters?: object;
|
29
|
-
text?: string;
|
30
|
-
/**
|
31
|
-
* @minLength 1
|
32
|
-
*/
|
33
|
-
localId?: string;
|
34
|
-
}
|
@@ -1,32 +0,0 @@
|
|
1
|
-
import { HardBreakDefinition as HardBreak } from '../hard-break';
|
2
|
-
import { MentionDefinition as Mention } from '../mention';
|
3
|
-
import { EmojiDefinition as Emoji } from '../emoji';
|
4
|
-
import { InlineExtensionDefinition } from '../inline-extension';
|
5
|
-
import { DateDefinition as Date } from '../date';
|
6
|
-
import { PlaceholderDefinition as Placeholder } from '../placeholder';
|
7
|
-
import { InlineCardDefinition as InlineCard } from '../inline-card';
|
8
|
-
import { StatusDefinition as Status } from '../status';
|
9
|
-
import { TextDefinition as Text } from '../text';
|
10
|
-
import { MarksObject } from './mark';
|
11
|
-
import { AnnotationMarkDefinition as Annotation, CodeDefinition as Code, EmDefinition as Em, LinkDefinition as Link, StrikeDefinition as Strike, StrongDefinition as Strong, SubSupDefinition as SubSup, TextColorDefinition as TextColor, UnderlineDefinition as Underline } from '../../marks';
|
12
|
-
import { MediaInlineDefinition } from '../media-inline';
|
13
|
-
/**
|
14
|
-
* @name formatted_text_inline_node
|
15
|
-
*/
|
16
|
-
export declare type InlineFormattedText = Text & MarksObject<Link | Em | Strong | Strike | SubSup | Underline | TextColor | Annotation>;
|
17
|
-
/**
|
18
|
-
* @name link_text_inline_node
|
19
|
-
*/
|
20
|
-
export declare type InlineLinkText = Text & MarksObject<Link>;
|
21
|
-
/**
|
22
|
-
* @name code_inline_node
|
23
|
-
*/
|
24
|
-
export declare type InlineCode = Text & MarksObject<Code | Link | Annotation>;
|
25
|
-
/**
|
26
|
-
* @name atomic_inline_node
|
27
|
-
*/
|
28
|
-
export declare type InlineAtomic = HardBreak | Mention | Emoji | InlineExtensionDefinition | Date | Placeholder | InlineCard | Status | MediaInlineDefinition;
|
29
|
-
/**
|
30
|
-
* @name inline_node
|
31
|
-
*/
|
32
|
-
export declare type Inline = InlineFormattedText | InlineCode | InlineAtomic;
|
@@ -1,20 +0,0 @@
|
|
1
|
-
import { PanelDefinition as Panel } from '../panel';
|
2
|
-
import { ParagraphDefinition as Paragraph } from '../paragraph';
|
3
|
-
import { BlockQuoteDefinition as Blockquote } from '../blockquote';
|
4
|
-
import { OrderedListDefinition as OrderedList } from '../ordered-list';
|
5
|
-
import { BulletListDefinition as BulletList } from '../bullet-list';
|
6
|
-
import { RuleDefinition as Rule } from '../rule';
|
7
|
-
import { HeadingDefinition as Heading } from '../heading';
|
8
|
-
import { CodeBlockDefinition as CodeBlock } from '../code-block';
|
9
|
-
import { MediaGroupDefinition as MediaGroup } from '../media-group';
|
10
|
-
import { MediaSingleDefinition as MediaSingle } from '../media-single';
|
11
|
-
import { DecisionListDefinition as DecisionList } from '../decision-list';
|
12
|
-
import { TaskListDefinition as TaskList } from '../task-list';
|
13
|
-
import { TableDefinition as Table } from '../tableNodes';
|
14
|
-
import { ExtensionDefinition as Extension } from '../extension';
|
15
|
-
import { BlockCardDefinition as BlockCard } from '../block-card';
|
16
|
-
import { EmbedCardDefinition as EmbedCard } from '../embed-card';
|
17
|
-
/**
|
18
|
-
* @name non_nestable_block_content
|
19
|
-
*/
|
20
|
-
export declare type NonNestableBlockContent = Panel | Paragraph | Blockquote | OrderedList | BulletList | Rule | Heading | CodeBlock | MediaGroup | MediaSingle | DecisionList | TaskList | Table | Extension | BlockCard | EmbedCard;
|
@@ -1 +0,0 @@
|
|
1
|
-
export declare const unsupportedNodeTypesForMediaCards: Set<string>;
|
@@ -1,59 +0,0 @@
|
|
1
|
-
import { Node as PMNode } from 'prosemirror-model';
|
2
|
-
import { Step, StepResult, StepMap, ReplaceStep, Mappable } from 'prosemirror-transform';
|
3
|
-
export declare const analyticsStepType = "atlaskit-analytics";
|
4
|
-
export declare const analyticsInvertStepType = "atlaskit-analytics-invert";
|
5
|
-
export interface AnalyticsPayload {
|
6
|
-
action: string;
|
7
|
-
actionSubject: string;
|
8
|
-
actionSubjectId?: string | null;
|
9
|
-
attributes?: Record<string, any>;
|
10
|
-
eventType: string;
|
11
|
-
}
|
12
|
-
export interface AnalyticsWithChannel<P extends AnalyticsPayload> {
|
13
|
-
payload: P;
|
14
|
-
channel: string;
|
15
|
-
}
|
16
|
-
declare enum HISTORY_ACTIONS {
|
17
|
-
UNDID = "undid",
|
18
|
-
REDID = "redid"
|
19
|
-
}
|
20
|
-
interface UndoAnalyticsEventPayload {
|
21
|
-
action: HISTORY_ACTIONS.UNDID;
|
22
|
-
actionSubject: string;
|
23
|
-
actionSubjectId?: string;
|
24
|
-
attributes?: Record<string, any>;
|
25
|
-
eventType: string;
|
26
|
-
}
|
27
|
-
interface RedoAnalyticsEventPayload {
|
28
|
-
action: HISTORY_ACTIONS.REDID;
|
29
|
-
actionSubject: string;
|
30
|
-
actionSubjectId?: string;
|
31
|
-
attributes?: Record<string, any>;
|
32
|
-
eventType: string;
|
33
|
-
}
|
34
|
-
declare type AnalyticsInvertPayload = UndoAnalyticsEventPayload | RedoAnalyticsEventPayload;
|
35
|
-
export declare type AnalyticsInvertStep = AnalyticsStep<AnalyticsInvertPayload>;
|
36
|
-
/**
|
37
|
-
* Custom Prosemirror Step to fire our GAS V3 analytics events
|
38
|
-
* Using a Step means that it will work with prosemirror-history and we get
|
39
|
-
* undo/redo events for free
|
40
|
-
*/
|
41
|
-
export declare class AnalyticsStep<P extends AnalyticsPayload> extends Step {
|
42
|
-
analyticsEvents: AnalyticsWithChannel<P>[];
|
43
|
-
pos?: number;
|
44
|
-
private actionsToIgnore;
|
45
|
-
constructor(analyticsEvents: AnalyticsWithChannel<P>[], actionsToIgnore?: string[], pos?: number);
|
46
|
-
/**
|
47
|
-
* Generate new undo/redo analytics event when step is inverted
|
48
|
-
*/
|
49
|
-
invert(): AnalyticsStep<AnalyticsInvertPayload>;
|
50
|
-
apply(doc: PMNode): StepResult<any>;
|
51
|
-
map(mapping: Mappable): AnalyticsStep<P>;
|
52
|
-
getMap(): StepMap;
|
53
|
-
merge(other: Step): AnalyticsStep<P> | null;
|
54
|
-
toJSON(): {
|
55
|
-
stepType: string;
|
56
|
-
};
|
57
|
-
static fromJSON(): ReplaceStep<any>;
|
58
|
-
}
|
59
|
-
export {};
|
@@ -1,23 +0,0 @@
|
|
1
|
-
import { Mappable, Step, StepResult } from 'prosemirror-transform';
|
2
|
-
import { Node as ProseMirrorNode, Schema } from 'prosemirror-model';
|
3
|
-
/**
|
4
|
-
* For more context on what this is about:
|
5
|
-
* @see https://discuss.prosemirror.net/t/preventing-image-placeholder-replacement-from-being-undone/1394
|
6
|
-
*/
|
7
|
-
export declare class SetAttrsStep extends Step {
|
8
|
-
pos: number;
|
9
|
-
attrs: object;
|
10
|
-
constructor(pos: number, attrs: object);
|
11
|
-
apply(doc: ProseMirrorNode): StepResult<any>;
|
12
|
-
invert(doc: ProseMirrorNode): SetAttrsStep;
|
13
|
-
map(mapping: Mappable): SetAttrsStep | null;
|
14
|
-
toJSON(): {
|
15
|
-
stepType: string;
|
16
|
-
pos: number;
|
17
|
-
attrs: object;
|
18
|
-
};
|
19
|
-
static fromJSON(_schema: Schema, json: {
|
20
|
-
pos?: number;
|
21
|
-
attrs: object;
|
22
|
-
}): SetAttrsStep;
|
23
|
-
}
|
@@ -1,88 +0,0 @@
|
|
1
|
-
import { Node as ProseMirrorNode, Schema } from 'prosemirror-model';
|
2
|
-
import { Mappable, Step, StepMap, StepResult } from 'prosemirror-transform';
|
3
|
-
import { AddColumnStepInfo, AddColumnStepJson } from './types';
|
4
|
-
/**
|
5
|
-
* Index and positions looks like
|
6
|
-
* 0 1 2 3 -> Add Column Index
|
7
|
-
* | 5 | 10 | 15 | -> Table with Positions
|
8
|
-
* | 20 | 25 | 30 |
|
9
|
-
* 0 1 2 x -> Remove Column Index
|
10
|
-
*
|
11
|
-
*/
|
12
|
-
export declare class AddColumnStep<S extends Schema = any> extends Step {
|
13
|
-
private readonly tablePos;
|
14
|
-
private readonly isDelete;
|
15
|
-
private columnInfo;
|
16
|
-
private sideEffectsHandler;
|
17
|
-
constructor(tablePos: number, addColumnStepInfo: AddColumnStepInfo, isDelete?: boolean);
|
18
|
-
/**
|
19
|
-
* Detect the column based on all the cells step in column info.
|
20
|
-
* Recreate columnInfo based on the current document. We might need to add new cells added by insert row or unmerge cells.
|
21
|
-
* If isDelete
|
22
|
-
* Decrease colspan if one row has merged cell
|
23
|
-
* Remove all the cells using columnInfo.cellStep[].from
|
24
|
-
* else
|
25
|
-
* Increase colspan if one row had merged cell
|
26
|
-
* Add all new cells at columnInfo.cellStep[].from,
|
27
|
-
* if there is columnInfo.cellStep[].newCell use it
|
28
|
-
* else create an empty cell
|
29
|
-
*
|
30
|
-
* @param doc Current document
|
31
|
-
*/
|
32
|
-
apply(doc: ProseMirrorNode<S>): StepResult<S>;
|
33
|
-
/**
|
34
|
-
* Update tablePos with the new position. If tablePos doesnt exist any more remove the step
|
35
|
-
* Update all the cellStep inside columnInfo. If cellStep.from position gets deleted removed it from column info
|
36
|
-
* if cellStep.length === 0 remove the step
|
37
|
-
* Create a new step with all the position updated
|
38
|
-
* @param mapping
|
39
|
-
*/
|
40
|
-
map(mapping: Mappable): Step<S> | null | undefined;
|
41
|
-
/**
|
42
|
-
* if isDelete
|
43
|
-
* Get the original cell node at columnInfo.cellStep[].from to columnInfo.cellStep[].to
|
44
|
-
* Create a copy of the node
|
45
|
-
* Create a new cellStep with the same positions but with the clone node as a content
|
46
|
-
* return new step inverted
|
47
|
-
* else
|
48
|
-
* Remove the content from each columnInfo.cellStep[].content
|
49
|
-
* return new step inverted
|
50
|
-
* @param originalDoc
|
51
|
-
*/
|
52
|
-
invert(originalDoc: ProseMirrorNode<S>): Step<S>;
|
53
|
-
/**
|
54
|
-
* StepMap is created based on columnInfo.
|
55
|
-
* ColumnInfo is created on constructor and once is applied (the document could have new cells that weren't part of the original set)
|
56
|
-
* if isDelete
|
57
|
-
* Create range array based on cell info where each range is [cellStep.from, cellStep.from - cellStep.to, 0]
|
58
|
-
* else
|
59
|
-
* Create range array base on cell info where each range is [cellStep.from, 0, cellStep.content ? cellStep.content.nodeSize : defaultEmptyCellNodeSize]
|
60
|
-
*
|
61
|
-
* Ranges in ProseMirror are represented by each 3 elements in an array.
|
62
|
-
* As [pos, currentSize, newSize, pos2, currentSize2, newSize2] where:
|
63
|
-
* pos: Position in the document
|
64
|
-
* currentSize: Represent the affected range, this will be pos + currentSize
|
65
|
-
* newSize: Represent the new values, pos + newSize
|
66
|
-
*/
|
67
|
-
getMap(): StepMap;
|
68
|
-
/**
|
69
|
-
* Try to merge this step with another one, to be applied directly
|
70
|
-
* after it. Returns the merged step when possible, null if the
|
71
|
-
* steps can't be merged.
|
72
|
-
*/
|
73
|
-
merge(other: Step<S>): Step<S> | null | undefined;
|
74
|
-
/**
|
75
|
-
* Create a JSON-serializeable representation of this step. When
|
76
|
-
* defining this for a custom subclass, make sure the result object
|
77
|
-
* includes the step type's [JSON id](#transform.Step^jsonID) under
|
78
|
-
* the `stepType` property.
|
79
|
-
*/
|
80
|
-
toJSON(): AddColumnStepJson;
|
81
|
-
/**
|
82
|
-
* Deserialize a step from its JSON representation. Will call
|
83
|
-
* through to the step class' own implementation of this method.
|
84
|
-
*/
|
85
|
-
static fromJSON<S extends Schema = any>(schema: S, json: AddColumnStepJson): Step<S>;
|
86
|
-
static create(doc: ProseMirrorNode, tablePos: number, column: number, isDelete?: boolean): AddColumnStep<any>;
|
87
|
-
private applyCellSteps;
|
88
|
-
}
|
@@ -1,18 +0,0 @@
|
|
1
|
-
import { Node as PMNode } from 'prosemirror-model';
|
2
|
-
import { ReplaceStep, Step, StepMap, StepResult } from 'prosemirror-transform';
|
3
|
-
import { TableColumnOrdering } from './types';
|
4
|
-
export declare const tableSortingStepType = "atlaskit-table-sorting-ordering";
|
5
|
-
export declare class TableSortStep extends Step {
|
6
|
-
prev: TableColumnOrdering | undefined;
|
7
|
-
next: TableColumnOrdering | undefined;
|
8
|
-
pos: number;
|
9
|
-
constructor(pos: number, prev?: TableColumnOrdering, next?: TableColumnOrdering);
|
10
|
-
invert(): TableSortStep;
|
11
|
-
apply(doc: PMNode): StepResult<any>;
|
12
|
-
map(): null;
|
13
|
-
getMap(): StepMap;
|
14
|
-
toJSON(): {
|
15
|
-
stepType: string;
|
16
|
-
};
|
17
|
-
static fromJSON(): ReplaceStep<any>;
|
18
|
-
}
|