@atlaskit/adf-schema 52.7.1 → 52.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/dist/cjs/index.js +6 -0
- package/dist/cjs/next-schema/full-schema.adf.js +1 -1
- package/dist/cjs/next-schema/generated/nodeTypes.js +56 -27
- package/dist/cjs/next-schema/groups/blockContentGroup.js +1 -1
- package/dist/cjs/next-schema/groups/blockGroup.js +1 -1
- package/dist/cjs/next-schema/groups/nonNestableBlockContentGroup.js +1 -1
- package/dist/cjs/next-schema/groups/tableCellContentPseudoGroup.js +1 -1
- package/dist/cjs/next-schema/marks/fontSize.js +1 -2
- package/dist/cjs/next-schema/nodes/bodiedSyncBlock.js +1 -1
- package/dist/cjs/next-schema/nodes/codeBlock.js +65 -0
- package/dist/cjs/next-schema/nodes/paragraph.js +3 -14
- package/dist/cjs/schema/createPMSpecFactory.js +4 -0
- package/dist/cjs/schema/default-schema.js +3 -6
- package/dist/cjs/schema/index.js +6 -0
- package/dist/cjs/schema/nodes/code-block.js +110 -2
- package/dist/cjs/schema/nodes/index.js +6 -0
- package/dist/cjs/validator-schema/generated/validatorSpec.js +867 -822
- package/dist/es2019/index.js +1 -1
- package/dist/es2019/next-schema/full-schema.adf.js +1 -1
- package/dist/es2019/next-schema/generated/nodeTypes.js +55 -26
- package/dist/es2019/next-schema/groups/blockContentGroup.js +1 -1
- package/dist/es2019/next-schema/groups/blockGroup.js +1 -1
- package/dist/es2019/next-schema/groups/nonNestableBlockContentGroup.js +1 -1
- package/dist/es2019/next-schema/groups/tableCellContentPseudoGroup.js +1 -1
- package/dist/es2019/next-schema/marks/fontSize.js +1 -2
- package/dist/es2019/next-schema/nodes/bodiedSyncBlock.js +1 -1
- package/dist/es2019/next-schema/nodes/codeBlock.js +65 -0
- package/dist/es2019/next-schema/nodes/paragraph.js +3 -14
- package/dist/es2019/schema/createPMSpecFactory.js +4 -0
- package/dist/es2019/schema/default-schema.js +4 -7
- package/dist/es2019/schema/index.js +1 -1
- package/dist/es2019/schema/nodes/code-block.js +107 -3
- package/dist/es2019/schema/nodes/index.js +1 -1
- package/dist/es2019/validator-schema/generated/validatorSpec.js +866 -821
- package/dist/esm/index.js +1 -1
- package/dist/esm/next-schema/full-schema.adf.js +1 -1
- package/dist/esm/next-schema/generated/nodeTypes.js +55 -26
- package/dist/esm/next-schema/groups/blockContentGroup.js +1 -1
- package/dist/esm/next-schema/groups/blockGroup.js +1 -1
- package/dist/esm/next-schema/groups/nonNestableBlockContentGroup.js +1 -1
- package/dist/esm/next-schema/groups/tableCellContentPseudoGroup.js +1 -1
- package/dist/esm/next-schema/marks/fontSize.js +1 -2
- package/dist/esm/next-schema/nodes/bodiedSyncBlock.js +1 -1
- package/dist/esm/next-schema/nodes/codeBlock.js +65 -0
- package/dist/esm/next-schema/nodes/paragraph.js +3 -14
- package/dist/esm/schema/createPMSpecFactory.js +4 -0
- package/dist/esm/schema/default-schema.js +4 -7
- package/dist/esm/schema/index.js +1 -1
- package/dist/esm/schema/nodes/code-block.js +109 -2
- package/dist/esm/schema/nodes/index.js +1 -1
- package/dist/esm/validator-schema/generated/validatorSpec.js +866 -821
- package/dist/json-schema/v1/full.json +73 -2
- package/dist/json-schema/v1/stage-0.json +107 -67
- package/dist/types/index.d.ts +1 -1
- package/dist/types/next-schema/generated/markTypes.d.ts +22 -21
- package/dist/types/next-schema/generated/nodeGroupTypes.d.ts +3 -3
- package/dist/types/next-schema/generated/nodeTypes.d.ts +128 -118
- package/dist/types/next-schema/nodes/codeBlock.d.ts +3 -1
- package/dist/types/next-schema/nodes/paragraph.d.ts +1 -14
- package/dist/types/schema/createPMSpecFactory.d.ts +4 -0
- package/dist/types/schema/index.d.ts +1 -1
- package/dist/types/schema/nodes/code-block.d.ts +10 -0
- package/dist/types/schema/nodes/index.d.ts +1 -1
- package/dist/types/validator-schema/generated/validatorSpec.d.ts +697 -652
- package/dist/types-ts4.5/index.d.ts +1 -1
- package/dist/types-ts4.5/next-schema/generated/markTypes.d.ts +22 -21
- package/dist/types-ts4.5/next-schema/generated/nodeGroupTypes.d.ts +3 -3
- package/dist/types-ts4.5/next-schema/generated/nodeTypes.d.ts +128 -118
- package/dist/types-ts4.5/next-schema/nodes/codeBlock.d.ts +3 -1
- package/dist/types-ts4.5/next-schema/nodes/paragraph.d.ts +1 -14
- package/dist/types-ts4.5/schema/createPMSpecFactory.d.ts +4 -0
- package/dist/types-ts4.5/schema/index.d.ts +1 -1
- package/dist/types-ts4.5/schema/nodes/code-block.d.ts +10 -0
- package/dist/types-ts4.5/schema/nodes/index.d.ts +1 -1
- package/dist/types-ts4.5/validator-schema/generated/validatorSpec.d.ts +697 -652
- package/json-schema/v1/full.json +73 -2
- package/json-schema/v1/stage-0.json +107 -67
- package/package.json +2 -2
- package/schema-generators/validator-full-schema.ts +59 -1
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { ADFCommonNodeSpec, ADFNode } from '@atlaskit/adf-schema-generator';
|
|
2
2
|
export declare const codeBlock: ADFNode<[
|
|
3
3
|
string,
|
|
4
|
-
'root_only'
|
|
4
|
+
'root_only',
|
|
5
|
+
'with_extended_attributes',
|
|
6
|
+
'root_only_with_extended_attributes'
|
|
5
7
|
], ADFCommonNodeSpec & {
|
|
6
8
|
marks: any[];
|
|
7
9
|
noExtend: true;
|
|
@@ -5,9 +5,7 @@ export declare const paragraph: ADFNode<[
|
|
|
5
5
|
'with_indentation',
|
|
6
6
|
'with_marks',
|
|
7
7
|
'with_no_marks',
|
|
8
|
-
'with_font_size'
|
|
9
|
-
'with_font_size_and_alignment',
|
|
10
|
-
'with_font_size_and_indentation'
|
|
8
|
+
'with_font_size'
|
|
11
9
|
], ADFCommonNodeSpec & {
|
|
12
10
|
content: never[];
|
|
13
11
|
ignore: never[];
|
|
@@ -29,15 +27,4 @@ export declare const paragraph: ADFNode<[
|
|
|
29
27
|
content: never[];
|
|
30
28
|
ignore: never[];
|
|
31
29
|
marks: any[];
|
|
32
|
-
stage0: true;
|
|
33
|
-
} & {
|
|
34
|
-
content: never[];
|
|
35
|
-
ignore: never[];
|
|
36
|
-
marks: any[];
|
|
37
|
-
stage0: true;
|
|
38
|
-
} & {
|
|
39
|
-
content: never[];
|
|
40
|
-
ignore: never[];
|
|
41
|
-
marks: any[];
|
|
42
|
-
stage0: true;
|
|
43
30
|
}>;
|
|
@@ -11,6 +11,10 @@ export type MarkSpecOptions<M extends Mark> = {
|
|
|
11
11
|
toDOM?: (mark: M, inline: boolean) => DOMOutputSpec;
|
|
12
12
|
};
|
|
13
13
|
export type MarkSpecFactory = typeof createPMMarkSpecFactory;
|
|
14
|
+
/** Result of calling {@link createPMMarkSpecFactory} with a concrete mark spec (for isolated declarations). */
|
|
15
|
+
export type PMMarkSpecFactoryInstance<M extends Omit<Mark, 'toDOM' | 'parseDOM'> = Mark> = (options: MarkSpecOptions<M>) => MarkSpec;
|
|
16
|
+
/** Result of calling {@link createPMNodeSpecFactory} with a concrete node spec (for isolated declarations). */
|
|
17
|
+
export type PMNodeSpecFactoryInstance<N extends Omit<PMNode, 'toDOM' | 'parseDOM'> = PMNode> = (options: NodeSpecOptions<N>) => NodeSpec;
|
|
14
18
|
/**
|
|
15
19
|
* Factory method to attach custom parseDOM and/or toDOM for nodeSpec
|
|
16
20
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { PanelType, blockCard, blockCardWithLocalId, blockquote, extendedBlockquote, extendedBlockquoteWithLocalId, bodiedExtension, bulletList, bulletListSelector, bulletListWithLocalId, caption, captionWithLocalId, codeBlock, codeBlockWithLocalId, codeBlockToJSON, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, date, dateWithLocalId, decisionItem, decisionList, decisionListSelector, doc, embedCard, embedCardWithLocalId, emoji, emojiWithLocalId, expandWithNestedExpand, expandWithNestedExpandLocalId, expandToJSON, extension, hardBreak, heading, image, inlineCard, inlineCardWithLocalId, inlineExtension, layoutColumn, layoutColumnWithLocalId, layoutSection, layoutSectionWithLocalId, layoutSectionWithSingleColumn, layoutSectionWithSingleColumnLocalId, listItem, listItemWithLocalId, media, mediaGroup, mediaSingle, mediaSingleSpec, mediaInline, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleFullWithLocalId, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, nestedExpandWithLocalId, orderedList, orderedListSelector, orderedListWithLocalId, orderedListWithOrder, orderedListWithOrderAndLocalId, extendedPanel, extendedPanelWithLocalId, paragraph, placeholder, placeholderWithLocalId, rule, ruleWithLocalId, getCellAttrs, getCellDomAttrs, status, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, blockTaskItem, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline, extensionFrame, multiBodiedExtension, syncBlock, bodiedSyncBlock, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId, tableRowWithNestedTableWithLocalId, tableCellWithNestedTableWithLocalId, tableHeaderWithNestedTableWithLocalId, } from './nodes';
|
|
1
|
+
export { PanelType, blockCard, blockCardWithLocalId, blockquote, extendedBlockquote, extendedBlockquoteWithLocalId, bodiedExtension, bulletList, bulletListSelector, bulletListWithLocalId, caption, captionWithLocalId, codeBlock, codeBlockWithLocalId, codeBlockWithExtendedAttributes, codeBlockToJSON, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, date, dateWithLocalId, decisionItem, decisionList, decisionListSelector, doc, embedCard, embedCardWithLocalId, emoji, emojiWithLocalId, expandWithNestedExpand, expandWithNestedExpandLocalId, expandToJSON, extension, hardBreak, heading, image, inlineCard, inlineCardWithLocalId, inlineExtension, layoutColumn, layoutColumnWithLocalId, layoutSection, layoutSectionWithLocalId, layoutSectionWithSingleColumn, layoutSectionWithSingleColumnLocalId, listItem, listItemWithLocalId, media, mediaGroup, mediaSingle, mediaSingleSpec, mediaInline, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleFullWithLocalId, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, nestedExpandWithLocalId, orderedList, orderedListSelector, orderedListWithLocalId, orderedListWithOrder, orderedListWithOrderAndLocalId, extendedPanel, extendedPanelWithLocalId, paragraph, placeholder, placeholderWithLocalId, rule, ruleWithLocalId, getCellAttrs, getCellDomAttrs, status, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, blockTaskItem, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline, extensionFrame, multiBodiedExtension, syncBlock, bodiedSyncBlock, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId, tableRowWithNestedTableWithLocalId, tableCellWithNestedTableWithLocalId, tableHeaderWithNestedTableWithLocalId, } from './nodes';
|
|
2
2
|
export type { BlockCardDefinition, BlockContent, BlockQuoteDefinition, BodiedExtensionDefinition, BulletListDefinition, CaptionDefinition, CardAttributes, CellAttributes, CodeBlockAttrs, CodeBlockBaseDefinition, CodeBlockDefinition, CodeBlockWithMarksDefinition, DatasourceAttributes, DatasourceAttributeProperties, DataType, DateDefinition, DecisionItemDefinition, DecisionListDefinition, DocNode, EmbedCardDefinition, EmbedCardAttributes, EmojiAttributes, EmojiDefinition, ExpandDefinition, ExtensionDefinition, ExtensionLayout, ExternalMediaAttributes, HardBreakDefinition, HeadingBaseDefinition, HeadingDefinition, HeadingWithAlignmentDefinition, HeadingWithIndentationDefinition, HeadingWithMarksDefinition, Inline, InlineCardDefinition, InlineCode, InlineExtensionDefinition, InlineFormattedText, InlineLinkText, LayoutColumnDefinition, LayoutSectionDefinition, LayoutSectionBaseDefinition, LayoutSectionFullDefinition, LayoutSectionWithSingleColumnDefinition, ListItemArray, ListItemDefinition, MarksObject, MediaADFAttrs, MediaAttributes, MediaInlineAttributes, MediaInlineDefinition, MediaBaseAttributes, MediaDefinition, MediaDisplayType, MediaGroupDefinition, MediaSingleDefinition, MediaType, MentionAttributes, MentionDefinition, MentionUserType, NestedExpandContent, NestedExpandDefinition, NoMark, NonNestableBlockContent, OrderedListDefinition, PanelAttributes, PanelDefinition, ParagraphBaseDefinition, ParagraphDefinition, ParagraphWithAlignmentDefinition, ParagraphWithIndentationDefinition, ParagraphWithMarksDefinition, PlaceholderDefinition, RuleDefinition, StatusDefinition, TableAttributes, TableCellDefinition, TableDefinition, TableWithNestedTableDefinition, TableRowWithNestedTableDefinition, TableCellWithNestedTableDefinition, TableHeaderWithNestedTableDefinition, TableDisplayMode, TableHeaderDefinition, TableLayout, TableRowDefinition, TaskItemDefinition, BlockTaskItemDefinition, TaskListContent, TaskListDefinition, TextDefinition, UrlType, RichMediaAttributes, ExtendedMediaAttributes, RichMediaLayout, CellDomAttrs, ExtensionFrameDefinition, MultiBodiedExtensionDefinition, SyncBlockDefinition, BodiedSyncBlockDefinition, } from './nodes';
|
|
3
3
|
export { AnnotationTypes, alignment, alignmentPositionMap, annotation, fontSize, breakout, code, colorPalette,
|
|
4
4
|
/** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
|
|
@@ -13,9 +13,11 @@ export type CodeBlockBaseDefinition = {
|
|
|
13
13
|
type: 'codeBlock';
|
|
14
14
|
};
|
|
15
15
|
export type CodeBlockAttrs = {
|
|
16
|
+
hideLineNumbers?: boolean;
|
|
16
17
|
language?: string;
|
|
17
18
|
localId?: string;
|
|
18
19
|
uniqueId?: string;
|
|
20
|
+
wrap?: boolean;
|
|
19
21
|
};
|
|
20
22
|
/**
|
|
21
23
|
* @name codeBlock_with_no_marks_node
|
|
@@ -29,4 +31,12 @@ export declare const codeBlock: NodeSpec;
|
|
|
29
31
|
export declare const toJSON: (node: PMNode) => {
|
|
30
32
|
attrs: Record<string, any>;
|
|
31
33
|
};
|
|
34
|
+
/**
|
|
35
|
+
* @name codeBlock_with_extended_attributes
|
|
36
|
+
* @description stage-0 codeBlock variant with wrap and hideLineNumbers attributes (ADF Change 101)
|
|
37
|
+
*
|
|
38
|
+
* Stage-0 variant: adds wrap and hideLineNumbers attributes (ADF Change 101).
|
|
39
|
+
* The DSL variant includes all attrs (base + new), so the generated factory provides the full set.
|
|
40
|
+
*/
|
|
41
|
+
export declare const codeBlockWithExtendedAttributes: NodeSpec;
|
|
32
42
|
export declare const codeBlockWithLocalId: NodeSpec;
|
|
@@ -9,7 +9,7 @@ export { blockquote, extendedBlockquote, extendedBlockquoteWithLocalId } from '.
|
|
|
9
9
|
export type { BlockQuoteDefinition } from './blockquote';
|
|
10
10
|
export { bulletList, bulletListSelector, bulletListWithLocalId } from './bullet-list';
|
|
11
11
|
export type { BulletListDefinition } from './types/list';
|
|
12
|
-
export { codeBlock, codeBlockWithLocalId, toJSON as codeBlockToJSON } from './code-block';
|
|
12
|
+
export { codeBlock, codeBlockWithLocalId, codeBlockWithExtendedAttributes, toJSON as codeBlockToJSON, } from './code-block';
|
|
13
13
|
export type { CodeBlockDefinition, CodeBlockAttrs, CodeBlockBaseDefinition, CodeBlockWithMarksDefinition, } from './code-block';
|
|
14
14
|
export { hardBreak } from './hard-break';
|
|
15
15
|
export type { HardBreakDefinition } from './hard-break';
|