@atlaskit/adf-schema 19.1.0 → 19.2.3
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 +28 -0
- package/dist/cjs/index.js +8 -2
- package/dist/cjs/schema/default-schema.js +4 -1
- package/dist/cjs/schema/index.js +14 -2
- package/dist/cjs/schema/marks/link.js +31 -2
- package/dist/cjs/schema/nodes/index.js +14 -2
- package/dist/cjs/schema/nodes/layout-section.js +35 -3
- package/dist/cjs/schema/nodes/tableNodes.js +13 -9
- package/dist/cjs/steps/analytics.js +3 -3
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/index.js +1 -1
- package/dist/es2019/schema/default-schema.js +3 -1
- package/dist/es2019/schema/index.js +1 -1
- package/dist/es2019/schema/marks/link.js +27 -2
- package/dist/es2019/schema/nodes/index.js +2 -2
- package/dist/es2019/schema/nodes/layout-section.js +34 -1
- package/dist/es2019/schema/nodes/tableNodes.js +10 -9
- package/dist/es2019/steps/analytics.js +2 -2
- package/dist/es2019/version.json +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/schema/default-schema.js +3 -1
- package/dist/esm/schema/index.js +1 -1
- package/dist/esm/schema/marks/link.js +31 -2
- package/dist/esm/schema/nodes/index.js +2 -2
- package/dist/esm/schema/nodes/layout-section.js +32 -1
- package/dist/esm/schema/nodes/tableNodes.js +10 -9
- package/dist/esm/steps/analytics.js +3 -3
- package/dist/esm/version.json +1 -1
- package/dist/json-schema/v1/full.json +42 -8
- package/dist/json-schema/v1/stage-0.json +81 -8
- package/dist/types/index.d.ts +2 -2
- package/dist/types/schema/index.d.ts +2 -2
- package/dist/types/schema/nodes/index.d.ts +3 -3
- package/dist/types/schema/nodes/layout-section.d.ts +28 -1
- package/dist/types/schema/nodes/tableNodes.d.ts +11 -1
- package/json-schema/v1/full.json +42 -8
- package/json-schema/v1/stage-0.json +81 -8
- package/package.json +2 -2
@@ -23,7 +23,7 @@ export { media, copyPrivateAttributes as copyPrivateMediaAttributes, toJSON as m
|
|
23
23
|
export { mediaGroup } from './media-group';
|
24
24
|
export { mediaInline } from './media-inline';
|
25
25
|
export { mediaSingle, mediaSingleWithCaption, toJSON as mediaSingleToJSON } from './media-single';
|
26
|
-
export { table, tableToJSON, tableCell, toJSONTableCell, tableHeader, toJSONTableHeader, tableRow, tableBackgroundColorPalette, tableBackgroundBorderColor, tableBackgroundColorNames,
|
26
|
+
export { table, tableToJSON, tableCell, toJSONTableCell, tableHeader, toJSONTableHeader, tableRow, tableBackgroundColorPalette, tableBackgroundBorderColor, tableBackgroundColorNames, getCellAttrs, getCellDomAttrs, tablePrefixSelector, tableCellSelector, tableHeaderSelector, tableCellContentWrapperSelector, tableCellContentDomSelector } from './tableNodes';
|
27
27
|
export { decisionList, decisionListSelector } from './decision-list';
|
28
28
|
export { decisionItem } from './decision-item';
|
29
29
|
export { taskList, taskListSelector } from './task-list';
|
@@ -33,7 +33,7 @@ export { inlineExtension } from './inline-extension';
|
|
33
33
|
export { bodiedExtension } from './bodied-extension';
|
34
34
|
export { date } from './date';
|
35
35
|
export { placeholder } from './placeholder';
|
36
|
-
export { layoutSection } from './layout-section';
|
36
|
+
export { layoutSection, layoutSectionWithSingleColumn } from './layout-section';
|
37
37
|
export { layoutColumn } from './layout-column';
|
38
38
|
export { inlineCard } from './inline-card';
|
39
39
|
export { blockCard } from './block-card';
|
@@ -1,8 +1,39 @@
|
|
1
1
|
/**
|
2
2
|
* @name layoutSection_node
|
3
3
|
*/
|
4
|
+
|
5
|
+
/**
|
6
|
+
* Need duplicate `type` and `marks` to make both validator and json-schema satisfied
|
7
|
+
*/
|
8
|
+
|
9
|
+
/**
|
10
|
+
* @name layoutSection_full_node
|
11
|
+
*/
|
12
|
+
|
13
|
+
/**
|
14
|
+
* @stage 0
|
15
|
+
* @name layoutSection_with_single_column_node
|
16
|
+
*/
|
4
17
|
export var layoutSection = {
|
5
|
-
content: '(layoutColumn | unsupportedBlock){
|
18
|
+
content: '(layoutColumn | unsupportedBlock){1,3} unsupportedBlock* | unsupportedBlock+',
|
19
|
+
marks: 'unsupportedMark unsupportedNodeAttribute',
|
20
|
+
isolating: true,
|
21
|
+
parseDOM: [{
|
22
|
+
context: 'layoutSection//|layoutColumn//',
|
23
|
+
tag: 'div[data-layout-section]',
|
24
|
+
skip: true
|
25
|
+
}, {
|
26
|
+
tag: 'div[data-layout-section]'
|
27
|
+
}],
|
28
|
+
toDOM: function toDOM() {
|
29
|
+
var attrs = {
|
30
|
+
'data-layout-section': 'true'
|
31
|
+
};
|
32
|
+
return ['div', attrs, 0];
|
33
|
+
}
|
34
|
+
};
|
35
|
+
export var layoutSectionWithSingleColumn = {
|
36
|
+
content: '(layoutColumn | unsupportedBlock){1,3} unsupportedBlock* | unsupportedBlock+',
|
6
37
|
marks: 'unsupportedMark unsupportedNodeAttribute',
|
7
38
|
isolating: true,
|
8
39
|
parseDOM: [{
|
@@ -7,8 +7,7 @@ export var tableHeaderSelector = "".concat(tablePrefixSelector, "-header-content
|
|
7
7
|
export var tableCellContentWrapperSelector = "".concat(tablePrefixSelector, "-cell-nodeview-wrapper");
|
8
8
|
export var tableCellContentDomSelector = "".concat(tablePrefixSelector, "-cell-nodeview-content-dom");
|
9
9
|
var DEFAULT_TABLE_HEADER_CELL_BACKGROUND = N20.toLocaleLowerCase();
|
10
|
-
|
11
|
-
var getCellAttrs = function getCellAttrs(dom) {
|
10
|
+
export var getCellAttrs = function getCellAttrs(dom) {
|
12
11
|
var defaultValues = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
13
12
|
var widthAttr = dom.getAttribute('data-colwidth');
|
14
13
|
var width = widthAttr && /^\d+(,\d+)*$/.test(widthAttr) ? widthAttr.split(',').map(function (str) {
|
@@ -33,17 +32,19 @@ var getCellAttrs = function getCellAttrs(dom) {
|
|
33
32
|
};
|
34
33
|
};
|
35
34
|
|
36
|
-
|
35
|
+
/**
|
36
|
+
* gets cell dom attributes based on node attributes
|
37
|
+
* @returns CellDomAttrs
|
38
|
+
*/
|
39
|
+
export var getCellDomAttrs = function getCellDomAttrs(node) {
|
37
40
|
var attrs = {};
|
38
41
|
var nodeType = node.type.name;
|
39
|
-
var colspan = cell ? parseInt(cell.getAttribute('colspan') || '1', 10) : 1;
|
40
|
-
var rowspan = cell ? parseInt(cell.getAttribute('rowspan') || '1', 10) : 1;
|
41
42
|
|
42
|
-
if (node.attrs.colspan !==
|
43
|
+
if (node.attrs.colspan !== 1) {
|
43
44
|
attrs.colspan = node.attrs.colspan;
|
44
45
|
}
|
45
46
|
|
46
|
-
if (node.attrs.rowspan !==
|
47
|
+
if (node.attrs.rowspan !== 1) {
|
47
48
|
attrs.rowspan = node.attrs.rowspan;
|
48
49
|
}
|
49
50
|
|
@@ -201,7 +202,7 @@ export var tableCell = {
|
|
201
202
|
}
|
202
203
|
}],
|
203
204
|
toDOM: function toDOM(node) {
|
204
|
-
return ['td',
|
205
|
+
return ['td', getCellDomAttrs(node), 0];
|
205
206
|
}
|
206
207
|
};
|
207
208
|
export var toJSONTableCell = function toJSONTableCell(node) {
|
@@ -231,7 +232,7 @@ export var tableHeader = {
|
|
231
232
|
}
|
232
233
|
}],
|
233
234
|
toDOM: function toDOM(node) {
|
234
|
-
return ['th',
|
235
|
+
return ['th', getCellDomAttrs(node), 0];
|
235
236
|
}
|
236
237
|
};
|
237
238
|
export var toJSONTableHeader = toJSONTableCell;
|
@@ -68,12 +68,12 @@ export var AnalyticsStep = /*#__PURE__*/function (_Step) {
|
|
68
68
|
|
69
69
|
var _super = _createSuper(AnalyticsStep);
|
70
70
|
|
71
|
-
function AnalyticsStep(analyticsEvents)
|
72
|
-
{
|
71
|
+
function AnalyticsStep(analyticsEvents) {
|
73
72
|
var _this;
|
74
73
|
|
75
74
|
var actionsToIgnore = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
76
|
-
var pos
|
75
|
+
var pos // Used to create the map, prevent splitting history.
|
76
|
+
= arguments.length > 2 ? arguments[2] : undefined;
|
77
77
|
|
78
78
|
_classCallCheck(this, AnalyticsStep);
|
79
79
|
|
package/dist/esm/version.json
CHANGED
@@ -2368,18 +2368,16 @@
|
|
2368
2368
|
"layoutSection"
|
2369
2369
|
]
|
2370
2370
|
},
|
2371
|
-
"
|
2371
|
+
"marks": {
|
2372
2372
|
"type": "array",
|
2373
2373
|
"items": {
|
2374
|
-
"$ref": "#/definitions/
|
2375
|
-
}
|
2376
|
-
"minItems": 2,
|
2377
|
-
"maxItems": 3
|
2374
|
+
"$ref": "#/definitions/breakout_mark"
|
2375
|
+
}
|
2378
2376
|
},
|
2379
|
-
"
|
2377
|
+
"content": {
|
2380
2378
|
"type": "array",
|
2381
2379
|
"items": {
|
2382
|
-
"$ref": "#/definitions/
|
2380
|
+
"$ref": "#/definitions/layoutColumn_node"
|
2383
2381
|
}
|
2384
2382
|
}
|
2385
2383
|
},
|
@@ -2389,6 +2387,42 @@
|
|
2389
2387
|
],
|
2390
2388
|
"additionalProperties": false
|
2391
2389
|
},
|
2390
|
+
"layoutSection_full_node": {
|
2391
|
+
"allOf": [
|
2392
|
+
{
|
2393
|
+
"$ref": "#/definitions/layoutSection_node"
|
2394
|
+
},
|
2395
|
+
{
|
2396
|
+
"type": "object",
|
2397
|
+
"properties": {
|
2398
|
+
"type": {
|
2399
|
+
"enum": [
|
2400
|
+
"layoutSection"
|
2401
|
+
]
|
2402
|
+
},
|
2403
|
+
"marks": {
|
2404
|
+
"type": "array",
|
2405
|
+
"items": {
|
2406
|
+
"$ref": "#/definitions/breakout_mark"
|
2407
|
+
}
|
2408
|
+
},
|
2409
|
+
"content": {
|
2410
|
+
"type": "array",
|
2411
|
+
"items": {
|
2412
|
+
"$ref": "#/definitions/layoutColumn_node"
|
2413
|
+
},
|
2414
|
+
"minItems": 2,
|
2415
|
+
"maxItems": 3
|
2416
|
+
}
|
2417
|
+
},
|
2418
|
+
"required": [
|
2419
|
+
"type",
|
2420
|
+
"content"
|
2421
|
+
],
|
2422
|
+
"additionalProperties": false
|
2423
|
+
}
|
2424
|
+
]
|
2425
|
+
},
|
2392
2426
|
"doc_node": {
|
2393
2427
|
"type": "object",
|
2394
2428
|
"properties": {
|
@@ -2485,7 +2519,7 @@
|
|
2485
2519
|
"$ref": "#/definitions/bodiedExtension_with_marks_node"
|
2486
2520
|
},
|
2487
2521
|
{
|
2488
|
-
"$ref": "#/definitions/
|
2522
|
+
"$ref": "#/definitions/layoutSection_full_node"
|
2489
2523
|
}
|
2490
2524
|
]
|
2491
2525
|
}
|
@@ -2527,18 +2527,16 @@
|
|
2527
2527
|
"layoutSection"
|
2528
2528
|
]
|
2529
2529
|
},
|
2530
|
-
"
|
2530
|
+
"marks": {
|
2531
2531
|
"type": "array",
|
2532
2532
|
"items": {
|
2533
|
-
"$ref": "#/definitions/
|
2534
|
-
}
|
2535
|
-
"minItems": 2,
|
2536
|
-
"maxItems": 3
|
2533
|
+
"$ref": "#/definitions/breakout_mark"
|
2534
|
+
}
|
2537
2535
|
},
|
2538
|
-
"
|
2536
|
+
"content": {
|
2539
2537
|
"type": "array",
|
2540
2538
|
"items": {
|
2541
|
-
"$ref": "#/definitions/
|
2539
|
+
"$ref": "#/definitions/layoutColumn_node"
|
2542
2540
|
}
|
2543
2541
|
}
|
2544
2542
|
},
|
@@ -2548,6 +2546,78 @@
|
|
2548
2546
|
],
|
2549
2547
|
"additionalProperties": false
|
2550
2548
|
},
|
2549
|
+
"layoutSection_full_node": {
|
2550
|
+
"allOf": [
|
2551
|
+
{
|
2552
|
+
"$ref": "#/definitions/layoutSection_node"
|
2553
|
+
},
|
2554
|
+
{
|
2555
|
+
"type": "object",
|
2556
|
+
"properties": {
|
2557
|
+
"type": {
|
2558
|
+
"enum": [
|
2559
|
+
"layoutSection"
|
2560
|
+
]
|
2561
|
+
},
|
2562
|
+
"marks": {
|
2563
|
+
"type": "array",
|
2564
|
+
"items": {
|
2565
|
+
"$ref": "#/definitions/breakout_mark"
|
2566
|
+
}
|
2567
|
+
},
|
2568
|
+
"content": {
|
2569
|
+
"type": "array",
|
2570
|
+
"items": {
|
2571
|
+
"$ref": "#/definitions/layoutColumn_node"
|
2572
|
+
},
|
2573
|
+
"minItems": 2,
|
2574
|
+
"maxItems": 3
|
2575
|
+
}
|
2576
|
+
},
|
2577
|
+
"required": [
|
2578
|
+
"type",
|
2579
|
+
"content"
|
2580
|
+
],
|
2581
|
+
"additionalProperties": false
|
2582
|
+
}
|
2583
|
+
]
|
2584
|
+
},
|
2585
|
+
"layoutSection_with_single_column_node": {
|
2586
|
+
"allOf": [
|
2587
|
+
{
|
2588
|
+
"$ref": "#/definitions/layoutSection_node"
|
2589
|
+
},
|
2590
|
+
{
|
2591
|
+
"type": "object",
|
2592
|
+
"properties": {
|
2593
|
+
"type": {
|
2594
|
+
"enum": [
|
2595
|
+
"layoutSection"
|
2596
|
+
]
|
2597
|
+
},
|
2598
|
+
"marks": {
|
2599
|
+
"type": "array",
|
2600
|
+
"items": {
|
2601
|
+
"$ref": "#/definitions/breakout_mark"
|
2602
|
+
}
|
2603
|
+
},
|
2604
|
+
"content": {
|
2605
|
+
"type": "array",
|
2606
|
+
"items": {
|
2607
|
+
"$ref": "#/definitions/layoutColumn_node"
|
2608
|
+
},
|
2609
|
+
"minItems": 1,
|
2610
|
+
"maxItems": 3
|
2611
|
+
}
|
2612
|
+
},
|
2613
|
+
"required": [
|
2614
|
+
"type",
|
2615
|
+
"content"
|
2616
|
+
],
|
2617
|
+
"additionalProperties": false
|
2618
|
+
}
|
2619
|
+
]
|
2620
|
+
},
|
2551
2621
|
"doc_node": {
|
2552
2622
|
"type": "object",
|
2553
2623
|
"properties": {
|
@@ -2647,7 +2717,10 @@
|
|
2647
2717
|
"$ref": "#/definitions/bodiedExtension_with_marks_node"
|
2648
2718
|
},
|
2649
2719
|
{
|
2650
|
-
"$ref": "#/definitions/
|
2720
|
+
"$ref": "#/definitions/layoutSection_full_node"
|
2721
|
+
},
|
2722
|
+
{
|
2723
|
+
"$ref": "#/definitions/layoutSection_with_single_column_node"
|
2651
2724
|
}
|
2652
2725
|
]
|
2653
2726
|
}
|
package/dist/types/index.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
export { AnnotationTypes, PanelType, alignment, alignmentPositionMap, annotation, bitbucketSchema, blockCard, blockquote, bodiedExtension, breakout, bulletList, bulletListSelector, caption, code, codeBlock, codeBlockToJSON, colorPalette, colorPaletteExtended, confluenceInlineComment, confluenceJiraIssue, confluenceSchema, confluenceSchemaWithMediaSingle, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, createJIRASchema, createSchema, dataConsumer, dataConsumerToJSON, date, decisionItem, decisionList, decisionListSelector, defaultSchema, defaultSchemaConfig, doc, em, embedCard, emoji, expand, expandToJSON, extension, getSchemaBasedOnStage, hardBreak, heading, image, indentation, inlineCard, inlineExtension, inlineNodes, isSchemaWithAdvancedTextFormattingMarks, isSchemaWithBlockQuotes, isSchemaWithCodeBlock, isSchemaWithEmojis, isSchemaWithLinks, isSchemaWithLists, isSchemaWithMedia, isSchemaWithMentions, isSchemaWithSubSupMark, isSchemaWithTables, isSchemaWithTextColor, layoutColumn, layoutSection, link, linkToJSON, listItem, media, mediaGroup, mediaSingle, mediaSingleWithCaption, mediaInline, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, orderedList, orderedListSelector, panel, customPanel, paragraph, placeholder, rule, sanitizeNodes,
|
2
|
-
export type { AlignmentAttributes, AlignmentMarkDefinition, AnnotationMarkAttributes, AnnotationMarkDefinition, BlockCardDefinition, BlockContent, BlockQuoteDefinition, BodiedExtensionDefinition, BodiedExtensionWithMarksDefinition, BreakoutMarkAttrs, BreakoutMarkDefinition, BulletListDefinition, CaptionDefinition, CardAttributes, CellAttributes, CodeBlockAttrs, CodeBlockBaseDefinition, CodeBlockDefinition, CodeBlockWithMarksDefinition, CodeDefinition, DataConsumerAttributes, DataConsumerDefinition, DataType, DateDefinition, DecisionItemDefinition, DecisionListDefinition, DocNode, EmbedCardDefinition, EmbedCardAttributes, EmDefinition, EmojiAttributes, EmojiDefinition, ExpandDefinition, ExtensionDefinition, ExtensionWithMarksDefinition, ExtensionLayout, ExternalMediaAttributes, HardBreakDefinition, HeadingBaseDefinition, HeadingDefinition, HeadingWithAlignmentDefinition, HeadingWithIndentationDefinition, HeadingWithMarksDefinition, IndentationMarkAttributes, IndentationMarkDefinition, Inline, InlineAtomic, InlineCardDefinition, InlineCode, InlineExtensionDefinition, InlineExtensionWithMarksDefinition, InlineFormattedText, InlineLinkText, LayoutColumnDefinition, LayoutSectionDefinition, LinkAttributes, LinkDefinition, 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, StrikeDefinition, StrongDefinition, SubSupAttributes, SubSupDefinition, TableAttributes, TableCellDefinition, TableDefinition, TableHeaderDefinition, TableLayout, TableRowDefinition, TaskItemDefinition, TaskListContent, TaskListDefinition, TextColorAttributes, TextColorDefinition, TextDefinition, UnderlineDefinition, UrlType, AnnotationId, RichMediaAttributes, RichMediaLayout, AnnotationDataAttributes, CellDomAttrs, } from './schema';
|
1
|
+
export { AnnotationTypes, PanelType, alignment, alignmentPositionMap, annotation, bitbucketSchema, blockCard, blockquote, bodiedExtension, breakout, bulletList, bulletListSelector, caption, code, codeBlock, codeBlockToJSON, colorPalette, colorPaletteExtended, confluenceInlineComment, confluenceJiraIssue, confluenceSchema, confluenceSchemaWithMediaSingle, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, createJIRASchema, createSchema, dataConsumer, dataConsumerToJSON, date, decisionItem, decisionList, decisionListSelector, defaultSchema, defaultSchemaConfig, doc, em, embedCard, emoji, expand, expandToJSON, extension, getSchemaBasedOnStage, hardBreak, heading, image, indentation, inlineCard, inlineExtension, inlineNodes, isSchemaWithAdvancedTextFormattingMarks, isSchemaWithBlockQuotes, isSchemaWithCodeBlock, isSchemaWithEmojis, isSchemaWithLinks, isSchemaWithLists, isSchemaWithMedia, isSchemaWithMentions, isSchemaWithSubSupMark, isSchemaWithTables, isSchemaWithTextColor, layoutColumn, layoutSection, link, linkToJSON, listItem, media, mediaGroup, mediaSingle, mediaSingleWithCaption, mediaInline, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, orderedList, orderedListSelector, panel, customPanel, paragraph, placeholder, rule, sanitizeNodes, getCellAttrs, getCellDomAttrs, status, strike, strong, subsup, table, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, taskList, taskListSelector, text, textColor, toJSONTableCell, toJSONTableHeader, typeAheadQuery, underline, unknownBlock, unsupportedBlock, unsupportedInline, unsupportedNodeTypesForMediaCards, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute, } from './schema';
|
2
|
+
export type { AlignmentAttributes, AlignmentMarkDefinition, AnnotationMarkAttributes, AnnotationMarkDefinition, BlockCardDefinition, BlockContent, BlockQuoteDefinition, BodiedExtensionDefinition, BodiedExtensionWithMarksDefinition, BreakoutMarkAttrs, BreakoutMarkDefinition, BulletListDefinition, CaptionDefinition, CardAttributes, CellAttributes, CodeBlockAttrs, CodeBlockBaseDefinition, CodeBlockDefinition, CodeBlockWithMarksDefinition, CodeDefinition, DataConsumerAttributes, DataConsumerDefinition, DataType, DateDefinition, DecisionItemDefinition, DecisionListDefinition, DocNode, EmbedCardDefinition, EmbedCardAttributes, EmDefinition, EmojiAttributes, EmojiDefinition, ExpandDefinition, ExtensionDefinition, ExtensionWithMarksDefinition, ExtensionLayout, ExternalMediaAttributes, HardBreakDefinition, HeadingBaseDefinition, HeadingDefinition, HeadingWithAlignmentDefinition, HeadingWithIndentationDefinition, HeadingWithMarksDefinition, IndentationMarkAttributes, IndentationMarkDefinition, Inline, InlineAtomic, InlineCardDefinition, InlineCode, InlineExtensionDefinition, InlineExtensionWithMarksDefinition, InlineFormattedText, InlineLinkText, LayoutColumnDefinition, LayoutSectionDefinition, LayoutSectionFullDefinition, LayoutSectionWithSingleColumnDefinition, LinkAttributes, LinkDefinition, 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, StrikeDefinition, StrongDefinition, SubSupAttributes, SubSupDefinition, TableAttributes, TableCellDefinition, TableDefinition, TableHeaderDefinition, TableLayout, TableRowDefinition, TaskItemDefinition, TaskListContent, TaskListDefinition, TextColorAttributes, TextColorDefinition, TextDefinition, UnderlineDefinition, UrlType, AnnotationId, RichMediaAttributes, RichMediaLayout, AnnotationDataAttributes, CellDomAttrs, } from './schema';
|
3
3
|
export { B100, B400, B50, B500, B75, G200, G300, G400, G50, G500, G75, N0, N20, N200, N30, N300, N40, N50, N500, N60, N80, N800, N90, P100, P300, P400, P50, P500, P75, R100, R300, R400, R50, R500, R75, T100, T300, T50, T500, T75, Y200, Y400, Y50, Y500, Y75, acNameToEmoji, acShortcutToEmoji, emojiIdToAcName, generateUuid, getEmojiAcName, getLinkMatch, hexToRgb, hexToRgba, isHex, isRgb, isSafeUrl, normalizeHexColor, normalizeUrl, rgbToHex, uuid, } from './utils';
|
4
4
|
export type { Match, NameToEmoji } from './utils';
|
@@ -1,5 +1,5 @@
|
|
1
|
-
export { PanelType, blockCard, blockquote, 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, listItem, media, mediaGroup, mediaSingle, mediaInline, mediaSingleWithCaption, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, orderedList, orderedListSelector, panel, customPanel, paragraph, placeholder, rule,
|
2
|
-
export type { BlockCardDefinition, BlockContent, BlockQuoteDefinition, BodiedExtensionDefinition, BodiedExtensionWithMarksDefinition, BulletListDefinition, CaptionDefinition, CardAttributes, CellAttributes, CodeBlockAttrs, CodeBlockBaseDefinition, CodeBlockDefinition, CodeBlockWithMarksDefinition, DataType, DateDefinition, DecisionItemDefinition, DecisionListDefinition, DocNode, EmbedCardDefinition, EmbedCardAttributes, EmojiAttributes, EmojiDefinition, ExpandDefinition, ExtensionDefinition, ExtensionWithMarksDefinition, ExtensionLayout, ExternalMediaAttributes, HardBreakDefinition, HeadingBaseDefinition, HeadingDefinition, HeadingWithAlignmentDefinition, HeadingWithIndentationDefinition, HeadingWithMarksDefinition, Inline, InlineAtomic, InlineCardDefinition, InlineCode, InlineExtensionDefinition, InlineExtensionWithMarksDefinition, InlineFormattedText, InlineLinkText, LayoutColumnDefinition, LayoutSectionDefinition, 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, TableHeaderDefinition, TableLayout, TableRowDefinition, TaskItemDefinition, TaskListContent, TaskListDefinition, TextDefinition, UrlType, RichMediaAttributes, RichMediaLayout, CellDomAttrs, } from './nodes';
|
1
|
+
export { PanelType, blockCard, blockquote, 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, media, mediaGroup, mediaSingle, mediaInline, mediaSingleWithCaption, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, orderedList, orderedListSelector, panel, customPanel, paragraph, placeholder, rule, getCellAttrs, getCellDomAttrs, status, table, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline, } from './nodes';
|
2
|
+
export type { BlockCardDefinition, BlockContent, BlockQuoteDefinition, BodiedExtensionDefinition, BodiedExtensionWithMarksDefinition, BulletListDefinition, CaptionDefinition, CardAttributes, CellAttributes, CodeBlockAttrs, CodeBlockBaseDefinition, CodeBlockDefinition, CodeBlockWithMarksDefinition, DataType, DateDefinition, DecisionItemDefinition, DecisionListDefinition, DocNode, EmbedCardDefinition, EmbedCardAttributes, EmojiAttributes, EmojiDefinition, ExpandDefinition, ExtensionDefinition, ExtensionWithMarksDefinition, ExtensionLayout, ExternalMediaAttributes, HardBreakDefinition, HeadingBaseDefinition, HeadingDefinition, HeadingWithAlignmentDefinition, HeadingWithIndentationDefinition, HeadingWithMarksDefinition, Inline, InlineAtomic, InlineCardDefinition, InlineCode, InlineExtensionDefinition, InlineExtensionWithMarksDefinition, 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, TableHeaderDefinition, TableLayout, TableRowDefinition, TaskItemDefinition, TaskListContent, TaskListDefinition, TextDefinition, UrlType, RichMediaAttributes, RichMediaLayout, CellDomAttrs, } from './nodes';
|
3
3
|
export { AnnotationTypes, alignment, alignmentPositionMap, annotation, breakout, code, colorPalette, colorPaletteExtended, confluenceInlineComment, dataConsumer, dataConsumerToJSON, em, indentation, link, linkToJSON, strike, strong, subsup, textColor, typeAheadQuery, underline, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute, } from './marks';
|
4
4
|
export type { AlignmentAttributes, AlignmentMarkDefinition, AnnotationMarkAttributes, AnnotationMarkDefinition, BreakoutMarkAttrs, BreakoutMarkDefinition, CodeDefinition, EmDefinition, IndentationMarkAttributes, IndentationMarkDefinition, LinkAttributes, LinkDefinition, StrikeDefinition, StrongDefinition, SubSupAttributes, SubSupDefinition, TextColorAttributes, TextColorDefinition, UnderlineDefinition, AnnotationId, AnnotationDataAttributes, DataConsumerAttributes, DataConsumerDefinition, } from './marks';
|
5
5
|
export { unsupportedNodeTypesForMediaCards } from './unsupported';
|
@@ -43,7 +43,7 @@ export type { MediaInlineAttributes, MediaInlineDefinition, } from './media-inli
|
|
43
43
|
export type { MediaGroupDefinition } from './media-group';
|
44
44
|
export { mediaSingle, mediaSingleWithCaption, toJSON as mediaSingleToJSON, } from './media-single';
|
45
45
|
export type { MediaSingleDefinition } from './media-single';
|
46
|
-
export { table, tableToJSON, tableCell, toJSONTableCell, tableHeader, toJSONTableHeader, tableRow, tableBackgroundColorPalette, tableBackgroundBorderColor, tableBackgroundColorNames,
|
46
|
+
export { table, tableToJSON, tableCell, toJSONTableCell, tableHeader, toJSONTableHeader, tableRow, tableBackgroundColorPalette, tableBackgroundBorderColor, tableBackgroundColorNames, getCellAttrs, getCellDomAttrs, tablePrefixSelector, tableCellSelector, tableHeaderSelector, tableCellContentWrapperSelector, tableCellContentDomSelector, } from './tableNodes';
|
47
47
|
export type { TableAttributes, CellAttributes, Layout as TableLayout, TableDefinition, TableCell as TableCellDefinition, TableHeader as TableHeaderDefinition, TableRow as TableRowDefinition, CellDomAttrs, } from './tableNodes';
|
48
48
|
export { decisionList, decisionListSelector } from './decision-list';
|
49
49
|
export type { DecisionListDefinition } from './decision-list';
|
@@ -63,8 +63,8 @@ export { date } from './date';
|
|
63
63
|
export type { DateDefinition } from './date';
|
64
64
|
export { placeholder } from './placeholder';
|
65
65
|
export type { PlaceholderDefinition } from './placeholder';
|
66
|
-
export { layoutSection } from './layout-section';
|
67
|
-
export type { LayoutSectionDefinition } from './layout-section';
|
66
|
+
export { layoutSection, layoutSectionWithSingleColumn } from './layout-section';
|
67
|
+
export type { LayoutSectionDefinition, LayoutSectionBaseDefinition, LayoutSectionFullDefinition, LayoutSectionWithSingleColumnDefinition, } from './layout-section';
|
68
68
|
export { layoutColumn } from './layout-column';
|
69
69
|
export type { LayoutColumnDefinition } from './layout-column';
|
70
70
|
export { inlineCard } from './inline-card';
|
@@ -4,14 +4,41 @@ import { BreakoutMarkDefinition } from '../marks';
|
|
4
4
|
/**
|
5
5
|
* @name layoutSection_node
|
6
6
|
*/
|
7
|
-
export declare type
|
7
|
+
export declare type LayoutSectionBaseDefinition = {
|
8
8
|
type: 'layoutSection';
|
9
|
+
marks?: Array<BreakoutMarkDefinition>;
|
10
|
+
content: Array<LayoutColumnDefinition>;
|
11
|
+
};
|
12
|
+
/**
|
13
|
+
* Need duplicate `type` and `marks` to make both validator and json-schema satisfied
|
14
|
+
*/
|
15
|
+
/**
|
16
|
+
* @name layoutSection_full_node
|
17
|
+
*/
|
18
|
+
export declare type LayoutSectionFullDefinition = LayoutSectionBaseDefinition & {
|
19
|
+
type: 'layoutSection';
|
20
|
+
marks?: Array<BreakoutMarkDefinition>;
|
9
21
|
/**
|
10
22
|
* @minItems 2
|
11
23
|
* @maxItems 3
|
12
24
|
* @allowUnsupportedBlock true
|
13
25
|
*/
|
14
26
|
content: Array<LayoutColumnDefinition>;
|
27
|
+
};
|
28
|
+
/**
|
29
|
+
* @stage 0
|
30
|
+
* @name layoutSection_with_single_column_node
|
31
|
+
*/
|
32
|
+
export declare type LayoutSectionWithSingleColumnDefinition = LayoutSectionBaseDefinition & {
|
33
|
+
type: 'layoutSection';
|
15
34
|
marks?: Array<BreakoutMarkDefinition>;
|
35
|
+
/**
|
36
|
+
* @minItems 1
|
37
|
+
* @maxItems 3
|
38
|
+
* @allowUnsupportedBlock true
|
39
|
+
*/
|
40
|
+
content: Array<LayoutColumnDefinition>;
|
16
41
|
};
|
42
|
+
export declare type LayoutSectionDefinition = LayoutSectionFullDefinition | LayoutSectionWithSingleColumnDefinition;
|
17
43
|
export declare const layoutSection: NodeSpec;
|
44
|
+
export declare const layoutSectionWithSingleColumn: NodeSpec;
|
@@ -22,6 +22,12 @@ export declare const tableCellSelector: string;
|
|
22
22
|
export declare const tableHeaderSelector: string;
|
23
23
|
export declare const tableCellContentWrapperSelector: string;
|
24
24
|
export declare const tableCellContentDomSelector: string;
|
25
|
+
export declare const getCellAttrs: (dom: HTMLElement, defaultValues?: CellAttributes) => {
|
26
|
+
colspan: number;
|
27
|
+
rowspan: number;
|
28
|
+
colwidth: number[] | null;
|
29
|
+
background: string | null;
|
30
|
+
};
|
25
31
|
export declare type CellDomAttrs = {
|
26
32
|
colspan?: string;
|
27
33
|
rowspan?: string;
|
@@ -30,7 +36,11 @@ export declare type CellDomAttrs = {
|
|
30
36
|
'data-colwidth'?: string;
|
31
37
|
class?: string;
|
32
38
|
};
|
33
|
-
|
39
|
+
/**
|
40
|
+
* gets cell dom attributes based on node attributes
|
41
|
+
* @returns CellDomAttrs
|
42
|
+
*/
|
43
|
+
export declare const getCellDomAttrs: (node: PmNode) => CellDomAttrs;
|
34
44
|
export declare const tableBackgroundColorPalette: Map<string, string>;
|
35
45
|
export declare const tableBackgroundBorderColor: string;
|
36
46
|
export declare const tableBackgroundColorNames: Map<string, string>;
|
package/json-schema/v1/full.json
CHANGED
@@ -2368,18 +2368,16 @@
|
|
2368
2368
|
"layoutSection"
|
2369
2369
|
]
|
2370
2370
|
},
|
2371
|
-
"
|
2371
|
+
"marks": {
|
2372
2372
|
"type": "array",
|
2373
2373
|
"items": {
|
2374
|
-
"$ref": "#/definitions/
|
2375
|
-
}
|
2376
|
-
"minItems": 2,
|
2377
|
-
"maxItems": 3
|
2374
|
+
"$ref": "#/definitions/breakout_mark"
|
2375
|
+
}
|
2378
2376
|
},
|
2379
|
-
"
|
2377
|
+
"content": {
|
2380
2378
|
"type": "array",
|
2381
2379
|
"items": {
|
2382
|
-
"$ref": "#/definitions/
|
2380
|
+
"$ref": "#/definitions/layoutColumn_node"
|
2383
2381
|
}
|
2384
2382
|
}
|
2385
2383
|
},
|
@@ -2389,6 +2387,42 @@
|
|
2389
2387
|
],
|
2390
2388
|
"additionalProperties": false
|
2391
2389
|
},
|
2390
|
+
"layoutSection_full_node": {
|
2391
|
+
"allOf": [
|
2392
|
+
{
|
2393
|
+
"$ref": "#/definitions/layoutSection_node"
|
2394
|
+
},
|
2395
|
+
{
|
2396
|
+
"type": "object",
|
2397
|
+
"properties": {
|
2398
|
+
"type": {
|
2399
|
+
"enum": [
|
2400
|
+
"layoutSection"
|
2401
|
+
]
|
2402
|
+
},
|
2403
|
+
"marks": {
|
2404
|
+
"type": "array",
|
2405
|
+
"items": {
|
2406
|
+
"$ref": "#/definitions/breakout_mark"
|
2407
|
+
}
|
2408
|
+
},
|
2409
|
+
"content": {
|
2410
|
+
"type": "array",
|
2411
|
+
"items": {
|
2412
|
+
"$ref": "#/definitions/layoutColumn_node"
|
2413
|
+
},
|
2414
|
+
"minItems": 2,
|
2415
|
+
"maxItems": 3
|
2416
|
+
}
|
2417
|
+
},
|
2418
|
+
"required": [
|
2419
|
+
"type",
|
2420
|
+
"content"
|
2421
|
+
],
|
2422
|
+
"additionalProperties": false
|
2423
|
+
}
|
2424
|
+
]
|
2425
|
+
},
|
2392
2426
|
"doc_node": {
|
2393
2427
|
"type": "object",
|
2394
2428
|
"properties": {
|
@@ -2485,7 +2519,7 @@
|
|
2485
2519
|
"$ref": "#/definitions/bodiedExtension_with_marks_node"
|
2486
2520
|
},
|
2487
2521
|
{
|
2488
|
-
"$ref": "#/definitions/
|
2522
|
+
"$ref": "#/definitions/layoutSection_full_node"
|
2489
2523
|
}
|
2490
2524
|
]
|
2491
2525
|
}
|
@@ -2527,18 +2527,16 @@
|
|
2527
2527
|
"layoutSection"
|
2528
2528
|
]
|
2529
2529
|
},
|
2530
|
-
"
|
2530
|
+
"marks": {
|
2531
2531
|
"type": "array",
|
2532
2532
|
"items": {
|
2533
|
-
"$ref": "#/definitions/
|
2534
|
-
}
|
2535
|
-
"minItems": 2,
|
2536
|
-
"maxItems": 3
|
2533
|
+
"$ref": "#/definitions/breakout_mark"
|
2534
|
+
}
|
2537
2535
|
},
|
2538
|
-
"
|
2536
|
+
"content": {
|
2539
2537
|
"type": "array",
|
2540
2538
|
"items": {
|
2541
|
-
"$ref": "#/definitions/
|
2539
|
+
"$ref": "#/definitions/layoutColumn_node"
|
2542
2540
|
}
|
2543
2541
|
}
|
2544
2542
|
},
|
@@ -2548,6 +2546,78 @@
|
|
2548
2546
|
],
|
2549
2547
|
"additionalProperties": false
|
2550
2548
|
},
|
2549
|
+
"layoutSection_full_node": {
|
2550
|
+
"allOf": [
|
2551
|
+
{
|
2552
|
+
"$ref": "#/definitions/layoutSection_node"
|
2553
|
+
},
|
2554
|
+
{
|
2555
|
+
"type": "object",
|
2556
|
+
"properties": {
|
2557
|
+
"type": {
|
2558
|
+
"enum": [
|
2559
|
+
"layoutSection"
|
2560
|
+
]
|
2561
|
+
},
|
2562
|
+
"marks": {
|
2563
|
+
"type": "array",
|
2564
|
+
"items": {
|
2565
|
+
"$ref": "#/definitions/breakout_mark"
|
2566
|
+
}
|
2567
|
+
},
|
2568
|
+
"content": {
|
2569
|
+
"type": "array",
|
2570
|
+
"items": {
|
2571
|
+
"$ref": "#/definitions/layoutColumn_node"
|
2572
|
+
},
|
2573
|
+
"minItems": 2,
|
2574
|
+
"maxItems": 3
|
2575
|
+
}
|
2576
|
+
},
|
2577
|
+
"required": [
|
2578
|
+
"type",
|
2579
|
+
"content"
|
2580
|
+
],
|
2581
|
+
"additionalProperties": false
|
2582
|
+
}
|
2583
|
+
]
|
2584
|
+
},
|
2585
|
+
"layoutSection_with_single_column_node": {
|
2586
|
+
"allOf": [
|
2587
|
+
{
|
2588
|
+
"$ref": "#/definitions/layoutSection_node"
|
2589
|
+
},
|
2590
|
+
{
|
2591
|
+
"type": "object",
|
2592
|
+
"properties": {
|
2593
|
+
"type": {
|
2594
|
+
"enum": [
|
2595
|
+
"layoutSection"
|
2596
|
+
]
|
2597
|
+
},
|
2598
|
+
"marks": {
|
2599
|
+
"type": "array",
|
2600
|
+
"items": {
|
2601
|
+
"$ref": "#/definitions/breakout_mark"
|
2602
|
+
}
|
2603
|
+
},
|
2604
|
+
"content": {
|
2605
|
+
"type": "array",
|
2606
|
+
"items": {
|
2607
|
+
"$ref": "#/definitions/layoutColumn_node"
|
2608
|
+
},
|
2609
|
+
"minItems": 1,
|
2610
|
+
"maxItems": 3
|
2611
|
+
}
|
2612
|
+
},
|
2613
|
+
"required": [
|
2614
|
+
"type",
|
2615
|
+
"content"
|
2616
|
+
],
|
2617
|
+
"additionalProperties": false
|
2618
|
+
}
|
2619
|
+
]
|
2620
|
+
},
|
2551
2621
|
"doc_node": {
|
2552
2622
|
"type": "object",
|
2553
2623
|
"properties": {
|
@@ -2647,7 +2717,10 @@
|
|
2647
2717
|
"$ref": "#/definitions/bodiedExtension_with_marks_node"
|
2648
2718
|
},
|
2649
2719
|
{
|
2650
|
-
"$ref": "#/definitions/
|
2720
|
+
"$ref": "#/definitions/layoutSection_full_node"
|
2721
|
+
},
|
2722
|
+
{
|
2723
|
+
"$ref": "#/definitions/layoutSection_with_single_column_node"
|
2651
2724
|
}
|
2652
2725
|
]
|
2653
2726
|
}
|