@atlaskit/adf-schema 36.10.12 → 36.11.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 +12 -0
- package/dist/cjs/next-schema/full-schema.adf.js +3 -1
- package/dist/cjs/next-schema/generated/markTypes.js +126 -0
- package/dist/cjs/next-schema/generated/nodeGroupTypes.js +5 -0
- package/dist/cjs/next-schema/generated/nodeTypes.js +798 -0
- package/dist/cjs/next-schema/groups/nonNestableBlockContentGroup.js +1 -1
- package/dist/cjs/next-schema/nodes/caption.js +1 -1
- package/dist/cjs/next-schema/nodes/nestedExpand.js +1 -1
- package/dist/cjs/next-schema/nodes/panel.js +1 -1
- package/dist/cjs/next-schema/nodes/tableCell.js +1 -1
- package/dist/cjs/next-schema/nodes/tableHeader.js +1 -1
- package/dist/es2019/next-schema/full-schema.adf.js +3 -1
- package/dist/es2019/next-schema/generated/markTypes.js +120 -0
- package/dist/es2019/next-schema/generated/nodeGroupTypes.js +1 -0
- package/dist/es2019/next-schema/generated/nodeTypes.js +792 -0
- package/dist/es2019/next-schema/groups/nonNestableBlockContentGroup.js +1 -1
- package/dist/es2019/next-schema/nodes/caption.js +1 -1
- package/dist/es2019/next-schema/nodes/nestedExpand.js +1 -1
- package/dist/es2019/next-schema/nodes/panel.js +1 -1
- package/dist/es2019/next-schema/nodes/tableCell.js +1 -1
- package/dist/es2019/next-schema/nodes/tableHeader.js +1 -1
- package/dist/esm/next-schema/full-schema.adf.js +3 -1
- package/dist/esm/next-schema/generated/markTypes.js +120 -0
- package/dist/esm/next-schema/generated/nodeGroupTypes.js +1 -0
- package/dist/esm/next-schema/generated/nodeTypes.js +792 -0
- package/dist/esm/next-schema/groups/nonNestableBlockContentGroup.js +1 -1
- package/dist/esm/next-schema/nodes/caption.js +1 -1
- package/dist/esm/next-schema/nodes/nestedExpand.js +1 -1
- package/dist/esm/next-schema/nodes/panel.js +1 -1
- package/dist/esm/next-schema/nodes/tableCell.js +1 -1
- package/dist/esm/next-schema/nodes/tableHeader.js +1 -1
- package/dist/types/next-schema/generated/markTypes.d.ts +155 -0
- package/dist/types/next-schema/generated/nodeGroupTypes.d.ts +4 -0
- package/dist/types/next-schema/generated/nodeTypes.d.ts +573 -0
- package/dist/types/next-schema/groups/nonNestableBlockContentGroup.d.ts +2 -65
- package/package.json +3 -3
- package/schema-generators/__tests__/unit/adfToValidatorSpec.unit.ts +69 -0
- package/schema-generators/__tests__/unit/jqueries.md +13 -0
- package/schema-generators/__tests__/unit/json-full-schema.unit.ts +475 -10
- package/schema-generators/__tests__/unit/validate-pm-schema.unit.ts +2 -2
@@ -0,0 +1,792 @@
|
|
1
|
+
import { createPMNodeSpecFactory } from '@atlaskit/adf-schema-generator';
|
2
|
+
export const blockCard = createPMNodeSpecFactory({
|
3
|
+
group: 'block',
|
4
|
+
attrs: {
|
5
|
+
url: {},
|
6
|
+
datasource: {},
|
7
|
+
width: {},
|
8
|
+
layout: {},
|
9
|
+
data: {}
|
10
|
+
},
|
11
|
+
selectable: true,
|
12
|
+
draggable: true
|
13
|
+
});
|
14
|
+
export const text = createPMNodeSpecFactory({});
|
15
|
+
export const codeBlock = createPMNodeSpecFactory({
|
16
|
+
content: 'text*',
|
17
|
+
group: 'block',
|
18
|
+
attrs: {
|
19
|
+
language: {
|
20
|
+
default: null
|
21
|
+
}
|
22
|
+
},
|
23
|
+
code: true,
|
24
|
+
defining: true
|
25
|
+
});
|
26
|
+
export const codeBlockWithMarks = createPMNodeSpecFactory({
|
27
|
+
content: 'text*',
|
28
|
+
group: 'block',
|
29
|
+
attrs: {
|
30
|
+
language: {
|
31
|
+
default: null
|
32
|
+
}
|
33
|
+
},
|
34
|
+
code: true,
|
35
|
+
defining: true
|
36
|
+
});
|
37
|
+
export const codeBlockWithNoMarks = createPMNodeSpecFactory({
|
38
|
+
content: 'text*',
|
39
|
+
group: 'block',
|
40
|
+
attrs: {
|
41
|
+
language: {
|
42
|
+
default: null
|
43
|
+
}
|
44
|
+
},
|
45
|
+
code: true,
|
46
|
+
defining: true
|
47
|
+
});
|
48
|
+
export const mediaSingle = createPMNodeSpecFactory({
|
49
|
+
group: 'block',
|
50
|
+
atom: false,
|
51
|
+
attrs: {
|
52
|
+
width: {
|
53
|
+
default: null
|
54
|
+
},
|
55
|
+
layout: {
|
56
|
+
default: 'center'
|
57
|
+
},
|
58
|
+
widthType: {
|
59
|
+
default: 'pixel'
|
60
|
+
}
|
61
|
+
},
|
62
|
+
selectable: true
|
63
|
+
});
|
64
|
+
export const media = createPMNodeSpecFactory({
|
65
|
+
attrs: {
|
66
|
+
type: {
|
67
|
+
default: 'file'
|
68
|
+
},
|
69
|
+
alt: {
|
70
|
+
default: ''
|
71
|
+
},
|
72
|
+
collection: {
|
73
|
+
default: ''
|
74
|
+
},
|
75
|
+
id: {
|
76
|
+
default: ''
|
77
|
+
},
|
78
|
+
height: {
|
79
|
+
default: null
|
80
|
+
},
|
81
|
+
occurrenceKey: {
|
82
|
+
default: null
|
83
|
+
},
|
84
|
+
width: {
|
85
|
+
default: null
|
86
|
+
},
|
87
|
+
__contextId: {
|
88
|
+
default: null
|
89
|
+
},
|
90
|
+
__displayType: {
|
91
|
+
default: null
|
92
|
+
},
|
93
|
+
__external: {
|
94
|
+
default: null
|
95
|
+
},
|
96
|
+
__fileMimeType: {
|
97
|
+
default: null
|
98
|
+
},
|
99
|
+
__fileName: {
|
100
|
+
default: null
|
101
|
+
},
|
102
|
+
__fileSize: {
|
103
|
+
default: null
|
104
|
+
},
|
105
|
+
__mediaTraceId: {
|
106
|
+
default: null
|
107
|
+
},
|
108
|
+
url: {
|
109
|
+
default: null
|
110
|
+
}
|
111
|
+
},
|
112
|
+
selectable: true
|
113
|
+
});
|
114
|
+
export const textFormatted = createPMNodeSpecFactory({
|
115
|
+
group: 'inline'
|
116
|
+
});
|
117
|
+
export const hardBreak = createPMNodeSpecFactory({
|
118
|
+
group: 'inline',
|
119
|
+
inline: true,
|
120
|
+
attrs: {
|
121
|
+
text: {
|
122
|
+
default: '\n'
|
123
|
+
}
|
124
|
+
},
|
125
|
+
selectable: false
|
126
|
+
});
|
127
|
+
export const mention = createPMNodeSpecFactory({
|
128
|
+
group: 'inline',
|
129
|
+
inline: true,
|
130
|
+
attrs: {
|
131
|
+
id: {
|
132
|
+
default: ''
|
133
|
+
},
|
134
|
+
localId: {},
|
135
|
+
text: {
|
136
|
+
default: ''
|
137
|
+
},
|
138
|
+
accessLevel: {
|
139
|
+
default: ''
|
140
|
+
},
|
141
|
+
userType: {
|
142
|
+
default: null
|
143
|
+
}
|
144
|
+
},
|
145
|
+
selectable: true
|
146
|
+
});
|
147
|
+
export const emoji = createPMNodeSpecFactory({
|
148
|
+
group: 'inline',
|
149
|
+
inline: true,
|
150
|
+
attrs: {
|
151
|
+
shortName: {
|
152
|
+
default: ''
|
153
|
+
},
|
154
|
+
id: {
|
155
|
+
default: ''
|
156
|
+
},
|
157
|
+
text: {
|
158
|
+
default: ''
|
159
|
+
}
|
160
|
+
},
|
161
|
+
selectable: true
|
162
|
+
});
|
163
|
+
export const date = createPMNodeSpecFactory({
|
164
|
+
group: 'inline',
|
165
|
+
inline: true,
|
166
|
+
attrs: {
|
167
|
+
timestamp: {
|
168
|
+
default: ''
|
169
|
+
}
|
170
|
+
},
|
171
|
+
selectable: true
|
172
|
+
});
|
173
|
+
export const placeholder = createPMNodeSpecFactory({
|
174
|
+
group: 'inline',
|
175
|
+
attrs: {
|
176
|
+
text: {
|
177
|
+
default: ''
|
178
|
+
}
|
179
|
+
},
|
180
|
+
selectable: false
|
181
|
+
});
|
182
|
+
export const inlineCard = createPMNodeSpecFactory({
|
183
|
+
group: 'inline',
|
184
|
+
inline: true,
|
185
|
+
attrs: {
|
186
|
+
url: {
|
187
|
+
default: null
|
188
|
+
},
|
189
|
+
data: {
|
190
|
+
default: null
|
191
|
+
}
|
192
|
+
},
|
193
|
+
selectable: true,
|
194
|
+
draggable: true
|
195
|
+
});
|
196
|
+
export const status = createPMNodeSpecFactory({
|
197
|
+
group: 'inline',
|
198
|
+
attrs: {
|
199
|
+
text: {
|
200
|
+
default: ''
|
201
|
+
},
|
202
|
+
color: {
|
203
|
+
default: ''
|
204
|
+
},
|
205
|
+
localId: {
|
206
|
+
default: ''
|
207
|
+
},
|
208
|
+
style: {
|
209
|
+
default: ''
|
210
|
+
}
|
211
|
+
},
|
212
|
+
selectable: true
|
213
|
+
});
|
214
|
+
export const caption = createPMNodeSpecFactory({
|
215
|
+
content: '(text | hardBreak | mention | emoji | date | placeholder | inlineCard | status)*',
|
216
|
+
marks: 'link em strong strike subsup underline textColor annotation backgroundColor',
|
217
|
+
selectable: false,
|
218
|
+
isolating: true
|
219
|
+
});
|
220
|
+
export const mediaSingleCaption = createPMNodeSpecFactory({
|
221
|
+
content: 'media caption',
|
222
|
+
marks: 'link annotation border',
|
223
|
+
group: 'block',
|
224
|
+
atom: false,
|
225
|
+
attrs: {
|
226
|
+
width: {
|
227
|
+
default: null
|
228
|
+
},
|
229
|
+
layout: {
|
230
|
+
default: 'center'
|
231
|
+
},
|
232
|
+
widthType: {
|
233
|
+
default: 'pixel'
|
234
|
+
}
|
235
|
+
},
|
236
|
+
selectable: true
|
237
|
+
});
|
238
|
+
export const mediaSingleFull = createPMNodeSpecFactory({
|
239
|
+
group: 'block',
|
240
|
+
atom: false,
|
241
|
+
attrs: {
|
242
|
+
width: {
|
243
|
+
default: null
|
244
|
+
},
|
245
|
+
layout: {
|
246
|
+
default: 'center'
|
247
|
+
},
|
248
|
+
widthType: {
|
249
|
+
default: 'pixel'
|
250
|
+
}
|
251
|
+
},
|
252
|
+
selectable: true
|
253
|
+
});
|
254
|
+
export const textCodeInline = createPMNodeSpecFactory({
|
255
|
+
group: 'inline'
|
256
|
+
});
|
257
|
+
export const inlineExtension = createPMNodeSpecFactory({
|
258
|
+
group: 'inline',
|
259
|
+
inline: true,
|
260
|
+
attrs: {
|
261
|
+
extensionType: {
|
262
|
+
default: ''
|
263
|
+
},
|
264
|
+
extensionKey: {
|
265
|
+
default: ''
|
266
|
+
},
|
267
|
+
parameters: {
|
268
|
+
default: null
|
269
|
+
},
|
270
|
+
text: {
|
271
|
+
default: null
|
272
|
+
},
|
273
|
+
localId: {
|
274
|
+
default: null
|
275
|
+
}
|
276
|
+
},
|
277
|
+
selectable: true
|
278
|
+
});
|
279
|
+
export const inlineExtensionWithMarks = createPMNodeSpecFactory({
|
280
|
+
group: 'inline',
|
281
|
+
inline: true,
|
282
|
+
attrs: {
|
283
|
+
extensionType: {
|
284
|
+
default: ''
|
285
|
+
},
|
286
|
+
extensionKey: {
|
287
|
+
default: ''
|
288
|
+
},
|
289
|
+
parameters: {
|
290
|
+
default: null
|
291
|
+
},
|
292
|
+
text: {
|
293
|
+
default: null
|
294
|
+
},
|
295
|
+
localId: {
|
296
|
+
default: null
|
297
|
+
}
|
298
|
+
},
|
299
|
+
selectable: true
|
300
|
+
});
|
301
|
+
export const mediaInline = createPMNodeSpecFactory({
|
302
|
+
group: 'inline',
|
303
|
+
atom: false,
|
304
|
+
attrs: {
|
305
|
+
data: {},
|
306
|
+
type: {},
|
307
|
+
id: {},
|
308
|
+
alt: {},
|
309
|
+
collection: {},
|
310
|
+
occurrenceKey: {},
|
311
|
+
width: {
|
312
|
+
default: null
|
313
|
+
},
|
314
|
+
height: {
|
315
|
+
default: null
|
316
|
+
},
|
317
|
+
__fileName: {},
|
318
|
+
__fileSize: {},
|
319
|
+
__fileMimeType: {},
|
320
|
+
__displayType: {},
|
321
|
+
__contextId: {},
|
322
|
+
__mediaTraceId: {},
|
323
|
+
__external: {}
|
324
|
+
},
|
325
|
+
selectable: true
|
326
|
+
});
|
327
|
+
export const paragraphWithAlignment = createPMNodeSpecFactory({
|
328
|
+
content: 'inline*',
|
329
|
+
marks: 'link em strong strike subsup underline textColor annotation backgroundColor code border',
|
330
|
+
group: 'block',
|
331
|
+
selectable: false
|
332
|
+
});
|
333
|
+
export const paragraphWithIndentation = createPMNodeSpecFactory({
|
334
|
+
content: 'inline*',
|
335
|
+
marks: 'link em strong strike subsup underline textColor annotation backgroundColor code border',
|
336
|
+
group: 'block',
|
337
|
+
selectable: false
|
338
|
+
});
|
339
|
+
export const paragraphWithNoMarks = createPMNodeSpecFactory({
|
340
|
+
content: 'inline*',
|
341
|
+
marks: 'link em strong strike subsup underline textColor annotation backgroundColor code border',
|
342
|
+
group: 'block',
|
343
|
+
selectable: false
|
344
|
+
});
|
345
|
+
export const taskItem = createPMNodeSpecFactory({
|
346
|
+
content: 'inline*',
|
347
|
+
marks: 'link em strong strike subsup underline textColor annotation backgroundColor code border',
|
348
|
+
attrs: {
|
349
|
+
localId: {
|
350
|
+
default: ''
|
351
|
+
},
|
352
|
+
state: {
|
353
|
+
default: 'TODO'
|
354
|
+
}
|
355
|
+
},
|
356
|
+
selectable: false,
|
357
|
+
defining: true
|
358
|
+
});
|
359
|
+
export const taskList = createPMNodeSpecFactory({
|
360
|
+
content: 'taskItem+ (taskItem | taskList)*',
|
361
|
+
group: 'block',
|
362
|
+
attrs: {
|
363
|
+
localId: {
|
364
|
+
default: ''
|
365
|
+
}
|
366
|
+
},
|
367
|
+
selectable: false,
|
368
|
+
defining: true
|
369
|
+
});
|
370
|
+
export const bulletList = createPMNodeSpecFactory({
|
371
|
+
content: 'listItem+',
|
372
|
+
group: 'block',
|
373
|
+
selectable: false
|
374
|
+
});
|
375
|
+
export const listItem = createPMNodeSpecFactory({
|
376
|
+
content: 'codeBlock | paragraph | mediaSingle | mediaSingle (codeBlock | paragraph | mediaSingle | taskList | bulletList | orderedList)*',
|
377
|
+
marks: 'link',
|
378
|
+
selectable: false,
|
379
|
+
defining: true
|
380
|
+
});
|
381
|
+
export const orderedList = createPMNodeSpecFactory({
|
382
|
+
content: 'listItem+',
|
383
|
+
group: 'block',
|
384
|
+
attrs: {
|
385
|
+
order: {
|
386
|
+
default: 1
|
387
|
+
}
|
388
|
+
},
|
389
|
+
selectable: false
|
390
|
+
});
|
391
|
+
export const blockquote = createPMNodeSpecFactory({
|
392
|
+
content: '(paragraph | bulletList | orderedList)+',
|
393
|
+
group: 'block',
|
394
|
+
selectable: false,
|
395
|
+
defining: true
|
396
|
+
});
|
397
|
+
export const decisionItem = createPMNodeSpecFactory({
|
398
|
+
content: 'inline*',
|
399
|
+
marks: 'link em strong strike subsup underline textColor annotation backgroundColor code border',
|
400
|
+
attrs: {
|
401
|
+
localId: {
|
402
|
+
default: ''
|
403
|
+
},
|
404
|
+
state: {
|
405
|
+
default: 'DECIDED'
|
406
|
+
}
|
407
|
+
},
|
408
|
+
defining: true
|
409
|
+
});
|
410
|
+
export const decisionList = createPMNodeSpecFactory({
|
411
|
+
content: 'decisionItem+',
|
412
|
+
group: 'block',
|
413
|
+
attrs: {
|
414
|
+
localId: {
|
415
|
+
default: ''
|
416
|
+
}
|
417
|
+
},
|
418
|
+
selectable: false,
|
419
|
+
defining: true
|
420
|
+
});
|
421
|
+
export const embedCard = createPMNodeSpecFactory({
|
422
|
+
group: 'block',
|
423
|
+
attrs: {
|
424
|
+
url: {
|
425
|
+
default: ''
|
426
|
+
},
|
427
|
+
layout: {
|
428
|
+
default: 'center'
|
429
|
+
},
|
430
|
+
width: {
|
431
|
+
default: 100
|
432
|
+
},
|
433
|
+
originalHeight: {
|
434
|
+
default: null
|
435
|
+
},
|
436
|
+
originalWidth: {
|
437
|
+
default: null
|
438
|
+
}
|
439
|
+
},
|
440
|
+
selectable: true
|
441
|
+
});
|
442
|
+
export const extension = createPMNodeSpecFactory({
|
443
|
+
group: 'block',
|
444
|
+
atom: true,
|
445
|
+
attrs: {
|
446
|
+
extensionType: {
|
447
|
+
default: ''
|
448
|
+
},
|
449
|
+
extensionKey: {
|
450
|
+
default: ''
|
451
|
+
},
|
452
|
+
parameters: {
|
453
|
+
default: null
|
454
|
+
},
|
455
|
+
text: {
|
456
|
+
default: null
|
457
|
+
},
|
458
|
+
layout: {
|
459
|
+
default: 'default'
|
460
|
+
},
|
461
|
+
localId: {
|
462
|
+
default: null
|
463
|
+
}
|
464
|
+
},
|
465
|
+
selectable: true
|
466
|
+
});
|
467
|
+
export const extensionWithMarks = createPMNodeSpecFactory({
|
468
|
+
group: 'block',
|
469
|
+
atom: true,
|
470
|
+
attrs: {
|
471
|
+
extensionType: {
|
472
|
+
default: ''
|
473
|
+
},
|
474
|
+
extensionKey: {
|
475
|
+
default: ''
|
476
|
+
},
|
477
|
+
parameters: {
|
478
|
+
default: null
|
479
|
+
},
|
480
|
+
text: {
|
481
|
+
default: null
|
482
|
+
},
|
483
|
+
layout: {
|
484
|
+
default: 'default'
|
485
|
+
},
|
486
|
+
localId: {
|
487
|
+
default: null
|
488
|
+
}
|
489
|
+
},
|
490
|
+
selectable: true
|
491
|
+
});
|
492
|
+
export const heading = createPMNodeSpecFactory({
|
493
|
+
content: 'inline*',
|
494
|
+
marks: 'link em strong strike subsup underline textColor annotation backgroundColor code border',
|
495
|
+
group: 'block',
|
496
|
+
attrs: {
|
497
|
+
level: {
|
498
|
+
default: 1
|
499
|
+
}
|
500
|
+
},
|
501
|
+
selectable: false,
|
502
|
+
defining: true
|
503
|
+
});
|
504
|
+
export const headingWithNoMarks = createPMNodeSpecFactory({
|
505
|
+
content: 'inline*',
|
506
|
+
marks: 'link em strong strike subsup underline textColor annotation backgroundColor code border',
|
507
|
+
group: 'block',
|
508
|
+
attrs: {
|
509
|
+
level: {
|
510
|
+
default: 1
|
511
|
+
}
|
512
|
+
},
|
513
|
+
selectable: false,
|
514
|
+
defining: true
|
515
|
+
});
|
516
|
+
export const mediaGroup = createPMNodeSpecFactory({
|
517
|
+
content: 'media+',
|
518
|
+
marks: 'link annotation border',
|
519
|
+
group: 'block',
|
520
|
+
selectable: false
|
521
|
+
});
|
522
|
+
export const rule = createPMNodeSpecFactory({
|
523
|
+
group: 'block'
|
524
|
+
});
|
525
|
+
export const paragraph = createPMNodeSpecFactory({
|
526
|
+
content: 'inline*',
|
527
|
+
marks: 'link em strong strike subsup underline textColor annotation backgroundColor code border',
|
528
|
+
selectable: false
|
529
|
+
});
|
530
|
+
export const panel = createPMNodeSpecFactory({
|
531
|
+
content: '(paragraph | heading | bulletList | orderedList | blockCard | codeBlock | mediaGroup | mediaSingle | decisionList | taskList | rule)+',
|
532
|
+
marks: 'link',
|
533
|
+
group: 'block',
|
534
|
+
attrs: {
|
535
|
+
panelType: {
|
536
|
+
default: 'info'
|
537
|
+
},
|
538
|
+
panelIcon: {
|
539
|
+
default: null
|
540
|
+
},
|
541
|
+
panelIconId: {
|
542
|
+
default: null
|
543
|
+
},
|
544
|
+
panelIconText: {
|
545
|
+
default: null
|
546
|
+
},
|
547
|
+
panelColor: {
|
548
|
+
default: null
|
549
|
+
}
|
550
|
+
},
|
551
|
+
selectable: true
|
552
|
+
});
|
553
|
+
export const headingWithAlignment = createPMNodeSpecFactory({
|
554
|
+
content: 'inline*',
|
555
|
+
marks: 'link em strong strike subsup underline textColor annotation backgroundColor code border',
|
556
|
+
attrs: {
|
557
|
+
level: {
|
558
|
+
default: 1
|
559
|
+
}
|
560
|
+
},
|
561
|
+
selectable: false,
|
562
|
+
defining: true
|
563
|
+
});
|
564
|
+
export const headingWithIndentation = createPMNodeSpecFactory({
|
565
|
+
content: 'inline*',
|
566
|
+
marks: 'link em strong strike subsup underline textColor annotation backgroundColor code border',
|
567
|
+
attrs: {
|
568
|
+
level: {
|
569
|
+
default: 1
|
570
|
+
}
|
571
|
+
},
|
572
|
+
selectable: false,
|
573
|
+
defining: true
|
574
|
+
});
|
575
|
+
export const nestedExpand = createPMNodeSpecFactory({
|
576
|
+
content: '(paragraph | heading | mediaSingle | mediaGroup | codeBlock | bulletList | orderedList | taskList | decisionList | rule | panel | blockquote)+',
|
577
|
+
marks: 'link',
|
578
|
+
attrs: {
|
579
|
+
title: {
|
580
|
+
default: ''
|
581
|
+
},
|
582
|
+
__expanded: {
|
583
|
+
default: true
|
584
|
+
}
|
585
|
+
},
|
586
|
+
selectable: true,
|
587
|
+
isolating: true
|
588
|
+
});
|
589
|
+
export const tableCell = createPMNodeSpecFactory({
|
590
|
+
content: '(panel | paragraph | blockquote | orderedList | bulletList | rule | heading | codeBlock | mediaGroup | mediaSingle | decisionList | taskList | extension | blockCard | nestedExpand | embedCard)+',
|
591
|
+
marks: 'alignment indentation link',
|
592
|
+
attrs: {
|
593
|
+
colspan: {
|
594
|
+
default: 1
|
595
|
+
},
|
596
|
+
rowspan: {
|
597
|
+
default: 1
|
598
|
+
},
|
599
|
+
colwidth: {
|
600
|
+
default: []
|
601
|
+
},
|
602
|
+
background: {
|
603
|
+
default: ''
|
604
|
+
}
|
605
|
+
},
|
606
|
+
selectable: false,
|
607
|
+
isolating: true
|
608
|
+
});
|
609
|
+
export const nestedExpandWithNoMarks = createPMNodeSpecFactory({
|
610
|
+
content: '(paragraph | heading | mediaSingle | mediaGroup | codeBlock | bulletList | orderedList | taskList | decisionList | rule | panel | blockquote)+',
|
611
|
+
marks: 'link',
|
612
|
+
attrs: {
|
613
|
+
title: {
|
614
|
+
default: ''
|
615
|
+
},
|
616
|
+
__expanded: {
|
617
|
+
default: true
|
618
|
+
}
|
619
|
+
},
|
620
|
+
selectable: true,
|
621
|
+
isolating: true
|
622
|
+
});
|
623
|
+
export const tableHeader = createPMNodeSpecFactory({
|
624
|
+
content: '(panel | paragraph | blockquote | orderedList | bulletList | rule | heading | codeBlock | mediaGroup | mediaSingle | decisionList | taskList | extension | blockCard | nestedExpand | embedCard)+',
|
625
|
+
marks: 'alignment indentation link',
|
626
|
+
attrs: {
|
627
|
+
colspan: {
|
628
|
+
default: 1
|
629
|
+
},
|
630
|
+
rowspan: {
|
631
|
+
default: 1
|
632
|
+
},
|
633
|
+
colwidth: {
|
634
|
+
default: []
|
635
|
+
},
|
636
|
+
background: {
|
637
|
+
default: ''
|
638
|
+
}
|
639
|
+
},
|
640
|
+
selectable: false,
|
641
|
+
isolating: true
|
642
|
+
});
|
643
|
+
export const tableRow = createPMNodeSpecFactory({
|
644
|
+
content: '(tableCell | tableHeader)*',
|
645
|
+
selectable: false
|
646
|
+
});
|
647
|
+
export const table = createPMNodeSpecFactory({
|
648
|
+
content: 'tableRow+',
|
649
|
+
group: 'block',
|
650
|
+
attrs: {
|
651
|
+
displayMode: {},
|
652
|
+
isNumberColumnEnabled: {
|
653
|
+
default: false
|
654
|
+
},
|
655
|
+
layout: {
|
656
|
+
default: 'default'
|
657
|
+
},
|
658
|
+
localId: {
|
659
|
+
default: ''
|
660
|
+
},
|
661
|
+
width: {
|
662
|
+
default: null
|
663
|
+
},
|
664
|
+
__autoSize: {
|
665
|
+
default: false
|
666
|
+
}
|
667
|
+
},
|
668
|
+
selectable: true,
|
669
|
+
isolating: true
|
670
|
+
});
|
671
|
+
export const bodiedExtension = createPMNodeSpecFactory({
|
672
|
+
content: '(panel | paragraph | blockquote | orderedList | bulletList | rule | heading | codeBlock | mediaGroup | mediaSingle | decisionList | taskList | table | extension | blockCard | embedCard)+',
|
673
|
+
marks: 'link fragment',
|
674
|
+
group: 'block',
|
675
|
+
attrs: {
|
676
|
+
extensionType: {
|
677
|
+
default: ''
|
678
|
+
},
|
679
|
+
extensionKey: {
|
680
|
+
default: ''
|
681
|
+
},
|
682
|
+
parameters: {
|
683
|
+
default: null
|
684
|
+
},
|
685
|
+
text: {
|
686
|
+
default: null
|
687
|
+
},
|
688
|
+
layout: {
|
689
|
+
default: 'default'
|
690
|
+
},
|
691
|
+
localId: {
|
692
|
+
default: null
|
693
|
+
}
|
694
|
+
},
|
695
|
+
selectable: true,
|
696
|
+
defining: true,
|
697
|
+
isolating: true
|
698
|
+
});
|
699
|
+
export const bodiedExtensionWithMarks = createPMNodeSpecFactory({
|
700
|
+
content: '(panel | paragraph | blockquote | orderedList | bulletList | rule | heading | codeBlock | mediaGroup | mediaSingle | decisionList | taskList | table | extension | blockCard | embedCard)+',
|
701
|
+
marks: 'link fragment',
|
702
|
+
group: 'block',
|
703
|
+
attrs: {
|
704
|
+
extensionType: {
|
705
|
+
default: ''
|
706
|
+
},
|
707
|
+
extensionKey: {
|
708
|
+
default: ''
|
709
|
+
},
|
710
|
+
parameters: {
|
711
|
+
default: null
|
712
|
+
},
|
713
|
+
text: {
|
714
|
+
default: null
|
715
|
+
},
|
716
|
+
layout: {
|
717
|
+
default: 'default'
|
718
|
+
},
|
719
|
+
localId: {
|
720
|
+
default: null
|
721
|
+
}
|
722
|
+
},
|
723
|
+
selectable: true,
|
724
|
+
defining: true,
|
725
|
+
isolating: true
|
726
|
+
});
|
727
|
+
export const expand = createPMNodeSpecFactory({
|
728
|
+
content: '(panel | paragraph | blockquote | orderedList | bulletList | rule | heading | codeBlock | mediaGroup | mediaSingle | decisionList | taskList | table | extension | blockCard | embedCard)+',
|
729
|
+
marks: 'link fragment',
|
730
|
+
group: 'block',
|
731
|
+
attrs: {
|
732
|
+
title: {
|
733
|
+
default: ''
|
734
|
+
},
|
735
|
+
__expanded: {
|
736
|
+
default: true
|
737
|
+
}
|
738
|
+
},
|
739
|
+
selectable: true,
|
740
|
+
isolating: true
|
741
|
+
});
|
742
|
+
export const expandWithBreakoutMark = createPMNodeSpecFactory({
|
743
|
+
content: '(panel | paragraph | blockquote | orderedList | bulletList | rule | heading | codeBlock | mediaGroup | mediaSingle | decisionList | taskList | table | extension | blockCard | embedCard)+',
|
744
|
+
marks: 'link fragment',
|
745
|
+
group: 'block',
|
746
|
+
attrs: {
|
747
|
+
title: {
|
748
|
+
default: ''
|
749
|
+
},
|
750
|
+
__expanded: {
|
751
|
+
default: true
|
752
|
+
}
|
753
|
+
},
|
754
|
+
selectable: true,
|
755
|
+
isolating: true
|
756
|
+
});
|
757
|
+
export const expandWithNoMark = createPMNodeSpecFactory({
|
758
|
+
content: '(panel | paragraph | blockquote | orderedList | bulletList | rule | heading | codeBlock | mediaGroup | mediaSingle | decisionList | taskList | table | extension | blockCard | embedCard)+',
|
759
|
+
marks: 'link fragment',
|
760
|
+
group: 'block',
|
761
|
+
attrs: {
|
762
|
+
title: {
|
763
|
+
default: ''
|
764
|
+
},
|
765
|
+
__expanded: {
|
766
|
+
default: true
|
767
|
+
}
|
768
|
+
},
|
769
|
+
selectable: true,
|
770
|
+
isolating: true
|
771
|
+
});
|
772
|
+
export const layoutColumn = createPMNodeSpecFactory({
|
773
|
+
content: 'block+',
|
774
|
+
marks: 'breakout link alignment indentation dataConsumer fragment',
|
775
|
+
attrs: {
|
776
|
+
width: {}
|
777
|
+
},
|
778
|
+
selectable: false,
|
779
|
+
isolating: true
|
780
|
+
});
|
781
|
+
export const layoutSection = createPMNodeSpecFactory({
|
782
|
+
content: 'layoutColumn{1,3}',
|
783
|
+
isolating: true
|
784
|
+
});
|
785
|
+
export const layoutSectionFull = createPMNodeSpecFactory({
|
786
|
+
content: 'layoutColumn{1,3}',
|
787
|
+
isolating: true
|
788
|
+
});
|
789
|
+
export const doc = createPMNodeSpecFactory({
|
790
|
+
content: '(block | layoutSection | blockRootOnly)*',
|
791
|
+
marks: 'breakout link alignment indentation dataConsumer fragment'
|
792
|
+
});
|