@atlaskit/adf-schema 23.3.1 → 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 (131) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/cjs/schema/confluence-schema.js +1 -1
  3. package/dist/cjs/schema/jira-schema.js +2 -2
  4. package/dist/cjs/schema/nodes/media.js +2 -1
  5. package/dist/cjs/schema/nodes/tableNodes.js +1 -1
  6. package/dist/cjs/version.json +1 -1
  7. package/dist/es2019/schema/confluence-schema.js +1 -1
  8. package/dist/es2019/schema/jira-schema.js +2 -2
  9. package/dist/es2019/schema/nodes/media.js +2 -1
  10. package/dist/es2019/schema/nodes/tableNodes.js +1 -1
  11. package/dist/es2019/version.json +1 -1
  12. package/dist/esm/schema/confluence-schema.js +1 -1
  13. package/dist/esm/schema/jira-schema.js +2 -2
  14. package/dist/esm/schema/nodes/media.js +2 -1
  15. package/dist/esm/schema/nodes/tableNodes.js +1 -1
  16. package/dist/esm/version.json +1 -1
  17. package/dist/json-schema/package.json +8 -1
  18. package/dist/types-ts4.0/index.d.ts +4 -0
  19. package/dist/types-ts4.0/json-schema/index.d.ts +2 -0
  20. package/dist/types-ts4.0/schema/bitbucket-schema.d.ts +2 -0
  21. package/dist/types-ts4.0/schema/confluence-schema.d.ts +3 -0
  22. package/dist/types-ts4.0/schema/create-schema.d.ts +32 -0
  23. package/dist/types-ts4.0/schema/default-schema.d.ts +7 -0
  24. package/dist/types-ts4.0/schema/groups.d.ts +6 -0
  25. package/dist/types-ts4.0/schema/index.d.ts +7 -0
  26. package/dist/types-ts4.0/schema/inline-nodes.d.ts +1 -0
  27. package/dist/types-ts4.0/schema/jira-schema.d.ts +26 -0
  28. package/dist/types-ts4.0/schema/marks/alignment.d.ts +16 -0
  29. package/dist/types-ts4.0/schema/marks/annotation.d.ts +32 -0
  30. package/dist/types-ts4.0/schema/marks/breakout.d.ts +12 -0
  31. package/dist/types-ts4.0/schema/marks/code.d.ts +8 -0
  32. package/dist/types-ts4.0/schema/marks/confluence-inline-comment.d.ts +12 -0
  33. package/dist/types-ts4.0/schema/marks/data-consumer.d.ts +48 -0
  34. package/dist/types-ts4.0/schema/marks/em.d.ts +8 -0
  35. package/dist/types-ts4.0/schema/marks/fragment.d.ts +29 -0
  36. package/dist/types-ts4.0/schema/marks/indentation.d.ts +16 -0
  37. package/dist/types-ts4.0/schema/marks/index.d.ts +32 -0
  38. package/dist/types-ts4.0/schema/marks/link.d.ts +35 -0
  39. package/dist/types-ts4.0/schema/marks/strike.d.ts +8 -0
  40. package/dist/types-ts4.0/schema/marks/strong.d.ts +8 -0
  41. package/dist/types-ts4.0/schema/marks/subsup.d.ts +15 -0
  42. package/dist/types-ts4.0/schema/marks/text-color.d.ts +21 -0
  43. package/dist/types-ts4.0/schema/marks/type-ahead-query.d.ts +2 -0
  44. package/dist/types-ts4.0/schema/marks/underline.d.ts +8 -0
  45. package/dist/types-ts4.0/schema/marks/unsupported-mark.d.ts +2 -0
  46. package/dist/types-ts4.0/schema/marks/unsupported-node-attributes.d.ts +2 -0
  47. package/dist/types-ts4.0/schema/nodes/block-card.d.ts +22 -0
  48. package/dist/types-ts4.0/schema/nodes/blockquote.d.ts +14 -0
  49. package/dist/types-ts4.0/schema/nodes/bodied-extension.d.ts +24 -0
  50. package/dist/types-ts4.0/schema/nodes/bullet-list.d.ts +14 -0
  51. package/dist/types-ts4.0/schema/nodes/caption.d.ts +20 -0
  52. package/dist/types-ts4.0/schema/nodes/code-block.d.ts +31 -0
  53. package/dist/types-ts4.0/schema/nodes/confluence-jira-issue.d.ts +2 -0
  54. package/dist/types-ts4.0/schema/nodes/confluence-unsupported-block.d.ts +2 -0
  55. package/dist/types-ts4.0/schema/nodes/confluence-unsupported-inline.d.ts +2 -0
  56. package/dist/types-ts4.0/schema/nodes/date.d.ts +14 -0
  57. package/dist/types-ts4.0/schema/nodes/decision-item.d.ts +17 -0
  58. package/dist/types-ts4.0/schema/nodes/decision-list.d.ts +18 -0
  59. package/dist/types-ts4.0/schema/nodes/doc.d.ts +18 -0
  60. package/dist/types-ts4.0/schema/nodes/embed-card.d.ts +18 -0
  61. package/dist/types-ts4.0/schema/nodes/emoji.d.ts +14 -0
  62. package/dist/types-ts4.0/schema/nodes/expand.d.ts +33 -0
  63. package/dist/types-ts4.0/schema/nodes/extension.d.ts +18 -0
  64. package/dist/types-ts4.0/schema/nodes/hard-break.d.ts +11 -0
  65. package/dist/types-ts4.0/schema/nodes/heading.d.ts +36 -0
  66. package/dist/types-ts4.0/schema/nodes/image.d.ts +2 -0
  67. package/dist/types-ts4.0/schema/nodes/index.d.ts +93 -0
  68. package/dist/types-ts4.0/schema/nodes/inline-card.d.ts +10 -0
  69. package/dist/types-ts4.0/schema/nodes/inline-extension.d.ts +18 -0
  70. package/dist/types-ts4.0/schema/nodes/layout-column.d.ts +21 -0
  71. package/dist/types-ts4.0/schema/nodes/layout-section.d.ts +44 -0
  72. package/dist/types-ts4.0/schema/nodes/list-item.d.ts +20 -0
  73. package/dist/types-ts4.0/schema/nodes/media-group.d.ts +14 -0
  74. package/dist/types-ts4.0/schema/nodes/media-inline.d.ts +16 -0
  75. package/dist/types-ts4.0/schema/nodes/media-single.d.ts +61 -0
  76. package/dist/types-ts4.0/schema/nodes/media.d.ts +60 -0
  77. package/dist/types-ts4.0/schema/nodes/mention.d.ts +26 -0
  78. package/dist/types-ts4.0/schema/nodes/nested-expand.d.ts +27 -0
  79. package/dist/types-ts4.0/schema/nodes/ordered-list.d.ts +20 -0
  80. package/dist/types-ts4.0/schema/nodes/panel.d.ts +38 -0
  81. package/dist/types-ts4.0/schema/nodes/paragraph.d.ts +37 -0
  82. package/dist/types-ts4.0/schema/nodes/placeholder.d.ts +11 -0
  83. package/dist/types-ts4.0/schema/nodes/rule.d.ts +8 -0
  84. package/dist/types-ts4.0/schema/nodes/status.d.ts +20 -0
  85. package/dist/types-ts4.0/schema/nodes/tableNodes.d.ts +113 -0
  86. package/dist/types-ts4.0/schema/nodes/task-item.d.ts +17 -0
  87. package/dist/types-ts4.0/schema/nodes/task-list.d.ts +21 -0
  88. package/dist/types-ts4.0/schema/nodes/text.d.ts +15 -0
  89. package/dist/types-ts4.0/schema/nodes/types/block-content.d.ts +22 -0
  90. package/dist/types-ts4.0/schema/nodes/types/extensions.d.ts +34 -0
  91. package/dist/types-ts4.0/schema/nodes/types/inline-content.d.ts +32 -0
  92. package/dist/types-ts4.0/schema/nodes/types/mark.d.ts +15 -0
  93. package/dist/types-ts4.0/schema/nodes/types/non-nestable-block-content.d.ts +20 -0
  94. package/dist/types-ts4.0/schema/nodes/types/rich-media-common.d.ts +9 -0
  95. package/dist/types-ts4.0/schema/nodes/unknown-block.d.ts +3 -0
  96. package/dist/types-ts4.0/schema/nodes/unsupported-block.d.ts +2 -0
  97. package/dist/types-ts4.0/schema/nodes/unsupported-inline.d.ts +2 -0
  98. package/dist/types-ts4.0/schema/unsupported.d.ts +1 -0
  99. package/dist/types-ts4.0/steps/analytics.d.ts +59 -0
  100. package/dist/types-ts4.0/steps/set-attrs.d.ts +23 -0
  101. package/dist/types-ts4.0/steps/table/add-column.d.ts +88 -0
  102. package/dist/types-ts4.0/steps/table/constants.d.ts +4 -0
  103. package/dist/types-ts4.0/steps/table/sort-column.d.ts +18 -0
  104. package/dist/types-ts4.0/steps/table/types.d.ts +39 -0
  105. package/dist/types-ts4.0/steps/table/utils/cell-step.d.ts +51 -0
  106. package/dist/types-ts4.0/steps/table/utils/cells-at-column.d.ts +20 -0
  107. package/dist/types-ts4.0/steps/table/utils/find-column.d.ts +8 -0
  108. package/dist/types-ts4.0/steps/table/utils/get-table-rect-from-doc.d.ts +8 -0
  109. package/dist/types-ts4.0/steps/table/utils/side-effects/rows.d.ts +25 -0
  110. package/dist/types-ts4.0/steps/table/utils/side-effects/side-effects.d.ts +15 -0
  111. package/dist/types-ts4.0/steps/table/utils/side-effects/table.d.ts +16 -0
  112. package/dist/types-ts4.0/steps/table/utils/side-effects/types.d.ts +33 -0
  113. package/dist/types-ts4.0/steps/table/utils/table-map.d.ts +6 -0
  114. package/dist/types-ts4.0/steps/type-ahead.d.ts +35 -0
  115. package/dist/types-ts4.0/steps.d.ts +8 -0
  116. package/dist/types-ts4.0/utils/colors.d.ts +71 -0
  117. package/dist/types-ts4.0/utils/confluence/emoji.d.ts +50 -0
  118. package/dist/types-ts4.0/utils/extensions.d.ts +3 -0
  119. package/dist/types-ts4.0/utils/index.d.ts +6 -0
  120. package/dist/types-ts4.0/utils/parseDOM.d.ts +1 -0
  121. package/dist/types-ts4.0/utils/url.d.ts +23 -0
  122. package/dist/types-ts4.0/utils/uuid.d.ts +5 -0
  123. package/json-schema/package.json +8 -1
  124. package/package.json +11 -4
  125. package/schema/package.json +8 -1
  126. package/schema-bitbucket/package.json +8 -1
  127. package/schema-confluence/package.json +8 -1
  128. package/schema-default/package.json +8 -1
  129. package/schema-jira/package.json +8 -1
  130. package/steps/package.json +8 -1
  131. package/url/package.json +8 -1
@@ -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
+ };
@@ -0,0 +1,27 @@
1
+ import { NodeSpec } from 'prosemirror-model';
2
+ import { NoMark } from './types/mark';
3
+ import { ParagraphDefinition as Paragraph } from './paragraph';
4
+ import { HeadingDefinition as Heading } from './heading';
5
+ import { MediaSingleDefinition as MediaSingle } from './media-single';
6
+ import { MediaGroupDefinition as MediaGroup } from './media-group';
7
+ /**
8
+ * @name nestedExpand_content
9
+ * @minItems 1
10
+ * @allowUnsupportedBlock true
11
+ */
12
+ export declare type NestedExpandContent = Array<Paragraph | Heading | MediaSingle | MediaGroup>;
13
+ /**
14
+ * @name nestedExpand_node
15
+ */
16
+ export interface NestedExpandBaseDefinition {
17
+ type: 'nestedExpand';
18
+ attrs: {
19
+ title?: string;
20
+ };
21
+ content: NestedExpandContent;
22
+ }
23
+ /**
24
+ * @name nestedExpand_with_no_marks_node
25
+ */
26
+ export declare type NestedExpandDefinition = NestedExpandBaseDefinition & NoMark;
27
+ export declare const nestedExpand: NodeSpec;
@@ -0,0 +1,20 @@
1
+ import { NodeSpec } from 'prosemirror-model';
2
+ import { ListItemDefinition as ListItemNode } from './list-item';
3
+ /**
4
+ * @name orderedList_node
5
+ */
6
+ export interface OrderedListDefinition {
7
+ type: 'orderedList';
8
+ /**
9
+ * @minItems 1
10
+ */
11
+ content: Array<ListItemNode>;
12
+ attrs?: {
13
+ /**
14
+ * @minimum 1
15
+ */
16
+ order: number;
17
+ };
18
+ }
19
+ export declare const orderedListSelector = ".ak-ol";
20
+ export declare const orderedList: NodeSpec;
@@ -0,0 +1,38 @@
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;
@@ -0,0 +1,37 @@
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;
@@ -0,0 +1,11 @@
1
+ import { NodeSpec } from 'prosemirror-model';
2
+ /**
3
+ * @name placeholder_node
4
+ */
5
+ export interface PlaceholderDefinition {
6
+ type: 'placeholder';
7
+ attrs: {
8
+ text: string;
9
+ };
10
+ }
11
+ export declare const placeholder: NodeSpec;
@@ -0,0 +1,8 @@
1
+ import { NodeSpec } from 'prosemirror-model';
2
+ /**
3
+ * @name rule_node
4
+ */
5
+ export interface RuleDefinition {
6
+ type: 'rule';
7
+ }
8
+ export declare const rule: NodeSpec;
@@ -0,0 +1,20 @@
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;
@@ -0,0 +1,113 @@
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
+ };
@@ -0,0 +1,17 @@
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;
@@ -0,0 +1,21 @@
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;
@@ -0,0 +1,15 @@
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
+ };
@@ -0,0 +1,22 @@
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;
@@ -0,0 +1,34 @@
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
+ }
@@ -0,0 +1,32 @@
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;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * @additionalProperties true
3
+ */
4
+ export interface MarksObject<T> {
5
+ marks?: Array<T>;
6
+ }
7
+ /**
8
+ * @additionalProperties true
9
+ */
10
+ export interface NoMark {
11
+ /**
12
+ * @maxItems 0
13
+ */
14
+ marks?: Array<any>;
15
+ }
@@ -0,0 +1,20 @@
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;
@@ -0,0 +1,9 @@
1
+ export declare type Layout = 'wrap-right' | 'center' | 'wrap-left' | 'wide' | 'full-width' | 'align-end' | 'align-start';
2
+ export interface RichMediaAttributes {
3
+ /**
4
+ * @minimum 0
5
+ * @maximum 100
6
+ */
7
+ width?: number;
8
+ layout: Layout;
9
+ }
@@ -0,0 +1,3 @@
1
+ import { NodeSpec } from 'prosemirror-model';
2
+ declare const _default: NodeSpec;
3
+ export default _default;
@@ -0,0 +1,2 @@
1
+ import { NodeSpec } from 'prosemirror-model';
2
+ export declare const unsupportedBlock: NodeSpec;
@@ -0,0 +1,2 @@
1
+ import { NodeSpec } from 'prosemirror-model';
2
+ export declare const unsupportedInline: NodeSpec;
@@ -0,0 +1 @@
1
+ export declare const unsupportedNodeTypesForMediaCards: Set<string>;