@atlaskit/adf-schema 24.0.0 → 24.0.1

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 (119) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/cjs/version.json +1 -1
  3. package/dist/es2019/version.json +1 -1
  4. package/dist/esm/version.json +1 -1
  5. package/dist/json-schema/package.json +8 -1
  6. package/dist/types-ts4.0/index.d.ts +4 -0
  7. package/dist/types-ts4.0/json-schema/index.d.ts +2 -0
  8. package/dist/types-ts4.0/schema/bitbucket-schema.d.ts +2 -0
  9. package/dist/types-ts4.0/schema/confluence-schema.d.ts +3 -0
  10. package/dist/types-ts4.0/schema/create-schema.d.ts +32 -0
  11. package/dist/types-ts4.0/schema/default-schema.d.ts +7 -0
  12. package/dist/types-ts4.0/schema/groups.d.ts +6 -0
  13. package/dist/types-ts4.0/schema/index.d.ts +7 -0
  14. package/dist/types-ts4.0/schema/inline-nodes.d.ts +1 -0
  15. package/dist/types-ts4.0/schema/jira-schema.d.ts +26 -0
  16. package/dist/types-ts4.0/schema/marks/alignment.d.ts +16 -0
  17. package/dist/types-ts4.0/schema/marks/annotation.d.ts +32 -0
  18. package/dist/types-ts4.0/schema/marks/breakout.d.ts +12 -0
  19. package/dist/types-ts4.0/schema/marks/code.d.ts +8 -0
  20. package/dist/types-ts4.0/schema/marks/confluence-inline-comment.d.ts +12 -0
  21. package/dist/types-ts4.0/schema/marks/data-consumer.d.ts +48 -0
  22. package/dist/types-ts4.0/schema/marks/em.d.ts +8 -0
  23. package/dist/types-ts4.0/schema/marks/fragment.d.ts +29 -0
  24. package/dist/types-ts4.0/schema/marks/indentation.d.ts +16 -0
  25. package/dist/types-ts4.0/schema/marks/index.d.ts +32 -0
  26. package/dist/types-ts4.0/schema/marks/link.d.ts +35 -0
  27. package/dist/types-ts4.0/schema/marks/strike.d.ts +8 -0
  28. package/dist/types-ts4.0/schema/marks/strong.d.ts +8 -0
  29. package/dist/types-ts4.0/schema/marks/subsup.d.ts +15 -0
  30. package/dist/types-ts4.0/schema/marks/text-color.d.ts +21 -0
  31. package/dist/types-ts4.0/schema/marks/type-ahead-query.d.ts +2 -0
  32. package/dist/types-ts4.0/schema/marks/underline.d.ts +8 -0
  33. package/dist/types-ts4.0/schema/marks/unsupported-mark.d.ts +2 -0
  34. package/dist/types-ts4.0/schema/marks/unsupported-node-attributes.d.ts +2 -0
  35. package/dist/types-ts4.0/schema/nodes/block-card.d.ts +22 -0
  36. package/dist/types-ts4.0/schema/nodes/blockquote.d.ts +14 -0
  37. package/dist/types-ts4.0/schema/nodes/bodied-extension.d.ts +24 -0
  38. package/dist/types-ts4.0/schema/nodes/bullet-list.d.ts +14 -0
  39. package/dist/types-ts4.0/schema/nodes/caption.d.ts +20 -0
  40. package/dist/types-ts4.0/schema/nodes/code-block.d.ts +31 -0
  41. package/dist/types-ts4.0/schema/nodes/confluence-jira-issue.d.ts +2 -0
  42. package/dist/types-ts4.0/schema/nodes/confluence-unsupported-block.d.ts +2 -0
  43. package/dist/types-ts4.0/schema/nodes/confluence-unsupported-inline.d.ts +2 -0
  44. package/dist/types-ts4.0/schema/nodes/date.d.ts +14 -0
  45. package/dist/types-ts4.0/schema/nodes/decision-item.d.ts +17 -0
  46. package/dist/types-ts4.0/schema/nodes/decision-list.d.ts +18 -0
  47. package/dist/types-ts4.0/schema/nodes/doc.d.ts +18 -0
  48. package/dist/types-ts4.0/schema/nodes/embed-card.d.ts +18 -0
  49. package/dist/types-ts4.0/schema/nodes/emoji.d.ts +14 -0
  50. package/dist/types-ts4.0/schema/nodes/expand.d.ts +33 -0
  51. package/dist/types-ts4.0/schema/nodes/extension.d.ts +18 -0
  52. package/dist/types-ts4.0/schema/nodes/hard-break.d.ts +11 -0
  53. package/dist/types-ts4.0/schema/nodes/heading.d.ts +36 -0
  54. package/dist/types-ts4.0/schema/nodes/image.d.ts +2 -0
  55. package/dist/types-ts4.0/schema/nodes/index.d.ts +93 -0
  56. package/dist/types-ts4.0/schema/nodes/inline-card.d.ts +10 -0
  57. package/dist/types-ts4.0/schema/nodes/inline-extension.d.ts +18 -0
  58. package/dist/types-ts4.0/schema/nodes/layout-column.d.ts +21 -0
  59. package/dist/types-ts4.0/schema/nodes/layout-section.d.ts +44 -0
  60. package/dist/types-ts4.0/schema/nodes/list-item.d.ts +20 -0
  61. package/dist/types-ts4.0/schema/nodes/media-group.d.ts +14 -0
  62. package/dist/types-ts4.0/schema/nodes/media-inline.d.ts +16 -0
  63. package/dist/types-ts4.0/schema/nodes/media-single.d.ts +61 -0
  64. package/dist/types-ts4.0/schema/nodes/media.d.ts +60 -0
  65. package/dist/types-ts4.0/schema/nodes/mention.d.ts +26 -0
  66. package/dist/types-ts4.0/schema/nodes/nested-expand.d.ts +27 -0
  67. package/dist/types-ts4.0/schema/nodes/ordered-list.d.ts +20 -0
  68. package/dist/types-ts4.0/schema/nodes/panel.d.ts +38 -0
  69. package/dist/types-ts4.0/schema/nodes/paragraph.d.ts +37 -0
  70. package/dist/types-ts4.0/schema/nodes/placeholder.d.ts +11 -0
  71. package/dist/types-ts4.0/schema/nodes/rule.d.ts +8 -0
  72. package/dist/types-ts4.0/schema/nodes/status.d.ts +20 -0
  73. package/dist/types-ts4.0/schema/nodes/tableNodes.d.ts +113 -0
  74. package/dist/types-ts4.0/schema/nodes/task-item.d.ts +17 -0
  75. package/dist/types-ts4.0/schema/nodes/task-list.d.ts +21 -0
  76. package/dist/types-ts4.0/schema/nodes/text.d.ts +15 -0
  77. package/dist/types-ts4.0/schema/nodes/types/block-content.d.ts +22 -0
  78. package/dist/types-ts4.0/schema/nodes/types/extensions.d.ts +34 -0
  79. package/dist/types-ts4.0/schema/nodes/types/inline-content.d.ts +32 -0
  80. package/dist/types-ts4.0/schema/nodes/types/mark.d.ts +15 -0
  81. package/dist/types-ts4.0/schema/nodes/types/non-nestable-block-content.d.ts +20 -0
  82. package/dist/types-ts4.0/schema/nodes/types/rich-media-common.d.ts +9 -0
  83. package/dist/types-ts4.0/schema/nodes/unknown-block.d.ts +3 -0
  84. package/dist/types-ts4.0/schema/nodes/unsupported-block.d.ts +2 -0
  85. package/dist/types-ts4.0/schema/nodes/unsupported-inline.d.ts +2 -0
  86. package/dist/types-ts4.0/schema/unsupported.d.ts +1 -0
  87. package/dist/types-ts4.0/steps/analytics.d.ts +59 -0
  88. package/dist/types-ts4.0/steps/set-attrs.d.ts +23 -0
  89. package/dist/types-ts4.0/steps/table/add-column.d.ts +88 -0
  90. package/dist/types-ts4.0/steps/table/constants.d.ts +4 -0
  91. package/dist/types-ts4.0/steps/table/sort-column.d.ts +18 -0
  92. package/dist/types-ts4.0/steps/table/types.d.ts +39 -0
  93. package/dist/types-ts4.0/steps/table/utils/cell-step.d.ts +51 -0
  94. package/dist/types-ts4.0/steps/table/utils/cells-at-column.d.ts +20 -0
  95. package/dist/types-ts4.0/steps/table/utils/find-column.d.ts +8 -0
  96. package/dist/types-ts4.0/steps/table/utils/get-table-rect-from-doc.d.ts +8 -0
  97. package/dist/types-ts4.0/steps/table/utils/side-effects/rows.d.ts +25 -0
  98. package/dist/types-ts4.0/steps/table/utils/side-effects/side-effects.d.ts +15 -0
  99. package/dist/types-ts4.0/steps/table/utils/side-effects/table.d.ts +16 -0
  100. package/dist/types-ts4.0/steps/table/utils/side-effects/types.d.ts +33 -0
  101. package/dist/types-ts4.0/steps/table/utils/table-map.d.ts +6 -0
  102. package/dist/types-ts4.0/steps/type-ahead.d.ts +35 -0
  103. package/dist/types-ts4.0/steps.d.ts +8 -0
  104. package/dist/types-ts4.0/utils/colors.d.ts +71 -0
  105. package/dist/types-ts4.0/utils/confluence/emoji.d.ts +50 -0
  106. package/dist/types-ts4.0/utils/extensions.d.ts +3 -0
  107. package/dist/types-ts4.0/utils/index.d.ts +6 -0
  108. package/dist/types-ts4.0/utils/parseDOM.d.ts +1 -0
  109. package/dist/types-ts4.0/utils/url.d.ts +23 -0
  110. package/dist/types-ts4.0/utils/uuid.d.ts +5 -0
  111. package/json-schema/package.json +8 -1
  112. package/package.json +10 -3
  113. package/schema/package.json +8 -1
  114. package/schema-bitbucket/package.json +8 -1
  115. package/schema-confluence/package.json +8 -1
  116. package/schema-default/package.json +8 -1
  117. package/schema-jira/package.json +8 -1
  118. package/steps/package.json +8 -1
  119. package/url/package.json +8 -1
@@ -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 declare 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 declare type CodeBlockAttrs = {
18
+ language?: string;
19
+ };
20
+ /**
21
+ * @name codeBlock_with_no_marks_node
22
+ */
23
+ export declare type CodeBlockDefinition = CodeBlockBaseDefinition & NoMark;
24
+ /**
25
+ * @name codeBlock_with_marks_node
26
+ */
27
+ export declare 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,2 @@
1
+ import { NodeSpec } from 'prosemirror-model';
2
+ export declare const confluenceJiraIssue: NodeSpec;
@@ -0,0 +1,2 @@
1
+ import { NodeSpec } from 'prosemirror-model';
2
+ export declare const confluenceUnsupportedBlock: NodeSpec;
@@ -0,0 +1,2 @@
1
+ import { NodeSpec } from 'prosemirror-model';
2
+ export declare const confluenceUnsupportedInline: NodeSpec;
@@ -0,0 +1,14 @@
1
+ import { NodeSpec } from 'prosemirror-model';
2
+ /**
3
+ * @name date_node
4
+ */
5
+ export interface DateDefinition {
6
+ type: 'date';
7
+ attrs: {
8
+ /**
9
+ * @minLength 1
10
+ */
11
+ timestamp: string;
12
+ };
13
+ }
14
+ export declare const date: NodeSpec;
@@ -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 declare type ExpandDefinition = ExpandBaseDefinition & NoMark;
24
+ /**
25
+ * @name expand_with_breakout_mark_node
26
+ */
27
+ export declare 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 declare type ExtensionDefinition = ExtensionBaseDefinition & MarksObject<DataConsumerDefinition | FragmentDefinition>;
18
+ export declare const extension: NodeSpec;
@@ -0,0 +1,11 @@
1
+ import { NodeSpec } from 'prosemirror-model';
2
+ /**
3
+ * @name hardBreak_node
4
+ */
5
+ export interface HardBreakDefinition {
6
+ type: 'hardBreak';
7
+ attrs?: {
8
+ text?: '\n';
9
+ };
10
+ }
11
+ export declare const hardBreak: 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 declare type HeadingDefinition = HeadingBaseDefinition & NoMark;
27
+ /**
28
+ * @name heading_with_alignment_node
29
+ */
30
+ export declare type HeadingWithAlignmentDefinition = HeadingBaseDefinition & MarksObject<AlignmentMarkDefinition>;
31
+ /**
32
+ * @name heading_with_indentation_node
33
+ */
34
+ export declare type HeadingWithIndentationDefinition = HeadingBaseDefinition & MarksObject<IndentationMarkDefinition>;
35
+ export declare type HeadingWithMarksDefinition = HeadingWithAlignmentDefinition | HeadingWithIndentationDefinition;
36
+ export declare const heading: NodeSpec;
@@ -0,0 +1,2 @@
1
+ import { NodeSpec } from 'prosemirror-model';
2
+ export declare const image: 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 './bullet-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 } from './ordered-list';
21
+ export type { OrderedListDefinition } from './ordered-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 './list-item';
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 declare 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 declare 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 declare 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 declare 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 declare type LayoutSectionDefinition = LayoutSectionFullDefinition | LayoutSectionWithSingleColumnDefinition;
43
+ export declare const layoutSection: NodeSpec;
44
+ export declare const layoutSectionWithSingleColumn: NodeSpec;
@@ -0,0 +1,20 @@
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 { MediaSingleDefinition as MediaSingle } from './media-single';
6
+ import { CodeBlockDefinition as CodeBlock } from './code-block';
7
+ export interface ListItemArray extends Array<Paragraph | OrderedList | BulletList | MediaSingle | CodeBlock> {
8
+ 0: Paragraph | MediaSingle | CodeBlock;
9
+ }
10
+ /**
11
+ * @name listItem_node
12
+ */
13
+ export interface ListItemDefinition {
14
+ type: 'listItem';
15
+ /**
16
+ * @minItems 1
17
+ */
18
+ content: ListItemArray;
19
+ }
20
+ export declare const listItem: 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 declare 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 MediaSingleFullContent {
20
+ /**
21
+ * @minItems 1
22
+ * @maxItems 1
23
+ * @allowUnsupportedBlock true
24
+ */
25
+ content: Array<Media>;
26
+ }
27
+ /**
28
+ * @name mediaSingle_full_node
29
+ */
30
+ export declare type MediaSingleFullDefinition = MediaSingleBaseDefinition & MediaSingleFullContent;
31
+ /**
32
+ * @additionalProperties true
33
+ */
34
+ export interface MediaCaptionContent {
35
+ /**
36
+ * @minItems 1
37
+ * @maxItems 2
38
+ * @allowUnsupportedBlock true
39
+ */
40
+ content: [
41
+ Media,
42
+ Caption?
43
+ ];
44
+ }
45
+ /**
46
+ * @name mediaSingle_caption_node
47
+ */
48
+ export declare type MediaSingleWithCaptionDefinition = MediaSingleBaseDefinition & MediaCaptionContent;
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,60 @@
1
+ import { NodeSpec, Node as PMNode } from 'prosemirror-model';
2
+ import { LinkDefinition } from '../marks/link';
3
+ export declare type MediaType = 'file' | 'link' | 'external';
4
+ export declare type DisplayType = 'file' | 'thumbnail';
5
+ export declare type DefaultAttributes<T> = {
6
+ [P in keyof T]: {
7
+ default?: T[P] | null;
8
+ };
9
+ };
10
+ /**
11
+ * @name media_node
12
+ */
13
+ export interface MediaDefinition {
14
+ type: 'media';
15
+ /**
16
+ * @minItems 1
17
+ */
18
+ attrs: MediaADFAttrs;
19
+ marks?: Array<LinkDefinition>;
20
+ }
21
+ export interface MediaBaseAttributes {
22
+ /**
23
+ * @minLength 1
24
+ */
25
+ id: string;
26
+ collection: string;
27
+ height?: number;
28
+ width?: number;
29
+ /**
30
+ * @minLength 1
31
+ */
32
+ occurrenceKey?: string;
33
+ alt?: string;
34
+ __fileName?: string | null;
35
+ __fileSize?: number | null;
36
+ __fileMimeType?: string | null;
37
+ __displayType?: DisplayType | null;
38
+ __contextId?: string | null;
39
+ __external?: boolean;
40
+ }
41
+ export interface MediaAttributes extends MediaBaseAttributes {
42
+ type: 'file' | 'link';
43
+ }
44
+ export interface ExternalMediaAttributes {
45
+ type: 'external';
46
+ url: string;
47
+ alt?: string;
48
+ width?: number;
49
+ height?: number;
50
+ __external?: boolean;
51
+ }
52
+ export declare type MediaADFAttrs = MediaAttributes | ExternalMediaAttributes;
53
+ export declare const defaultAttrs: DefaultAttributes<MediaADFAttrs>;
54
+ export declare const createMediaSpec: (attributes: Partial<NodeSpec['attrs']>, inline?: boolean) => NodeSpec;
55
+ export declare const media: NodeSpec;
56
+ export declare const camelCaseToKebabCase: (str: string) => string;
57
+ export declare const copyPrivateAttributes: (from: Record<string, any>, to: Record<string, any>, map?: ((str: string) => string) | undefined) => void;
58
+ export declare const toJSON: (node: PMNode) => {
59
+ attrs: Record<string, any>;
60
+ };
@@ -0,0 +1,26 @@
1
+ import { NodeSpec, Node as PMNode } from 'prosemirror-model';
2
+ export declare enum USER_TYPES {
3
+ DEFAULT = "DEFAULT",
4
+ SPECIAL = "SPECIAL",
5
+ APP = "APP"
6
+ }
7
+ export declare type UserType = keyof typeof USER_TYPES;
8
+ export interface MentionAttributes {
9
+ id: string;
10
+ text?: string;
11
+ userType?: UserType;
12
+ accessLevel?: string;
13
+ }
14
+ /**
15
+ * @name mention_node
16
+ */
17
+ export interface MentionDefinition {
18
+ type: 'mention';
19
+ attrs: MentionAttributes;
20
+ }
21
+ export declare const mention: NodeSpec;
22
+ export declare const toJSON: (node: PMNode) => {
23
+ attrs: {
24
+ [key: string]: any;
25
+ };
26
+ };