@atlaskit/adf-schema 36.15.0 → 36.16.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 +6 -0
- package/dist/cjs/next-schema/nodes/blockCard.js +1 -0
- package/dist/cjs/next-schema/nodes/bodiedExtension.js +1 -0
- package/dist/cjs/next-schema/nodes/extension.js +1 -0
- package/dist/cjs/next-schema/nodes/inlineCard.js +1 -0
- package/dist/cjs/next-schema/nodes/inlineExtension.js +1 -0
- package/dist/cjs/next-schema/nodes/mediaInline.js +1 -0
- package/dist/cjs/next-schema/nodes/multiBodiedExtension.js +1 -0
- package/dist/es2019/next-schema/nodes/blockCard.js +1 -0
- package/dist/es2019/next-schema/nodes/bodiedExtension.js +1 -0
- package/dist/es2019/next-schema/nodes/extension.js +1 -0
- package/dist/es2019/next-schema/nodes/inlineCard.js +1 -0
- package/dist/es2019/next-schema/nodes/inlineExtension.js +1 -0
- package/dist/es2019/next-schema/nodes/mediaInline.js +1 -0
- package/dist/es2019/next-schema/nodes/multiBodiedExtension.js +1 -0
- package/dist/esm/next-schema/nodes/blockCard.js +1 -0
- package/dist/esm/next-schema/nodes/bodiedExtension.js +1 -0
- package/dist/esm/next-schema/nodes/extension.js +1 -0
- package/dist/esm/next-schema/nodes/inlineCard.js +1 -0
- package/dist/esm/next-schema/nodes/inlineExtension.js +1 -0
- package/dist/esm/next-schema/nodes/mediaInline.js +1 -0
- package/dist/esm/next-schema/nodes/multiBodiedExtension.js +1 -0
- package/dist/types/next-schema/generated/nodeTypes.d.ts +81 -41
- package/package.json +2 -2
- package/schema-generators/__tests__/unit/json-full-schema.unit.ts +9 -3
package/CHANGELOG.md
CHANGED
@@ -17,6 +17,7 @@ var mediaInline = exports.mediaInline = (0, _adfSchemaGenerator.adfNode)('mediaI
|
|
17
17
|
marks: [_link.link, _annotation.annotation, _border.border, _unsupportedNodeAttribute.unsupportedNodeAttribute, _unsupportedMark.unsupportedMark],
|
18
18
|
attrs: {
|
19
19
|
data: {
|
20
|
+
type: 'object',
|
20
21
|
optional: true
|
21
22
|
},
|
22
23
|
type: {
|
@@ -1,15 +1,22 @@
|
|
1
1
|
import { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
2
2
|
import { InlineDefinition, BlockDefinition } from './nodeGroupTypes';
|
3
3
|
import { UnsupportedNodeAttributeMark, UnsupportedMarkMark, LinkMark, AnnotationMark, BorderMark, EmMark, StrongMark, StrikeMark, SubsupMark, UnderlineMark, TextColorMark, BackgroundColorMark, CodeMark, DataConsumerMark, FragmentMark, AlignmentMark, IndentationMark, BreakoutMark } from './markTypes';
|
4
|
+
export interface BlockCardNodeAttributes0 {
|
5
|
+
url?: string;
|
6
|
+
datasource: Record<string, unknown>;
|
7
|
+
width?: number;
|
8
|
+
layout?: 'wide' | 'full-width' | 'center' | 'wrap-right' | 'wrap-left' | 'align-end' | 'align-start';
|
9
|
+
}
|
10
|
+
export interface BlockCardNodeAttributes1 {
|
11
|
+
url: string;
|
12
|
+
}
|
13
|
+
export interface BlockCardNodeAttributes2 {
|
14
|
+
data: Record<string, unknown>;
|
15
|
+
}
|
4
16
|
export interface BlockCardDefinition {
|
5
17
|
type: 'blockCard';
|
6
18
|
marks: Array<UnsupportedNodeAttributeMark | UnsupportedMarkMark>;
|
7
|
-
attrs:
|
8
|
-
url?: string;
|
9
|
-
datasource: Record<string, unknown>;
|
10
|
-
width?: number;
|
11
|
-
layout?: 'wide' | 'full-width' | 'center' | 'wrap-right' | 'wrap-left' | 'align-end' | 'align-start';
|
12
|
-
};
|
19
|
+
attrs: BlockCardNodeAttributes0 | BlockCardNodeAttributes1 | BlockCardNodeAttributes2;
|
13
20
|
}
|
14
21
|
export type BlockCardNode = PMNode & BlockCardDefinition;
|
15
22
|
export declare const blockCard: ({ parseDOM, toDOM }: import("@atlaskit/adf-schema-generator").NodeSpecOptions<BlockCardNode>) => import("prosemirror-model").NodeSpec;
|
@@ -36,38 +43,51 @@ export interface CodeBlockWithNoMarksDefinition {
|
|
36
43
|
}
|
37
44
|
export type CodeBlockWithNoMarksNode = PMNode & CodeBlockWithNoMarksDefinition;
|
38
45
|
export declare const codeBlockWithNoMarks: ({ parseDOM, toDOM }: import("@atlaskit/adf-schema-generator").NodeSpecOptions<CodeBlockWithNoMarksNode>) => import("prosemirror-model").NodeSpec;
|
46
|
+
export interface MediaNodeAttributes0 {
|
47
|
+
type: 'link' | 'file';
|
48
|
+
id: string;
|
49
|
+
alt?: string;
|
50
|
+
collection: string;
|
51
|
+
height?: number;
|
52
|
+
occurrenceKey?: string;
|
53
|
+
width?: number;
|
54
|
+
__contextId?: string;
|
55
|
+
__displayType?: string;
|
56
|
+
__external?: boolean;
|
57
|
+
__fileMimeType?: string;
|
58
|
+
__fileName?: string;
|
59
|
+
__fileSize?: string;
|
60
|
+
__mediaTraceId?: string;
|
61
|
+
}
|
62
|
+
export interface MediaNodeAttributes1 {
|
63
|
+
type: 'external';
|
64
|
+
alt?: string;
|
65
|
+
height?: number;
|
66
|
+
width?: number;
|
67
|
+
url: string;
|
68
|
+
}
|
39
69
|
export interface MediaDefinition {
|
40
70
|
type: 'media';
|
41
71
|
marks: Array<LinkMark | AnnotationMark | BorderMark | UnsupportedNodeAttributeMark | UnsupportedMarkMark>;
|
42
|
-
attrs:
|
43
|
-
type: 'external' | 'file';
|
44
|
-
id: string;
|
45
|
-
alt?: string;
|
46
|
-
collection: string;
|
47
|
-
height?: number;
|
48
|
-
occurrenceKey?: string;
|
49
|
-
width?: number;
|
50
|
-
__contextId?: string;
|
51
|
-
__displayType?: string;
|
52
|
-
__external?: boolean;
|
53
|
-
__fileMimeType?: string;
|
54
|
-
__fileName?: string;
|
55
|
-
__fileSize?: string;
|
56
|
-
__mediaTraceId?: string;
|
57
|
-
url: string;
|
58
|
-
};
|
72
|
+
attrs: MediaNodeAttributes0 | MediaNodeAttributes1;
|
59
73
|
}
|
60
74
|
export type MediaNode = PMNode & MediaDefinition;
|
61
75
|
export declare const media: ({ parseDOM, toDOM }: import("@atlaskit/adf-schema-generator").NodeSpecOptions<MediaNode>) => import("prosemirror-model").NodeSpec;
|
76
|
+
export interface MediaSingleNodeAttributes0 {
|
77
|
+
width?: number;
|
78
|
+
layout: 'wide' | 'full-width' | 'center' | 'wrap-right' | 'wrap-left' | 'align-end' | 'align-start';
|
79
|
+
widthType?: 'percentage';
|
80
|
+
}
|
81
|
+
export interface MediaSingleNodeAttributes1 {
|
82
|
+
width: number;
|
83
|
+
widthType: 'pixel';
|
84
|
+
layout: 'wide' | 'full-width' | 'center' | 'wrap-right' | 'wrap-left' | 'align-end' | 'align-start';
|
85
|
+
}
|
62
86
|
export interface MediaSingleDefinition {
|
63
87
|
type: 'mediaSingle';
|
64
88
|
content: Array<MediaDefinition>;
|
65
89
|
marks: Array<LinkMark | UnsupportedNodeAttributeMark | UnsupportedMarkMark>;
|
66
|
-
attrs:
|
67
|
-
width?: number;
|
68
|
-
layout: 'wide' | 'full-width' | 'center' | 'wrap-right' | 'wrap-left' | 'align-end' | 'align-start';
|
69
|
-
widthType?: 'pixel';
|
70
|
-
};
|
90
|
+
attrs: MediaSingleNodeAttributes0 | MediaSingleNodeAttributes1;
|
71
91
|
}
|
72
92
|
export type MediaSingleNode = PMNode & MediaSingleDefinition;
|
73
93
|
export declare const mediaSingle: ({ parseDOM, toDOM }: import("@atlaskit/adf-schema-generator").NodeSpecOptions<MediaSingleNode>) => import("prosemirror-model").NodeSpec;
|
@@ -130,12 +150,16 @@ export interface PlaceholderDefinition {
|
|
130
150
|
}
|
131
151
|
export type PlaceholderNode = PMNode & PlaceholderDefinition;
|
132
152
|
export declare const placeholder: ({ parseDOM, toDOM }: import("@atlaskit/adf-schema-generator").NodeSpecOptions<PlaceholderNode>) => import("prosemirror-model").NodeSpec;
|
153
|
+
export interface InlineCardNodeAttributes0 {
|
154
|
+
url: string;
|
155
|
+
}
|
156
|
+
export interface InlineCardNodeAttributes1 {
|
157
|
+
data: Record<string, unknown>;
|
158
|
+
}
|
133
159
|
export interface InlineCardDefinition {
|
134
160
|
type: 'inlineCard';
|
135
161
|
marks: Array<UnsupportedNodeAttributeMark | UnsupportedMarkMark>;
|
136
|
-
attrs:
|
137
|
-
url: string;
|
138
|
-
};
|
162
|
+
attrs: InlineCardNodeAttributes0 | InlineCardNodeAttributes1;
|
139
163
|
}
|
140
164
|
export type InlineCardNode = PMNode & InlineCardDefinition;
|
141
165
|
export declare const inlineCard: ({ parseDOM, toDOM }: import("@atlaskit/adf-schema-generator").NodeSpecOptions<InlineCardNode>) => import("prosemirror-model").NodeSpec;
|
@@ -170,27 +194,39 @@ export interface CaptionDefinition {
|
|
170
194
|
}
|
171
195
|
export type CaptionNode = PMNode & CaptionDefinition;
|
172
196
|
export declare const caption: ({ parseDOM, toDOM }: import("@atlaskit/adf-schema-generator").NodeSpecOptions<CaptionNode>) => import("prosemirror-model").NodeSpec;
|
197
|
+
export interface MediaSingleCaptionNodeAttributes0 {
|
198
|
+
width?: number;
|
199
|
+
layout: 'wide' | 'full-width' | 'center' | 'wrap-right' | 'wrap-left' | 'align-end' | 'align-start';
|
200
|
+
widthType?: 'percentage';
|
201
|
+
}
|
202
|
+
export interface MediaSingleCaptionNodeAttributes1 {
|
203
|
+
width: number;
|
204
|
+
widthType: 'pixel';
|
205
|
+
layout: 'wide' | 'full-width' | 'center' | 'wrap-right' | 'wrap-left' | 'align-end' | 'align-start';
|
206
|
+
}
|
173
207
|
export interface MediaSingleCaptionDefinition {
|
174
208
|
type: 'mediaSingle';
|
175
209
|
content: Array<MediaDefinition | UnsupportedBlockDefinition | CaptionDefinition | UnsupportedBlockDefinition>;
|
176
210
|
marks: Array<LinkMark | UnsupportedNodeAttributeMark | UnsupportedMarkMark>;
|
177
|
-
attrs:
|
178
|
-
width?: number;
|
179
|
-
layout: 'wide' | 'full-width' | 'center' | 'wrap-right' | 'wrap-left' | 'align-end' | 'align-start';
|
180
|
-
widthType?: 'pixel';
|
181
|
-
};
|
211
|
+
attrs: MediaSingleCaptionNodeAttributes0 | MediaSingleCaptionNodeAttributes1;
|
182
212
|
}
|
183
213
|
export type MediaSingleCaptionNode = PMNode & MediaSingleCaptionDefinition;
|
184
214
|
export declare const mediaSingleCaption: ({ parseDOM, toDOM }: import("@atlaskit/adf-schema-generator").NodeSpecOptions<MediaSingleCaptionNode>) => import("prosemirror-model").NodeSpec;
|
215
|
+
export interface MediaSingleFullNodeAttributes0 {
|
216
|
+
width?: number;
|
217
|
+
layout: 'wide' | 'full-width' | 'center' | 'wrap-right' | 'wrap-left' | 'align-end' | 'align-start';
|
218
|
+
widthType?: 'percentage';
|
219
|
+
}
|
220
|
+
export interface MediaSingleFullNodeAttributes1 {
|
221
|
+
width: number;
|
222
|
+
widthType: 'pixel';
|
223
|
+
layout: 'wide' | 'full-width' | 'center' | 'wrap-right' | 'wrap-left' | 'align-end' | 'align-start';
|
224
|
+
}
|
185
225
|
export interface MediaSingleFullDefinition {
|
186
226
|
type: 'mediaSingle';
|
187
227
|
content: Array<MediaDefinition>;
|
188
228
|
marks: Array<LinkMark | UnsupportedNodeAttributeMark | UnsupportedMarkMark>;
|
189
|
-
attrs:
|
190
|
-
width?: number;
|
191
|
-
layout: 'wide' | 'full-width' | 'center' | 'wrap-right' | 'wrap-left' | 'align-end' | 'align-start';
|
192
|
-
widthType?: 'pixel';
|
193
|
-
};
|
229
|
+
attrs: MediaSingleFullNodeAttributes0 | MediaSingleFullNodeAttributes1;
|
194
230
|
}
|
195
231
|
export type MediaSingleFullNode = PMNode & MediaSingleFullDefinition;
|
196
232
|
export declare const mediaSingleFull: ({ parseDOM, toDOM }: import("@atlaskit/adf-schema-generator").NodeSpecOptions<MediaSingleFullNode>) => import("prosemirror-model").NodeSpec;
|
@@ -200,6 +236,7 @@ export interface InlineExtensionWithMarksDefinition {
|
|
200
236
|
attrs: {
|
201
237
|
extensionKey: string;
|
202
238
|
extensionType: string;
|
239
|
+
parameters?: Record<string, unknown>;
|
203
240
|
text?: string;
|
204
241
|
localId?: string;
|
205
242
|
};
|
@@ -210,6 +247,7 @@ export interface MediaInlineDefinition {
|
|
210
247
|
type: 'mediaInline';
|
211
248
|
marks: Array<LinkMark | AnnotationMark | BorderMark | UnsupportedNodeAttributeMark | UnsupportedMarkMark>;
|
212
249
|
attrs: {
|
250
|
+
data?: Record<string, unknown>;
|
213
251
|
type?: 'link' | 'file' | 'image';
|
214
252
|
url: string;
|
215
253
|
id: string;
|
@@ -357,6 +395,7 @@ export interface ExtensionWithMarksDefinition {
|
|
357
395
|
attrs: {
|
358
396
|
extensionKey: string;
|
359
397
|
extensionType: string;
|
398
|
+
parameters?: Record<string, unknown>;
|
360
399
|
text?: string;
|
361
400
|
layout?: 'wide' | 'full-width' | 'default';
|
362
401
|
localId?: string;
|
@@ -503,6 +542,7 @@ export interface BodiedExtensionWithMarksDefinition {
|
|
503
542
|
attrs: {
|
504
543
|
extensionKey: string;
|
505
544
|
extensionType: string;
|
545
|
+
parameters?: Record<string, unknown>;
|
506
546
|
text?: string;
|
507
547
|
layout?: 'wide' | 'full-width' | 'default';
|
508
548
|
localId?: string;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@atlaskit/adf-schema",
|
3
|
-
"version": "36.
|
3
|
+
"version": "36.16.0",
|
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/"
|
@@ -44,7 +44,7 @@
|
|
44
44
|
},
|
45
45
|
"devDependencies": {
|
46
46
|
"@atlassian/adf-schema-json": "^1.15.0",
|
47
|
-
"@atlaskit/adf-schema-generator": "^1.
|
47
|
+
"@atlaskit/adf-schema-generator": "^1.15.0",
|
48
48
|
"@atlaskit/codemod-utils": "^4.2.4",
|
49
49
|
"@atlaskit/json-schema-generator": "^3.3.9",
|
50
50
|
"@babel/cli": "^7.22.9",
|
@@ -144,7 +144,9 @@ const jsonWithTypes = {
|
|
144
144
|
{
|
145
145
|
additionalProperties: false,
|
146
146
|
properties: {
|
147
|
-
data: {
|
147
|
+
data: {
|
148
|
+
type: 'object',
|
149
|
+
},
|
148
150
|
},
|
149
151
|
required: ['data'],
|
150
152
|
type: 'object',
|
@@ -646,7 +648,9 @@ const jsonWithTypes = {
|
|
646
648
|
{
|
647
649
|
additionalProperties: false,
|
648
650
|
properties: {
|
649
|
-
data: {
|
651
|
+
data: {
|
652
|
+
type: 'object',
|
653
|
+
},
|
650
654
|
},
|
651
655
|
required: ['data'],
|
652
656
|
type: 'object',
|
@@ -831,7 +835,9 @@ const jsonWithTypes = {
|
|
831
835
|
collection: {
|
832
836
|
type: 'string',
|
833
837
|
},
|
834
|
-
data: {
|
838
|
+
data: {
|
839
|
+
type: 'object',
|
840
|
+
},
|
835
841
|
height: {
|
836
842
|
type: 'number',
|
837
843
|
},
|