@atlaskit/adf-schema 36.18.3 → 37.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.
- package/CHANGELOG.md +12 -0
- package/dist/cjs/index.js +0 -24
- package/dist/cjs/next-schema/generated/markTypes.js +77 -77
- package/dist/cjs/next-schema/generated/nodeTypes.js +577 -545
- package/dist/cjs/next-schema/nodes/heading.js +5 -0
- package/dist/cjs/next-schema/nodes/paragraph.js +7 -0
- package/dist/cjs/schema/create-schema.js +2 -2
- package/dist/cjs/schema/default-schema.js +1 -3
- package/dist/cjs/schema/index.js +0 -24
- package/dist/cjs/schema/nodes/heading.js +2 -51
- package/dist/cjs/schema/nodes/index.js +0 -24
- package/dist/cjs/schema/nodes/paragraph.js +2 -18
- package/dist/es2019/index.js +1 -1
- package/dist/es2019/next-schema/generated/markTypes.js +77 -77
- package/dist/es2019/next-schema/generated/nodeTypes.js +577 -545
- package/dist/es2019/next-schema/nodes/heading.js +5 -0
- package/dist/es2019/next-schema/nodes/paragraph.js +7 -0
- package/dist/es2019/schema/create-schema.js +3 -3
- package/dist/es2019/schema/default-schema.js +2 -4
- package/dist/es2019/schema/index.js +1 -1
- package/dist/es2019/schema/nodes/heading.js +2 -48
- package/dist/es2019/schema/nodes/index.js +2 -2
- package/dist/es2019/schema/nodes/paragraph.js +2 -15
- package/dist/esm/index.js +1 -1
- package/dist/esm/next-schema/generated/markTypes.js +77 -77
- package/dist/esm/next-schema/generated/nodeTypes.js +577 -545
- package/dist/esm/next-schema/nodes/heading.js +5 -0
- package/dist/esm/next-schema/nodes/paragraph.js +7 -0
- package/dist/esm/schema/create-schema.js +3 -3
- package/dist/esm/schema/default-schema.js +2 -4
- package/dist/esm/schema/index.js +1 -1
- package/dist/esm/schema/nodes/heading.js +1 -50
- package/dist/esm/schema/nodes/index.js +2 -2
- package/dist/esm/schema/nodes/paragraph.js +1 -17
- package/dist/json-schema/v1/full.json +12 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/next-schema/generated/markTypes.d.ts +122 -122
- package/dist/types/next-schema/generated/nodeGroupTypes.d.ts +2 -2
- package/dist/types/next-schema/generated/nodeTypes.d.ts +474 -458
- package/dist/types/schema/index.d.ts +1 -1
- package/dist/types/schema/nodes/heading.d.ts +1 -3
- package/dist/types/schema/nodes/index.d.ts +2 -2
- package/dist/types/schema/nodes/paragraph.d.ts +1 -6
- package/json-schema/v1/full.json +12 -0
- package/package.json +3 -3
- package/schema-generators/__tests__/unit/adfToValidatorSpec.unit.ts +7 -1
- package/schema-generators/__tests__/unit/json-full-schema.unit.ts +12 -0
@@ -1,4 +1,4 @@
|
|
1
|
-
export { PanelType, blockCard, blockquote, blockquoteWithList, bodiedExtension, bulletList, bulletListSelector, caption, codeBlock, codeBlockToJSON, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, date, decisionItem, decisionList, decisionListSelector, doc, embedCard, emoji, expand, expandToJSON, extension, hardBreak, heading,
|
1
|
+
export { PanelType, blockCard, blockquote, blockquoteWithList, bodiedExtension, bulletList, bulletListSelector, caption, codeBlock, codeBlockToJSON, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, date, decisionItem, decisionList, decisionListSelector, doc, embedCard, emoji, expand, expandToJSON, extension, hardBreak, heading, image, inlineCard, inlineExtension, layoutColumn, layoutSection, layoutSectionWithSingleColumn, listItem, listItemWithTask, media, mediaGroup, mediaSingle, mediaSingleSpec, mediaInline, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, orderedList, orderedListSelector, orderedListWithOrder, panel, extendedPanel, paragraph, placeholder, rule, getCellAttrs, getCellDomAttrs, status, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline, extensionFrame, multiBodiedExtension, } 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, InlineAtomic, 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, TableDisplayMode, TableHeaderDefinition, TableLayout, TableRowDefinition, TaskItemDefinition, TaskListContent, TaskListDefinition, TextDefinition, UrlType, RichMediaAttributes, ExtendedMediaAttributes, RichMediaLayout, CellDomAttrs, ExtensionFrameDefinition, MultiBodiedExtensionDefinition, } from './nodes';
|
3
3
|
export { AnnotationTypes, alignment, alignmentPositionMap, annotation, breakout, code, colorPalette,
|
4
4
|
/** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
|
@@ -19,7 +19,7 @@ export interface HeadingBaseDefinition {
|
|
19
19
|
*/
|
20
20
|
level: number;
|
21
21
|
/**
|
22
|
-
*
|
22
|
+
* An optional UUID for unique identification of the node
|
23
23
|
*/
|
24
24
|
localId?: string;
|
25
25
|
};
|
@@ -37,6 +37,4 @@ export type HeadingWithAlignmentDefinition = HeadingBaseDefinition & MarksObject
|
|
37
37
|
*/
|
38
38
|
export type HeadingWithIndentationDefinition = HeadingBaseDefinition & MarksObject<IndentationMarkDefinition>;
|
39
39
|
export type HeadingWithMarksDefinition = HeadingWithAlignmentDefinition | HeadingWithIndentationDefinition;
|
40
|
-
export declare const headingStage0: NodeSpec;
|
41
40
|
export declare const heading: NodeSpec;
|
42
|
-
export declare const headingNodeSpec: (adfStage?: string) => NodeSpec;
|
@@ -14,13 +14,13 @@ export { codeBlock, toJSON as codeBlockToJSON } from './code-block';
|
|
14
14
|
export type { CodeBlockDefinition, CodeBlockAttrs, CodeBlockBaseDefinition, CodeBlockWithMarksDefinition, } from './code-block';
|
15
15
|
export { hardBreak } from './hard-break';
|
16
16
|
export type { HardBreakDefinition } from './hard-break';
|
17
|
-
export {
|
17
|
+
export { heading } from './heading';
|
18
18
|
export type { HeadingDefinition, HeadingBaseDefinition, HeadingWithAlignmentDefinition, HeadingWithIndentationDefinition, HeadingWithMarksDefinition, } from './heading';
|
19
19
|
export { rule } from './rule';
|
20
20
|
export type { RuleDefinition } from './rule';
|
21
21
|
export { orderedList, orderedListSelector, orderedListWithOrder, } from './ordered-list';
|
22
22
|
export type { OrderedListDefinition } from './types/list';
|
23
|
-
export { paragraph
|
23
|
+
export { paragraph } from './paragraph';
|
24
24
|
export type { ParagraphDefinition, ParagraphBaseDefinition, ParagraphWithAlignmentDefinition, ParagraphWithIndentationDefinition, ParagraphWithMarksDefinition, } from './paragraph';
|
25
25
|
export { emoji } from './emoji';
|
26
26
|
export type { EmojiAttributes, EmojiDefinition } from './emoji';
|
@@ -4,7 +4,7 @@ import { MarksObject, NoMark } from './types/mark';
|
|
4
4
|
import { Inline } from './types/inline-content';
|
5
5
|
export interface ParagraphAttributes {
|
6
6
|
/**
|
7
|
-
*
|
7
|
+
* An optional UUID for unique identification of the node
|
8
8
|
*/
|
9
9
|
localId?: string;
|
10
10
|
}
|
@@ -17,9 +17,6 @@ export interface ParagraphBaseDefinition {
|
|
17
17
|
* @allowUnsupportedInline true
|
18
18
|
*/
|
19
19
|
content?: Array<Inline>;
|
20
|
-
/**
|
21
|
-
* @stage 0
|
22
|
-
*/
|
23
20
|
attrs?: ParagraphAttributes;
|
24
21
|
marks?: Array<any>;
|
25
22
|
}
|
@@ -44,6 +41,4 @@ export type ParagraphWithAlignmentDefinition = ParagraphBaseDefinition & MarksOb
|
|
44
41
|
*/
|
45
42
|
export type ParagraphWithIndentationDefinition = ParagraphBaseDefinition & MarksObject<IndentationMarkDefinition>;
|
46
43
|
export type ParagraphWithMarksDefinition = ParagraphWithAlignmentDefinition | ParagraphWithIndentationDefinition;
|
47
|
-
export declare const paragraphStage0: NodeSpec;
|
48
44
|
export declare const paragraph: NodeSpec;
|
49
|
-
export declare const paragraphNodeSpec: (adfStage?: string) => NodeSpec;
|
package/json-schema/v1/full.json
CHANGED
@@ -1226,6 +1226,15 @@
|
|
1226
1226
|
"$ref": "#/definitions/inline_node"
|
1227
1227
|
}
|
1228
1228
|
},
|
1229
|
+
"attrs": {
|
1230
|
+
"type": "object",
|
1231
|
+
"properties": {
|
1232
|
+
"localId": {
|
1233
|
+
"type": "string"
|
1234
|
+
}
|
1235
|
+
},
|
1236
|
+
"additionalProperties": false
|
1237
|
+
},
|
1229
1238
|
"marks": {
|
1230
1239
|
"type": "array"
|
1231
1240
|
}
|
@@ -1705,6 +1714,9 @@
|
|
1705
1714
|
"type": "number",
|
1706
1715
|
"minimum": 1,
|
1707
1716
|
"maximum": 6
|
1717
|
+
},
|
1718
|
+
"localId": {
|
1719
|
+
"type": "string"
|
1708
1720
|
}
|
1709
1721
|
},
|
1710
1722
|
"required": [
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@atlaskit/adf-schema",
|
3
|
-
"version": "
|
3
|
+
"version": "37.0.1",
|
4
4
|
"description": "Shared package that contains the ADF-schema (json) and ProseMirror node/mark specs",
|
5
5
|
"publishConfig": {
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
@@ -43,8 +43,8 @@
|
|
43
43
|
"memoize-one": "^6.0.0"
|
44
44
|
},
|
45
45
|
"devDependencies": {
|
46
|
-
"@atlassian/adf-schema-json": "^1.
|
47
|
-
"@atlaskit/adf-schema-generator": "^1.17.
|
46
|
+
"@atlassian/adf-schema-json": "^1.16.0",
|
47
|
+
"@atlaskit/adf-schema-generator": "^1.17.3",
|
48
48
|
"@atlaskit/codemod-utils": "^4.2.4",
|
49
49
|
"@atlaskit/json-schema-generator": "^3.3.9",
|
50
50
|
"@babel/cli": "^7.22.9",
|
@@ -64,6 +64,7 @@ const paragraph = {
|
|
64
64
|
optional: true,
|
65
65
|
},
|
66
66
|
marks: { type: 'array', items: [], optional: true },
|
67
|
+
attrs: { props: { localId: { type: 'string', optional: true } } },
|
67
68
|
},
|
68
69
|
};
|
69
70
|
|
@@ -142,6 +143,11 @@ const heading = {
|
|
142
143
|
optional: true,
|
143
144
|
},
|
144
145
|
marks: { type: 'array', items: [], optional: true },
|
145
|
-
attrs: {
|
146
|
+
attrs: {
|
147
|
+
props: {
|
148
|
+
level: { type: 'number', minimum: 1, maximum: 6 },
|
149
|
+
localId: { type: 'string', optional: true },
|
150
|
+
},
|
151
|
+
},
|
146
152
|
},
|
147
153
|
};
|
@@ -822,6 +822,9 @@ const jsonWithTypes = {
|
|
822
822
|
minimum: 1,
|
823
823
|
type: 'number',
|
824
824
|
},
|
825
|
+
localId: {
|
826
|
+
type: 'string',
|
827
|
+
},
|
825
828
|
},
|
826
829
|
required: ['level'],
|
827
830
|
type: 'object',
|
@@ -1480,6 +1483,15 @@ const jsonWithTypes = {
|
|
1480
1483
|
type: {
|
1481
1484
|
enum: ['paragraph'],
|
1482
1485
|
},
|
1486
|
+
attrs: {
|
1487
|
+
additionalProperties: false,
|
1488
|
+
properties: {
|
1489
|
+
localId: {
|
1490
|
+
type: 'string',
|
1491
|
+
},
|
1492
|
+
},
|
1493
|
+
type: 'object',
|
1494
|
+
},
|
1483
1495
|
},
|
1484
1496
|
required: ['type'],
|
1485
1497
|
type: 'object',
|