@atlaskit/adf-schema 25.6.2 → 25.6.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.
- package/CHANGELOG.md +13 -0
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types-ts4.5/index.d.ts +6 -0
- package/dist/types-ts4.5/json-schema/index.d.ts +2 -0
- package/dist/types-ts4.5/schema/bitbucket-schema.d.ts +5 -0
- package/dist/types-ts4.5/schema/confluence-schema.d.ts +9 -0
- package/dist/types-ts4.5/schema/create-schema.d.ts +32 -0
- package/dist/types-ts4.5/schema/default-schema.d.ts +7 -0
- package/dist/types-ts4.5/schema/groups.d.ts +6 -0
- package/dist/types-ts4.5/schema/index.d.ts +9 -0
- package/dist/types-ts4.5/schema/inline-nodes.d.ts +1 -0
- package/dist/types-ts4.5/schema/jira-schema.d.ts +65 -0
- package/dist/types-ts4.5/schema/marks/alignment.d.ts +16 -0
- package/dist/types-ts4.5/schema/marks/annotation.d.ts +32 -0
- package/dist/types-ts4.5/schema/marks/border.d.ts +24 -0
- package/dist/types-ts4.5/schema/marks/breakout.d.ts +12 -0
- package/dist/types-ts4.5/schema/marks/code.d.ts +8 -0
- package/dist/types-ts4.5/schema/marks/confluence-inline-comment.d.ts +12 -0
- package/dist/types-ts4.5/schema/marks/data-consumer.d.ts +48 -0
- package/dist/types-ts4.5/schema/marks/em.d.ts +8 -0
- package/dist/types-ts4.5/schema/marks/fragment.d.ts +29 -0
- package/dist/types-ts4.5/schema/marks/indentation.d.ts +16 -0
- package/dist/types-ts4.5/schema/marks/index.d.ts +34 -0
- package/dist/types-ts4.5/schema/marks/link.d.ts +35 -0
- package/dist/types-ts4.5/schema/marks/strike.d.ts +8 -0
- package/dist/types-ts4.5/schema/marks/strong.d.ts +8 -0
- package/dist/types-ts4.5/schema/marks/subsup.d.ts +15 -0
- package/dist/types-ts4.5/schema/marks/text-color.d.ts +22 -0
- package/dist/types-ts4.5/schema/marks/type-ahead-query.d.ts +2 -0
- package/dist/types-ts4.5/schema/marks/underline.d.ts +8 -0
- package/dist/types-ts4.5/schema/marks/unsupported-mark.d.ts +2 -0
- package/dist/types-ts4.5/schema/marks/unsupported-node-attributes.d.ts +2 -0
- package/dist/types-ts4.5/schema/nodes/block-card.d.ts +22 -0
- package/dist/types-ts4.5/schema/nodes/blockquote.d.ts +14 -0
- package/dist/types-ts4.5/schema/nodes/bodied-extension.d.ts +24 -0
- package/dist/types-ts4.5/schema/nodes/bullet-list.d.ts +3 -0
- package/dist/types-ts4.5/schema/nodes/caption.d.ts +20 -0
- package/dist/types-ts4.5/schema/nodes/code-block.d.ts +31 -0
- package/dist/types-ts4.5/schema/nodes/confluence-jira-issue.d.ts +2 -0
- package/dist/types-ts4.5/schema/nodes/confluence-unsupported-block.d.ts +2 -0
- package/dist/types-ts4.5/schema/nodes/confluence-unsupported-inline.d.ts +2 -0
- package/dist/types-ts4.5/schema/nodes/date.d.ts +14 -0
- package/dist/types-ts4.5/schema/nodes/decision-item.d.ts +17 -0
- package/dist/types-ts4.5/schema/nodes/decision-list.d.ts +18 -0
- package/dist/types-ts4.5/schema/nodes/doc.d.ts +18 -0
- package/dist/types-ts4.5/schema/nodes/embed-card.d.ts +18 -0
- package/dist/types-ts4.5/schema/nodes/emoji.d.ts +14 -0
- package/dist/types-ts4.5/schema/nodes/expand.d.ts +33 -0
- package/dist/types-ts4.5/schema/nodes/extension.d.ts +18 -0
- package/dist/types-ts4.5/schema/nodes/hard-break.d.ts +11 -0
- package/dist/types-ts4.5/schema/nodes/heading.d.ts +36 -0
- package/dist/types-ts4.5/schema/nodes/image.d.ts +2 -0
- package/dist/types-ts4.5/schema/nodes/index.d.ts +93 -0
- package/dist/types-ts4.5/schema/nodes/inline-card.d.ts +10 -0
- package/dist/types-ts4.5/schema/nodes/inline-extension.d.ts +18 -0
- package/dist/types-ts4.5/schema/nodes/layout-column.d.ts +21 -0
- package/dist/types-ts4.5/schema/nodes/layout-section.d.ts +44 -0
- package/dist/types-ts4.5/schema/nodes/list-item.d.ts +2 -0
- package/dist/types-ts4.5/schema/nodes/media-group.d.ts +14 -0
- package/dist/types-ts4.5/schema/nodes/media-inline.d.ts +16 -0
- package/dist/types-ts4.5/schema/nodes/media-single.d.ts +61 -0
- package/dist/types-ts4.5/schema/nodes/media.d.ts +62 -0
- package/dist/types-ts4.5/schema/nodes/mention.d.ts +26 -0
- package/dist/types-ts4.5/schema/nodes/nested-expand.d.ts +27 -0
- package/dist/types-ts4.5/schema/nodes/ordered-list.d.ts +4 -0
- package/dist/types-ts4.5/schema/nodes/panel.d.ts +38 -0
- package/dist/types-ts4.5/schema/nodes/paragraph.d.ts +37 -0
- package/dist/types-ts4.5/schema/nodes/placeholder.d.ts +11 -0
- package/dist/types-ts4.5/schema/nodes/rule.d.ts +8 -0
- package/dist/types-ts4.5/schema/nodes/status.d.ts +20 -0
- package/dist/types-ts4.5/schema/nodes/tableNodes.d.ts +114 -0
- package/dist/types-ts4.5/schema/nodes/task-item.d.ts +17 -0
- package/dist/types-ts4.5/schema/nodes/task-list.d.ts +21 -0
- package/dist/types-ts4.5/schema/nodes/text.d.ts +15 -0
- package/dist/types-ts4.5/schema/nodes/types/block-content.d.ts +22 -0
- package/dist/types-ts4.5/schema/nodes/types/extensions.d.ts +34 -0
- package/dist/types-ts4.5/schema/nodes/types/inline-content.d.ts +32 -0
- package/dist/types-ts4.5/schema/nodes/types/list.d.ts +42 -0
- package/dist/types-ts4.5/schema/nodes/types/mark.d.ts +15 -0
- package/dist/types-ts4.5/schema/nodes/types/non-nestable-block-content.d.ts +20 -0
- package/dist/types-ts4.5/schema/nodes/types/rich-media-common.d.ts +9 -0
- package/dist/types-ts4.5/schema/nodes/unknown-block.d.ts +3 -0
- package/dist/types-ts4.5/schema/nodes/unsupported-block.d.ts +2 -0
- package/dist/types-ts4.5/schema/nodes/unsupported-inline.d.ts +2 -0
- package/dist/types-ts4.5/schema/unsupported.d.ts +1 -0
- package/dist/types-ts4.5/steps/analytics.d.ts +59 -0
- package/dist/types-ts4.5/steps/link-meta-step.d.ts +51 -0
- package/dist/types-ts4.5/steps/set-attrs.d.ts +23 -0
- package/dist/types-ts4.5/steps/table/add-column.d.ts +88 -0
- package/dist/types-ts4.5/steps/table/constants.d.ts +4 -0
- package/dist/types-ts4.5/steps/table/sort-column.d.ts +18 -0
- package/dist/types-ts4.5/steps/table/types.d.ts +39 -0
- package/dist/types-ts4.5/steps/table/utils/cell-step.d.ts +51 -0
- package/dist/types-ts4.5/steps/table/utils/cells-at-column.d.ts +20 -0
- package/dist/types-ts4.5/steps/table/utils/find-column.d.ts +8 -0
- package/dist/types-ts4.5/steps/table/utils/get-table-rect-from-doc.d.ts +8 -0
- package/dist/types-ts4.5/steps/table/utils/side-effects/rows.d.ts +25 -0
- package/dist/types-ts4.5/steps/table/utils/side-effects/side-effects.d.ts +15 -0
- package/dist/types-ts4.5/steps/table/utils/side-effects/table.d.ts +16 -0
- package/dist/types-ts4.5/steps/table/utils/side-effects/types.d.ts +33 -0
- package/dist/types-ts4.5/steps/table/utils/table-map.d.ts +6 -0
- package/dist/types-ts4.5/steps/type-ahead.d.ts +35 -0
- package/dist/types-ts4.5/steps.d.ts +10 -0
- package/dist/types-ts4.5/utils/colors.d.ts +74 -0
- package/dist/types-ts4.5/utils/confluence/emoji.d.ts +50 -0
- package/dist/types-ts4.5/utils/extensions.d.ts +3 -0
- package/dist/types-ts4.5/utils/index.d.ts +6 -0
- package/dist/types-ts4.5/utils/parseDOM.d.ts +1 -0
- package/dist/types-ts4.5/utils/url.d.ts +31 -0
- package/dist/types-ts4.5/utils/uuid.d.ts +5 -0
- package/package.json +3 -3
@@ -0,0 +1,24 @@
|
|
1
|
+
import { NodeSpec } from 'prosemirror-model';
|
2
|
+
import { ExtensionAttributes } from './types/extensions';
|
3
|
+
import { MarksObject } from './types/mark';
|
4
|
+
import { NonNestableBlockContent } from './types/non-nestable-block-content';
|
5
|
+
import { DataConsumerDefinition } from '../marks/data-consumer';
|
6
|
+
import { FragmentDefinition } from '../marks/fragment';
|
7
|
+
/**
|
8
|
+
* @name bodiedExtension_node
|
9
|
+
*/
|
10
|
+
export interface BodiedExtensionBaseDefinition {
|
11
|
+
type: 'bodiedExtension';
|
12
|
+
attrs: ExtensionAttributes;
|
13
|
+
marks?: Array<any>;
|
14
|
+
/**
|
15
|
+
* @minItems 1
|
16
|
+
* @allowUnsupportedBlock true
|
17
|
+
*/
|
18
|
+
content: Array<NonNestableBlockContent>;
|
19
|
+
}
|
20
|
+
/**
|
21
|
+
* @name bodiedExtension_with_marks_node
|
22
|
+
*/
|
23
|
+
export type BodiedExtensionDefinition = BodiedExtensionBaseDefinition & MarksObject<DataConsumerDefinition | FragmentDefinition>;
|
24
|
+
export declare const bodiedExtension: NodeSpec;
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import { NodeSpec } from 'prosemirror-model';
|
2
|
+
import { InlineFormattedText, InlineCode } from './types/inline-content';
|
3
|
+
import { HardBreakDefinition as HardBreak } from './hard-break';
|
4
|
+
import { MentionDefinition as Mention } from './mention';
|
5
|
+
import { EmojiDefinition as Emoji } from './emoji';
|
6
|
+
import { DateDefinition as Date } from './date';
|
7
|
+
import { PlaceholderDefinition as Placeholder } from './placeholder';
|
8
|
+
import { InlineCardDefinition as InlineCard } from './inline-card';
|
9
|
+
import { StatusDefinition as Status } from './status';
|
10
|
+
/**
|
11
|
+
* @name caption_node
|
12
|
+
*/
|
13
|
+
export interface CaptionDefinition {
|
14
|
+
type: 'caption';
|
15
|
+
/**
|
16
|
+
* @minItems 0
|
17
|
+
*/
|
18
|
+
content: Array<InlineFormattedText | InlineCode | HardBreak | Mention | Emoji | Date | Placeholder | InlineCard | Status>;
|
19
|
+
}
|
20
|
+
export declare const caption: NodeSpec;
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import { NodeSpec, Node as PMNode } from 'prosemirror-model';
|
2
|
+
import { TextDefinition as Text } from './text';
|
3
|
+
import { BreakoutMarkDefinition } from '../marks/breakout';
|
4
|
+
import { MarksObject, NoMark } from './types/mark';
|
5
|
+
/**
|
6
|
+
* @name codeBlock_node
|
7
|
+
*/
|
8
|
+
export type CodeBlockBaseDefinition = {
|
9
|
+
type: 'codeBlock';
|
10
|
+
/**
|
11
|
+
* @allowUnsupportedInline true
|
12
|
+
*/
|
13
|
+
content?: Array<Text & NoMark>;
|
14
|
+
marks?: Array<any>;
|
15
|
+
attrs?: CodeBlockAttrs;
|
16
|
+
};
|
17
|
+
export type CodeBlockAttrs = {
|
18
|
+
language?: string;
|
19
|
+
};
|
20
|
+
/**
|
21
|
+
* @name codeBlock_with_no_marks_node
|
22
|
+
*/
|
23
|
+
export type CodeBlockDefinition = CodeBlockBaseDefinition & NoMark;
|
24
|
+
/**
|
25
|
+
* @name codeBlock_with_marks_node
|
26
|
+
*/
|
27
|
+
export type CodeBlockWithMarksDefinition = CodeBlockBaseDefinition & MarksObject<BreakoutMarkDefinition>;
|
28
|
+
export declare const codeBlock: NodeSpec;
|
29
|
+
export declare const toJSON: (node: PMNode) => {
|
30
|
+
attrs: Record<string, any>;
|
31
|
+
};
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import { NodeSpec } from 'prosemirror-model';
|
2
|
+
import { Inline } from './types/inline-content';
|
3
|
+
/**
|
4
|
+
* @name decisionItem_node
|
5
|
+
*/
|
6
|
+
export interface DecisionItemDefinition {
|
7
|
+
type: 'decisionItem';
|
8
|
+
/**
|
9
|
+
* @allowUnsupportedInline true
|
10
|
+
*/
|
11
|
+
content?: Array<Inline>;
|
12
|
+
attrs: {
|
13
|
+
localId: string;
|
14
|
+
state: string;
|
15
|
+
};
|
16
|
+
}
|
17
|
+
export declare const decisionItem: NodeSpec;
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { NodeSpec } from 'prosemirror-model';
|
2
|
+
import { DecisionItemDefinition as DecisionItemNode } from './decision-item';
|
3
|
+
/**
|
4
|
+
* @name decisionList_node
|
5
|
+
*/
|
6
|
+
export interface DecisionListDefinition {
|
7
|
+
type: 'decisionList';
|
8
|
+
/**
|
9
|
+
* @minItems 1
|
10
|
+
* @allowUnsupportedBlock true
|
11
|
+
*/
|
12
|
+
content: Array<DecisionItemNode>;
|
13
|
+
attrs: {
|
14
|
+
localId: string;
|
15
|
+
};
|
16
|
+
}
|
17
|
+
export declare const decisionListSelector: string;
|
18
|
+
export declare const decisionList: NodeSpec;
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { NodeSpec } from 'prosemirror-model';
|
2
|
+
import { CodeBlockWithMarksDefinition as CodeBlockWithMarks } from './code-block';
|
3
|
+
import { ExpandWithBreakoutDefinition as ExpandWithBreakout } from './expand';
|
4
|
+
import { LayoutSectionDefinition as LayoutSection } from './layout-section';
|
5
|
+
import { ParagraphWithIndentationDefinition } from './paragraph';
|
6
|
+
import { BlockContent } from './types/block-content';
|
7
|
+
/**
|
8
|
+
* @name doc_node
|
9
|
+
*/
|
10
|
+
export interface DocNode {
|
11
|
+
version: 1;
|
12
|
+
type: 'doc';
|
13
|
+
/**
|
14
|
+
* @allowUnsupportedBlock true
|
15
|
+
*/
|
16
|
+
content: Array<BlockContent | LayoutSection | CodeBlockWithMarks | ExpandWithBreakout | ParagraphWithIndentationDefinition>;
|
17
|
+
}
|
18
|
+
export declare const doc: NodeSpec;
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { NodeSpec } from 'prosemirror-model';
|
2
|
+
import { RichMediaAttributes } from './types/rich-media-common';
|
3
|
+
export interface EmbedCardAttributes extends RichMediaAttributes {
|
4
|
+
originalWidth?: number;
|
5
|
+
originalHeight?: number;
|
6
|
+
/**
|
7
|
+
* @validatorFn safeUrl
|
8
|
+
*/
|
9
|
+
url: string;
|
10
|
+
}
|
11
|
+
/**
|
12
|
+
* @name embedCard_node
|
13
|
+
*/
|
14
|
+
export interface EmbedCardDefinition {
|
15
|
+
type: 'embedCard';
|
16
|
+
attrs: EmbedCardAttributes;
|
17
|
+
}
|
18
|
+
export declare const embedCard: NodeSpec;
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { NodeSpec } from 'prosemirror-model';
|
2
|
+
/**
|
3
|
+
* @name emoji_node
|
4
|
+
*/
|
5
|
+
export interface EmojiDefinition {
|
6
|
+
type: 'emoji';
|
7
|
+
attrs: EmojiAttributes;
|
8
|
+
}
|
9
|
+
export interface EmojiAttributes {
|
10
|
+
id?: string;
|
11
|
+
shortName: string;
|
12
|
+
text?: string;
|
13
|
+
}
|
14
|
+
export declare const emoji: NodeSpec;
|
@@ -0,0 +1,33 @@
|
|
1
|
+
import { NodeSpec, Node as PMNode } from 'prosemirror-model';
|
2
|
+
import { BreakoutMarkDefinition } from '../marks';
|
3
|
+
import { MarksObject, NoMark } from './types/mark';
|
4
|
+
import { NonNestableBlockContent } from './types/non-nestable-block-content';
|
5
|
+
/**
|
6
|
+
* @name expand_node
|
7
|
+
*/
|
8
|
+
export interface ExpandBaseDefinition {
|
9
|
+
type: 'expand';
|
10
|
+
attrs: {
|
11
|
+
title?: string;
|
12
|
+
};
|
13
|
+
/**
|
14
|
+
* @minItems 1
|
15
|
+
* @allowUnsupportedBlock true
|
16
|
+
*/
|
17
|
+
content: Array<NonNestableBlockContent>;
|
18
|
+
marks?: Array<any>;
|
19
|
+
}
|
20
|
+
/**
|
21
|
+
* @name expand_with_no_mark_node
|
22
|
+
*/
|
23
|
+
export type ExpandDefinition = ExpandBaseDefinition & NoMark;
|
24
|
+
/**
|
25
|
+
* @name expand_with_breakout_mark_node
|
26
|
+
*/
|
27
|
+
export type ExpandWithBreakoutDefinition = ExpandBaseDefinition & MarksObject<BreakoutMarkDefinition>;
|
28
|
+
export declare const expand: NodeSpec;
|
29
|
+
export declare const toJSON: (node: PMNode) => {
|
30
|
+
attrs: {
|
31
|
+
[key: string]: any;
|
32
|
+
};
|
33
|
+
};
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { NodeSpec } from 'prosemirror-model';
|
2
|
+
import { ExtensionAttributes } from './types/extensions';
|
3
|
+
import { MarksObject } from './types/mark';
|
4
|
+
import { DataConsumerDefinition } from '../marks/data-consumer';
|
5
|
+
import { FragmentDefinition } from '../marks/fragment';
|
6
|
+
/**
|
7
|
+
* @name extension_node
|
8
|
+
*/
|
9
|
+
export interface ExtensionBaseDefinition {
|
10
|
+
type: 'extension';
|
11
|
+
attrs: ExtensionAttributes;
|
12
|
+
marks?: Array<any>;
|
13
|
+
}
|
14
|
+
/**
|
15
|
+
* @name extension_with_marks_node
|
16
|
+
*/
|
17
|
+
export type ExtensionDefinition = ExtensionBaseDefinition & MarksObject<DataConsumerDefinition | FragmentDefinition>;
|
18
|
+
export declare const extension: NodeSpec;
|
@@ -0,0 +1,36 @@
|
|
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 heading_node
|
7
|
+
*/
|
8
|
+
export interface HeadingBaseDefinition {
|
9
|
+
type: 'heading';
|
10
|
+
/**
|
11
|
+
* @allowUnsupportedInline true
|
12
|
+
*/
|
13
|
+
content?: Array<Inline>;
|
14
|
+
marks?: Array<any>;
|
15
|
+
attrs: {
|
16
|
+
/**
|
17
|
+
* @minimum 1
|
18
|
+
* @maximum 6
|
19
|
+
*/
|
20
|
+
level: number;
|
21
|
+
};
|
22
|
+
}
|
23
|
+
/**
|
24
|
+
* @name heading_with_no_marks_node
|
25
|
+
*/
|
26
|
+
export type HeadingDefinition = HeadingBaseDefinition & NoMark;
|
27
|
+
/**
|
28
|
+
* @name heading_with_alignment_node
|
29
|
+
*/
|
30
|
+
export type HeadingWithAlignmentDefinition = HeadingBaseDefinition & MarksObject<AlignmentMarkDefinition>;
|
31
|
+
/**
|
32
|
+
* @name heading_with_indentation_node
|
33
|
+
*/
|
34
|
+
export type HeadingWithIndentationDefinition = HeadingBaseDefinition & MarksObject<IndentationMarkDefinition>;
|
35
|
+
export type HeadingWithMarksDefinition = HeadingWithAlignmentDefinition | HeadingWithIndentationDefinition;
|
36
|
+
export declare const heading: NodeSpec;
|
@@ -0,0 +1,93 @@
|
|
1
|
+
export { expand, toJSON as expandToJSON } from './expand';
|
2
|
+
export type { ExpandDefinition } from './expand';
|
3
|
+
export { confluenceJiraIssue } from './confluence-jira-issue';
|
4
|
+
export { confluenceUnsupportedBlock } from './confluence-unsupported-block';
|
5
|
+
export { confluenceUnsupportedInline } from './confluence-unsupported-inline';
|
6
|
+
export { doc } from './doc';
|
7
|
+
export type { DocNode } from './doc';
|
8
|
+
export { blockquote } from './blockquote';
|
9
|
+
export type { BlockQuoteDefinition } from './blockquote';
|
10
|
+
export { bulletList, bulletListSelector } from './bullet-list';
|
11
|
+
export type { BulletListDefinition } from './types/list';
|
12
|
+
export { codeBlock, toJSON as codeBlockToJSON } from './code-block';
|
13
|
+
export type { CodeBlockDefinition, CodeBlockAttrs, CodeBlockBaseDefinition, CodeBlockWithMarksDefinition, } from './code-block';
|
14
|
+
export { hardBreak } from './hard-break';
|
15
|
+
export type { HardBreakDefinition } from './hard-break';
|
16
|
+
export { heading } from './heading';
|
17
|
+
export type { HeadingDefinition, HeadingBaseDefinition, HeadingWithAlignmentDefinition, HeadingWithIndentationDefinition, HeadingWithMarksDefinition, } from './heading';
|
18
|
+
export { rule } from './rule';
|
19
|
+
export type { RuleDefinition } from './rule';
|
20
|
+
export { orderedList, orderedListSelector, orderedListWithOrder, } from './ordered-list';
|
21
|
+
export type { OrderedListDefinition } from './types/list';
|
22
|
+
export { paragraph } from './paragraph';
|
23
|
+
export type { ParagraphDefinition, ParagraphBaseDefinition, ParagraphWithAlignmentDefinition, ParagraphWithIndentationDefinition, ParagraphWithMarksDefinition, } from './paragraph';
|
24
|
+
export { emoji } from './emoji';
|
25
|
+
export type { EmojiAttributes, EmojiDefinition } from './emoji';
|
26
|
+
export { image } from './image';
|
27
|
+
export { mention, toJSON as mentionToJSON } from './mention';
|
28
|
+
export type { MentionAttributes, UserType as MentionUserType, MentionDefinition, } from './mention';
|
29
|
+
export { listItem } from './list-item';
|
30
|
+
export type { ListItemArray, ListItemDefinition } from './types/list';
|
31
|
+
export { panel, PanelType } from './panel';
|
32
|
+
export type { PanelAttributes, PanelDefinition } from './panel';
|
33
|
+
export { text } from './text';
|
34
|
+
export type { TextDefinition } from './text';
|
35
|
+
export { default as unknownBlock } from './unknown-block';
|
36
|
+
export { caption } from './caption';
|
37
|
+
export type { CaptionDefinition } from './caption';
|
38
|
+
export { media, copyPrivateAttributes as copyPrivateMediaAttributes, toJSON as mediaToJSON, } from './media';
|
39
|
+
export type { MediaType, MediaBaseAttributes, MediaAttributes, ExternalMediaAttributes, DisplayType as MediaDisplayType, MediaDefinition, MediaADFAttrs, } from './media';
|
40
|
+
export { mediaGroup } from './media-group';
|
41
|
+
export { mediaInline } from './media-inline';
|
42
|
+
export type { MediaInlineAttributes, MediaInlineDefinition, } from './media-inline';
|
43
|
+
export type { MediaGroupDefinition } from './media-group';
|
44
|
+
export { mediaSingle, mediaSingleWithCaption, toJSON as mediaSingleToJSON, } from './media-single';
|
45
|
+
export type { MediaSingleDefinition } from './media-single';
|
46
|
+
export { table, tableToJSON, tableCell, toJSONTableCell, tableHeader, toJSONTableHeader, tableRow, tableBackgroundColorPalette, tableBackgroundBorderColor, tableBackgroundColorNames, getCellAttrs, getCellDomAttrs, tablePrefixSelector, tableCellSelector, tableHeaderSelector, tableCellContentWrapperSelector, tableCellContentDomSelector, } from './tableNodes';
|
47
|
+
export type { TableAttributes, CellAttributes, Layout as TableLayout, TableDefinition, TableCell as TableCellDefinition, TableHeader as TableHeaderDefinition, TableRow as TableRowDefinition, CellDomAttrs, } from './tableNodes';
|
48
|
+
export { decisionList, decisionListSelector } from './decision-list';
|
49
|
+
export type { DecisionListDefinition } from './decision-list';
|
50
|
+
export { decisionItem } from './decision-item';
|
51
|
+
export type { DecisionItemDefinition } from './decision-item';
|
52
|
+
export { taskList, taskListSelector } from './task-list';
|
53
|
+
export type { TaskListDefinition, TaskListContent } from './task-list';
|
54
|
+
export { taskItem } from './task-item';
|
55
|
+
export type { TaskItemDefinition } from './task-item';
|
56
|
+
export { extension } from './extension';
|
57
|
+
export type { ExtensionDefinition } from './extension';
|
58
|
+
export { inlineExtension } from './inline-extension';
|
59
|
+
export type { InlineExtensionDefinition } from './inline-extension';
|
60
|
+
export { bodiedExtension } from './bodied-extension';
|
61
|
+
export type { BodiedExtensionDefinition } from './bodied-extension';
|
62
|
+
export { date } from './date';
|
63
|
+
export type { DateDefinition } from './date';
|
64
|
+
export { placeholder } from './placeholder';
|
65
|
+
export type { PlaceholderDefinition } from './placeholder';
|
66
|
+
export { layoutSection, layoutSectionWithSingleColumn } from './layout-section';
|
67
|
+
export type { LayoutSectionDefinition, LayoutSectionBaseDefinition, LayoutSectionFullDefinition, LayoutSectionWithSingleColumnDefinition, } from './layout-section';
|
68
|
+
export { layoutColumn } from './layout-column';
|
69
|
+
export type { LayoutColumnDefinition } from './layout-column';
|
70
|
+
export { inlineCard } from './inline-card';
|
71
|
+
export type { InlineCardDefinition } from './inline-card';
|
72
|
+
export { blockCard } from './block-card';
|
73
|
+
export type { UrlType, DataType, CardAttributes, BlockCardDefinition, } from './block-card';
|
74
|
+
export { unsupportedBlock } from './unsupported-block';
|
75
|
+
export { unsupportedInline } from './unsupported-inline';
|
76
|
+
export { status } from './status';
|
77
|
+
export type { StatusDefinition } from './status';
|
78
|
+
export { nestedExpand } from './nested-expand';
|
79
|
+
export type { NestedExpandDefinition } from './nested-expand';
|
80
|
+
export type { NoMark } from './types/mark';
|
81
|
+
export type { MarksObject } from './types/mark';
|
82
|
+
export type { BlockContent } from './types/block-content';
|
83
|
+
export type { NonNestableBlockContent } from './types/non-nestable-block-content';
|
84
|
+
export type { InlineAtomic } from './types/inline-content';
|
85
|
+
export type { InlineCode } from './types/inline-content';
|
86
|
+
export type { InlineLinkText } from './types/inline-content';
|
87
|
+
export type { InlineFormattedText } from './types/inline-content';
|
88
|
+
export type { Inline } from './types/inline-content';
|
89
|
+
export type { NestedExpandContent } from './nested-expand';
|
90
|
+
export type { Layout as ExtensionLayout } from './types/extensions';
|
91
|
+
export { embedCard } from './embed-card';
|
92
|
+
export type { EmbedCardDefinition, EmbedCardAttributes } from './embed-card';
|
93
|
+
export type { RichMediaAttributes, Layout as RichMediaLayout, } from './types/rich-media-common';
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { NodeSpec } from 'prosemirror-model';
|
2
|
+
import { CardAttributes } from './block-card';
|
3
|
+
/**
|
4
|
+
* @name inlineCard_node
|
5
|
+
*/
|
6
|
+
export interface InlineCardDefinition {
|
7
|
+
type: 'inlineCard';
|
8
|
+
attrs: CardAttributes;
|
9
|
+
}
|
10
|
+
export declare const inlineCard: NodeSpec;
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { NodeSpec } from 'prosemirror-model';
|
2
|
+
import { InlineExtensionAttributes } from './types/extensions';
|
3
|
+
import { MarksObject } from './types/mark';
|
4
|
+
import { DataConsumerDefinition } from '../marks/data-consumer';
|
5
|
+
import { FragmentDefinition } from '../marks/fragment';
|
6
|
+
/**
|
7
|
+
* @name inlineExtension_node
|
8
|
+
*/
|
9
|
+
export interface InlineExtensionBaseDefinition {
|
10
|
+
type: 'inlineExtension';
|
11
|
+
attrs: InlineExtensionAttributes;
|
12
|
+
marks?: Array<any>;
|
13
|
+
}
|
14
|
+
/**
|
15
|
+
* @name inlineExtension_with_marks_node
|
16
|
+
*/
|
17
|
+
export type InlineExtensionDefinition = InlineExtensionBaseDefinition & MarksObject<DataConsumerDefinition | FragmentDefinition>;
|
18
|
+
export declare const inlineExtension: NodeSpec;
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import { NodeSpec } from 'prosemirror-model';
|
2
|
+
import { BlockContent } from './types/block-content';
|
3
|
+
/**
|
4
|
+
* @name layoutColumn_node
|
5
|
+
*/
|
6
|
+
export interface LayoutColumnDefinition {
|
7
|
+
type: 'layoutColumn';
|
8
|
+
attrs: {
|
9
|
+
/**
|
10
|
+
* @minimum 0
|
11
|
+
* @maximum 100
|
12
|
+
*/
|
13
|
+
width: number;
|
14
|
+
};
|
15
|
+
/**
|
16
|
+
* @minItems 1
|
17
|
+
* @allowUnsupportedBlock true
|
18
|
+
*/
|
19
|
+
content: Array<BlockContent>;
|
20
|
+
}
|
21
|
+
export declare const layoutColumn: NodeSpec;
|
@@ -0,0 +1,44 @@
|
|
1
|
+
import { NodeSpec } from 'prosemirror-model';
|
2
|
+
import { LayoutColumnDefinition } from './layout-column';
|
3
|
+
import { BreakoutMarkDefinition } from '../marks';
|
4
|
+
/**
|
5
|
+
* @name layoutSection_node
|
6
|
+
*/
|
7
|
+
export type LayoutSectionBaseDefinition = {
|
8
|
+
type: 'layoutSection';
|
9
|
+
marks?: Array<BreakoutMarkDefinition>;
|
10
|
+
content: Array<LayoutColumnDefinition>;
|
11
|
+
};
|
12
|
+
/**
|
13
|
+
* Need duplicate `type` and `marks` to make both validator and json-schema satisfied
|
14
|
+
*/
|
15
|
+
/**
|
16
|
+
* @name layoutSection_full_node
|
17
|
+
*/
|
18
|
+
export type LayoutSectionFullDefinition = LayoutSectionBaseDefinition & {
|
19
|
+
type: 'layoutSection';
|
20
|
+
marks?: Array<BreakoutMarkDefinition>;
|
21
|
+
/**
|
22
|
+
* @minItems 2
|
23
|
+
* @maxItems 3
|
24
|
+
* @allowUnsupportedBlock true
|
25
|
+
*/
|
26
|
+
content: Array<LayoutColumnDefinition>;
|
27
|
+
};
|
28
|
+
/**
|
29
|
+
* @stage 0
|
30
|
+
* @name layoutSection_with_single_column_node
|
31
|
+
*/
|
32
|
+
export type LayoutSectionWithSingleColumnDefinition = LayoutSectionBaseDefinition & {
|
33
|
+
type: 'layoutSection';
|
34
|
+
marks?: Array<BreakoutMarkDefinition>;
|
35
|
+
/**
|
36
|
+
* @minItems 1
|
37
|
+
* @maxItems 3
|
38
|
+
* @allowUnsupportedBlock true
|
39
|
+
*/
|
40
|
+
content: Array<LayoutColumnDefinition>;
|
41
|
+
};
|
42
|
+
export type LayoutSectionDefinition = LayoutSectionFullDefinition | LayoutSectionWithSingleColumnDefinition;
|
43
|
+
export declare const layoutSection: NodeSpec;
|
44
|
+
export declare const layoutSectionWithSingleColumn: NodeSpec;
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { NodeSpec } from 'prosemirror-model';
|
2
|
+
import { MediaDefinition as Media } from './media';
|
3
|
+
/**
|
4
|
+
* @name mediaGroup_node
|
5
|
+
*/
|
6
|
+
export interface MediaGroupDefinition {
|
7
|
+
type: 'mediaGroup';
|
8
|
+
/**
|
9
|
+
* @minItems 1
|
10
|
+
* @allowUnsupportedBlock true
|
11
|
+
*/
|
12
|
+
content: Array<Media>;
|
13
|
+
}
|
14
|
+
export declare const mediaGroup: NodeSpec;
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import { NodeSpec } from 'prosemirror-model';
|
2
|
+
import { LinkDefinition } from '../marks/link';
|
3
|
+
import { MediaBaseAttributes } from './media';
|
4
|
+
export interface MediaInlineAttributes extends MediaBaseAttributes {
|
5
|
+
data?: object;
|
6
|
+
type?: 'file' | 'link';
|
7
|
+
}
|
8
|
+
/**
|
9
|
+
* @name mediaInline_node
|
10
|
+
*/
|
11
|
+
export interface MediaInlineDefinition {
|
12
|
+
type: 'mediaInline';
|
13
|
+
attrs: MediaInlineAttributes;
|
14
|
+
marks?: Array<LinkDefinition>;
|
15
|
+
}
|
16
|
+
export declare const mediaInline: NodeSpec;
|
@@ -0,0 +1,61 @@
|
|
1
|
+
import { NodeSpec, Node } from 'prosemirror-model';
|
2
|
+
import { MediaDefinition as Media } from './media';
|
3
|
+
import { LinkDefinition } from '../marks/link';
|
4
|
+
import { RichMediaAttributes } from './types/rich-media-common';
|
5
|
+
import { CaptionDefinition as Caption } from './caption';
|
6
|
+
export type MediaSingleDefinition = MediaSingleFullDefinition | MediaSingleWithCaptionDefinition;
|
7
|
+
/**
|
8
|
+
* @name mediaSingle_node
|
9
|
+
* @additionalProperties true
|
10
|
+
*/
|
11
|
+
export interface MediaSingleBaseDefinition {
|
12
|
+
type: 'mediaSingle';
|
13
|
+
attrs?: RichMediaAttributes;
|
14
|
+
marks?: Array<LinkDefinition>;
|
15
|
+
}
|
16
|
+
/**
|
17
|
+
* @additionalProperties true
|
18
|
+
*/
|
19
|
+
export interface MediaCaptionContent {
|
20
|
+
/**
|
21
|
+
* @minItems 1
|
22
|
+
* @maxItems 2
|
23
|
+
* @allowUnsupportedBlock true
|
24
|
+
*/
|
25
|
+
content: [
|
26
|
+
Media,
|
27
|
+
Caption?
|
28
|
+
];
|
29
|
+
}
|
30
|
+
/**
|
31
|
+
* @name mediaSingle_caption_node
|
32
|
+
*/
|
33
|
+
export type MediaSingleWithCaptionDefinition = MediaSingleBaseDefinition & MediaCaptionContent;
|
34
|
+
/**
|
35
|
+
* @additionalProperties true
|
36
|
+
*/
|
37
|
+
export interface MediaSingleFullContent {
|
38
|
+
/**
|
39
|
+
* @minItems 1
|
40
|
+
* @maxItems 1
|
41
|
+
* @allowUnsupportedBlock true
|
42
|
+
*/
|
43
|
+
content: Array<Media>;
|
44
|
+
}
|
45
|
+
/**
|
46
|
+
* @name mediaSingle_full_node
|
47
|
+
*/
|
48
|
+
export type MediaSingleFullDefinition = MediaSingleBaseDefinition & MediaSingleFullContent;
|
49
|
+
export declare const defaultAttrs: {
|
50
|
+
width: {
|
51
|
+
default: null;
|
52
|
+
};
|
53
|
+
layout: {
|
54
|
+
default: string;
|
55
|
+
};
|
56
|
+
};
|
57
|
+
export declare const mediaSingle: NodeSpec;
|
58
|
+
export declare const mediaSingleWithCaption: NodeSpec;
|
59
|
+
export declare const toJSON: (node: Node) => {
|
60
|
+
attrs: any;
|
61
|
+
};
|
@@ -0,0 +1,62 @@
|
|
1
|
+
import { NodeSpec, Node as PMNode } from 'prosemirror-model';
|
2
|
+
import { BorderMarkDefinition } from '../marks/border';
|
3
|
+
import { LinkDefinition } from '../marks/link';
|
4
|
+
export type MediaType = 'file' | 'link' | 'external';
|
5
|
+
export type DisplayType = 'file' | 'thumbnail';
|
6
|
+
export type DefaultAttributes<T> = {
|
7
|
+
[P in keyof T]: {
|
8
|
+
default?: T[P] | null;
|
9
|
+
};
|
10
|
+
};
|
11
|
+
/**
|
12
|
+
* @name media_node
|
13
|
+
*/
|
14
|
+
export interface MediaDefinition {
|
15
|
+
type: 'media';
|
16
|
+
/**
|
17
|
+
* @minItems 1
|
18
|
+
*/
|
19
|
+
attrs: MediaADFAttrs;
|
20
|
+
marks?: Array<LinkDefinition | BorderMarkDefinition>;
|
21
|
+
}
|
22
|
+
export interface MediaBaseAttributes {
|
23
|
+
/**
|
24
|
+
* @minLength 1
|
25
|
+
*/
|
26
|
+
id: string;
|
27
|
+
collection: string;
|
28
|
+
height?: number;
|
29
|
+
width?: number;
|
30
|
+
/**
|
31
|
+
* @minLength 1
|
32
|
+
*/
|
33
|
+
occurrenceKey?: string;
|
34
|
+
alt?: string;
|
35
|
+
__fileName?: string | null;
|
36
|
+
__fileSize?: number | null;
|
37
|
+
__fileMimeType?: string | null;
|
38
|
+
__displayType?: DisplayType | null;
|
39
|
+
__contextId?: string | null;
|
40
|
+
__mediaTraceId?: string | null;
|
41
|
+
__external?: boolean;
|
42
|
+
}
|
43
|
+
export interface MediaAttributes extends MediaBaseAttributes {
|
44
|
+
type: 'file' | 'link';
|
45
|
+
}
|
46
|
+
export interface ExternalMediaAttributes {
|
47
|
+
type: 'external';
|
48
|
+
url: string;
|
49
|
+
alt?: string;
|
50
|
+
width?: number;
|
51
|
+
height?: number;
|
52
|
+
__external?: boolean;
|
53
|
+
}
|
54
|
+
export type MediaADFAttrs = MediaAttributes | ExternalMediaAttributes;
|
55
|
+
export declare const defaultAttrs: DefaultAttributes<MediaADFAttrs>;
|
56
|
+
export declare const createMediaSpec: (attributes: Partial<NodeSpec['attrs']>, inline?: boolean) => NodeSpec;
|
57
|
+
export declare const media: NodeSpec;
|
58
|
+
export declare const camelCaseToKebabCase: (str: string) => string;
|
59
|
+
export declare const copyPrivateAttributes: (from: Record<string, any>, to: Record<string, any>, map?: ((str: string) => string) | undefined) => void;
|
60
|
+
export declare const toJSON: (node: PMNode) => {
|
61
|
+
attrs: Record<string, any>;
|
62
|
+
};
|