@atlaskit/adf-schema 19.0.0 → 19.2.2
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 +29 -0
- package/dist/cjs/index.js +14 -2
- package/dist/cjs/schema/create-schema.js +3 -0
- package/dist/cjs/schema/default-schema.js +6 -2
- package/dist/cjs/schema/index.js +20 -2
- package/dist/cjs/schema/nodes/index.js +22 -2
- package/dist/cjs/schema/nodes/layout-section.js +35 -3
- package/dist/cjs/schema/nodes/media-inline.js +11 -0
- package/dist/cjs/schema/nodes/media.js +8 -3
- package/dist/cjs/schema/nodes/tableNodes.js +13 -9
- package/dist/cjs/steps/analytics.js +3 -3
- package/dist/cjs/steps/type-ahead.js +134 -0
- package/dist/cjs/steps.js +14 -0
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/index.js +1 -1
- package/dist/es2019/schema/create-schema.js +4 -1
- package/dist/es2019/schema/default-schema.js +5 -2
- package/dist/es2019/schema/index.js +1 -1
- package/dist/es2019/schema/nodes/index.js +3 -2
- package/dist/es2019/schema/nodes/layout-section.js +34 -1
- package/dist/es2019/schema/nodes/media-inline.js +2 -0
- package/dist/es2019/schema/nodes/media.js +70 -64
- package/dist/es2019/schema/nodes/tableNodes.js +10 -9
- package/dist/es2019/steps/analytics.js +2 -2
- package/dist/es2019/steps/type-ahead.js +85 -0
- package/dist/es2019/steps.js +1 -0
- package/dist/es2019/version.json +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/schema/create-schema.js +4 -1
- package/dist/esm/schema/default-schema.js +5 -2
- package/dist/esm/schema/index.js +1 -1
- package/dist/esm/schema/nodes/index.js +3 -2
- package/dist/esm/schema/nodes/layout-section.js +32 -1
- package/dist/esm/schema/nodes/media-inline.js +2 -0
- package/dist/esm/schema/nodes/media.js +8 -3
- package/dist/esm/schema/nodes/tableNodes.js +10 -9
- package/dist/esm/steps/analytics.js +3 -3
- package/dist/esm/steps/type-ahead.js +117 -0
- package/dist/esm/steps.js +1 -0
- package/dist/esm/version.json +1 -1
- package/dist/json-schema/v1/full.json +131 -97
- package/dist/json-schema/v1/stage-0.json +225 -97
- package/dist/types/index.d.ts +2 -2
- package/dist/types/schema/default-schema.d.ts +1 -1
- package/dist/types/schema/index.d.ts +2 -2
- package/dist/types/schema/nodes/index.d.ts +5 -3
- package/dist/types/schema/nodes/layout-section.d.ts +28 -1
- package/dist/types/schema/nodes/media-inline.d.ts +16 -0
- package/dist/types/schema/nodes/media.d.ts +1 -1
- package/dist/types/schema/nodes/tableNodes.d.ts +11 -1
- package/dist/types/schema/nodes/types/inline-content.d.ts +2 -1
- package/dist/types/steps/type-ahead.d.ts +35 -0
- package/dist/types/steps.d.ts +1 -0
- package/json-schema/v1/full.json +131 -97
- package/json-schema/v1/stage-0.json +225 -97
- package/package.json +3 -3
- package/test-helpers/schema-builder.ts +3 -0
- package/test-helpers/schema.ts +1 -0
@@ -787,6 +787,147 @@
|
|
787
787
|
],
|
788
788
|
"additionalProperties": false
|
789
789
|
},
|
790
|
+
"media_node": {
|
791
|
+
"type": "object",
|
792
|
+
"properties": {
|
793
|
+
"type": {
|
794
|
+
"enum": [
|
795
|
+
"media"
|
796
|
+
]
|
797
|
+
},
|
798
|
+
"attrs": {
|
799
|
+
"anyOf": [
|
800
|
+
{
|
801
|
+
"type": "object",
|
802
|
+
"properties": {
|
803
|
+
"type": {
|
804
|
+
"enum": [
|
805
|
+
"link",
|
806
|
+
"file"
|
807
|
+
]
|
808
|
+
},
|
809
|
+
"id": {
|
810
|
+
"type": "string",
|
811
|
+
"minLength": 1
|
812
|
+
},
|
813
|
+
"collection": {
|
814
|
+
"type": "string"
|
815
|
+
},
|
816
|
+
"height": {
|
817
|
+
"type": "number"
|
818
|
+
},
|
819
|
+
"width": {
|
820
|
+
"type": "number"
|
821
|
+
},
|
822
|
+
"occurrenceKey": {
|
823
|
+
"type": "string",
|
824
|
+
"minLength": 1
|
825
|
+
},
|
826
|
+
"alt": {
|
827
|
+
"type": "string"
|
828
|
+
}
|
829
|
+
},
|
830
|
+
"required": [
|
831
|
+
"type",
|
832
|
+
"id",
|
833
|
+
"collection"
|
834
|
+
],
|
835
|
+
"additionalProperties": false
|
836
|
+
},
|
837
|
+
{
|
838
|
+
"type": "object",
|
839
|
+
"properties": {
|
840
|
+
"type": {
|
841
|
+
"enum": [
|
842
|
+
"external"
|
843
|
+
]
|
844
|
+
},
|
845
|
+
"url": {
|
846
|
+
"type": "string"
|
847
|
+
},
|
848
|
+
"alt": {
|
849
|
+
"type": "string"
|
850
|
+
},
|
851
|
+
"width": {
|
852
|
+
"type": "number"
|
853
|
+
},
|
854
|
+
"height": {
|
855
|
+
"type": "number"
|
856
|
+
}
|
857
|
+
},
|
858
|
+
"required": [
|
859
|
+
"type",
|
860
|
+
"url"
|
861
|
+
],
|
862
|
+
"additionalProperties": false
|
863
|
+
}
|
864
|
+
]
|
865
|
+
},
|
866
|
+
"marks": {
|
867
|
+
"type": "array",
|
868
|
+
"items": {
|
869
|
+
"$ref": "#/definitions/link_mark"
|
870
|
+
}
|
871
|
+
}
|
872
|
+
},
|
873
|
+
"required": [
|
874
|
+
"type",
|
875
|
+
"attrs"
|
876
|
+
],
|
877
|
+
"additionalProperties": false
|
878
|
+
},
|
879
|
+
"mediaInline_node": {
|
880
|
+
"type": "object",
|
881
|
+
"properties": {
|
882
|
+
"type": {
|
883
|
+
"enum": [
|
884
|
+
"mediaInline"
|
885
|
+
]
|
886
|
+
},
|
887
|
+
"attrs": {
|
888
|
+
"type": "object",
|
889
|
+
"properties": {
|
890
|
+
"data": {},
|
891
|
+
"id": {
|
892
|
+
"type": "string",
|
893
|
+
"minLength": 1
|
894
|
+
},
|
895
|
+
"collection": {
|
896
|
+
"type": "string"
|
897
|
+
},
|
898
|
+
"height": {
|
899
|
+
"type": "number"
|
900
|
+
},
|
901
|
+
"width": {
|
902
|
+
"type": "number"
|
903
|
+
},
|
904
|
+
"occurrenceKey": {
|
905
|
+
"type": "string",
|
906
|
+
"minLength": 1
|
907
|
+
},
|
908
|
+
"alt": {
|
909
|
+
"type": "string"
|
910
|
+
}
|
911
|
+
},
|
912
|
+
"additionalProperties": false,
|
913
|
+
"required": [
|
914
|
+
"id",
|
915
|
+
"collection"
|
916
|
+
]
|
917
|
+
},
|
918
|
+
"marks": {
|
919
|
+
"type": "array",
|
920
|
+
"items": {
|
921
|
+
"$ref": "#/definitions/link_mark"
|
922
|
+
}
|
923
|
+
}
|
924
|
+
},
|
925
|
+
"required": [
|
926
|
+
"type",
|
927
|
+
"attrs"
|
928
|
+
],
|
929
|
+
"additionalProperties": false
|
930
|
+
},
|
790
931
|
"formatted_text_inline_node": {
|
791
932
|
"allOf": [
|
792
933
|
{
|
@@ -889,6 +1030,9 @@
|
|
889
1030
|
{
|
890
1031
|
"$ref": "#/definitions/status_node"
|
891
1032
|
},
|
1033
|
+
{
|
1034
|
+
"$ref": "#/definitions/mediaInline_node"
|
1035
|
+
},
|
892
1036
|
{
|
893
1037
|
"$ref": "#/definitions/formatted_text_inline_node"
|
894
1038
|
},
|
@@ -997,95 +1141,6 @@
|
|
997
1141
|
],
|
998
1142
|
"additionalProperties": false
|
999
1143
|
},
|
1000
|
-
"media_node": {
|
1001
|
-
"type": "object",
|
1002
|
-
"properties": {
|
1003
|
-
"type": {
|
1004
|
-
"enum": [
|
1005
|
-
"media"
|
1006
|
-
]
|
1007
|
-
},
|
1008
|
-
"attrs": {
|
1009
|
-
"anyOf": [
|
1010
|
-
{
|
1011
|
-
"type": "object",
|
1012
|
-
"properties": {
|
1013
|
-
"type": {
|
1014
|
-
"enum": [
|
1015
|
-
"link",
|
1016
|
-
"file"
|
1017
|
-
]
|
1018
|
-
},
|
1019
|
-
"id": {
|
1020
|
-
"type": "string",
|
1021
|
-
"minLength": 1
|
1022
|
-
},
|
1023
|
-
"collection": {
|
1024
|
-
"type": "string"
|
1025
|
-
},
|
1026
|
-
"height": {
|
1027
|
-
"type": "number"
|
1028
|
-
},
|
1029
|
-
"width": {
|
1030
|
-
"type": "number"
|
1031
|
-
},
|
1032
|
-
"occurrenceKey": {
|
1033
|
-
"type": "string",
|
1034
|
-
"minLength": 1
|
1035
|
-
},
|
1036
|
-
"alt": {
|
1037
|
-
"type": "string"
|
1038
|
-
}
|
1039
|
-
},
|
1040
|
-
"required": [
|
1041
|
-
"type",
|
1042
|
-
"id",
|
1043
|
-
"collection"
|
1044
|
-
],
|
1045
|
-
"additionalProperties": false
|
1046
|
-
},
|
1047
|
-
{
|
1048
|
-
"type": "object",
|
1049
|
-
"properties": {
|
1050
|
-
"type": {
|
1051
|
-
"enum": [
|
1052
|
-
"external"
|
1053
|
-
]
|
1054
|
-
},
|
1055
|
-
"url": {
|
1056
|
-
"type": "string"
|
1057
|
-
},
|
1058
|
-
"alt": {
|
1059
|
-
"type": "string"
|
1060
|
-
},
|
1061
|
-
"width": {
|
1062
|
-
"type": "number"
|
1063
|
-
},
|
1064
|
-
"height": {
|
1065
|
-
"type": "number"
|
1066
|
-
}
|
1067
|
-
},
|
1068
|
-
"required": [
|
1069
|
-
"type",
|
1070
|
-
"url"
|
1071
|
-
],
|
1072
|
-
"additionalProperties": false
|
1073
|
-
}
|
1074
|
-
]
|
1075
|
-
},
|
1076
|
-
"marks": {
|
1077
|
-
"type": "array",
|
1078
|
-
"items": {
|
1079
|
-
"$ref": "#/definitions/link_mark"
|
1080
|
-
}
|
1081
|
-
}
|
1082
|
-
},
|
1083
|
-
"required": [
|
1084
|
-
"type",
|
1085
|
-
"attrs"
|
1086
|
-
],
|
1087
|
-
"additionalProperties": false
|
1088
|
-
},
|
1089
1144
|
"caption_node": {
|
1090
1145
|
"type": "object",
|
1091
1146
|
"properties": {
|
@@ -2472,18 +2527,16 @@
|
|
2472
2527
|
"layoutSection"
|
2473
2528
|
]
|
2474
2529
|
},
|
2475
|
-
"
|
2530
|
+
"marks": {
|
2476
2531
|
"type": "array",
|
2477
2532
|
"items": {
|
2478
|
-
"$ref": "#/definitions/
|
2479
|
-
}
|
2480
|
-
"minItems": 2,
|
2481
|
-
"maxItems": 3
|
2533
|
+
"$ref": "#/definitions/breakout_mark"
|
2534
|
+
}
|
2482
2535
|
},
|
2483
|
-
"
|
2536
|
+
"content": {
|
2484
2537
|
"type": "array",
|
2485
2538
|
"items": {
|
2486
|
-
"$ref": "#/definitions/
|
2539
|
+
"$ref": "#/definitions/layoutColumn_node"
|
2487
2540
|
}
|
2488
2541
|
}
|
2489
2542
|
},
|
@@ -2493,6 +2546,78 @@
|
|
2493
2546
|
],
|
2494
2547
|
"additionalProperties": false
|
2495
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
|
+
},
|
2496
2621
|
"doc_node": {
|
2497
2622
|
"type": "object",
|
2498
2623
|
"properties": {
|
@@ -2592,7 +2717,10 @@
|
|
2592
2717
|
"$ref": "#/definitions/bodiedExtension_with_marks_node"
|
2593
2718
|
},
|
2594
2719
|
{
|
2595
|
-
"$ref": "#/definitions/
|
2720
|
+
"$ref": "#/definitions/layoutSection_full_node"
|
2721
|
+
},
|
2722
|
+
{
|
2723
|
+
"$ref": "#/definitions/layoutSection_with_single_column_node"
|
2596
2724
|
}
|
2597
2725
|
]
|
2598
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, 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, 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
1
|
import { SchemaConfig } from './create-schema';
|
2
|
-
declare type DefaultSchemaNodes = 'doc' | 'paragraph' | 'text' | 'bulletList' | 'orderedList' | 'listItem' | 'heading' | 'blockquote' | 'codeBlock' | 'panel' | 'rule' | 'image' | 'mention' | 'media' | 'caption' | 'mediaGroup' | 'mediaSingle' | 'confluenceUnsupportedBlock' | 'confluenceUnsupportedInline' | 'confluenceJiraIssue' | 'expand' | 'nestedExpand' | 'extension' | 'inlineExtension' | 'bodiedExtension' | 'hardBreak' | 'emoji' | 'table' | 'tableCell' | 'tableHeader' | 'tableRow' | 'decisionList' | 'decisionItem' | 'taskList' | 'taskItem' | 'unknownBlock' | 'date' | 'status' | 'placeholder' | 'layoutSection' | 'layoutColumn' | 'inlineCard' | 'blockCard' | 'embedCard' | 'unsupportedBlock' | 'unsupportedInline';
|
2
|
+
declare type DefaultSchemaNodes = 'doc' | 'paragraph' | 'text' | 'bulletList' | 'orderedList' | 'listItem' | 'heading' | 'blockquote' | 'codeBlock' | 'panel' | 'rule' | 'image' | 'mention' | 'media' | 'caption' | 'mediaGroup' | 'mediaSingle' | 'mediaInline' | 'confluenceUnsupportedBlock' | 'confluenceUnsupportedInline' | 'confluenceJiraIssue' | 'expand' | 'nestedExpand' | 'extension' | 'inlineExtension' | 'bodiedExtension' | 'hardBreak' | 'emoji' | 'table' | 'tableCell' | 'tableHeader' | 'tableRow' | 'decisionList' | 'decisionItem' | 'taskList' | 'taskItem' | 'unknownBlock' | 'date' | 'status' | 'placeholder' | 'layoutSection' | 'layoutColumn' | 'inlineCard' | 'blockCard' | 'embedCard' | 'unsupportedBlock' | 'unsupportedInline';
|
3
3
|
declare type DefaultSchemaMarks = 'link' | 'em' | 'strong' | 'strike' | 'subsup' | 'underline' | 'code' | 'textColor' | 'confluenceInlineComment' | 'breakout' | 'alignment' | 'indentation' | 'annotation' | 'unsupportedMark' | 'unsupportedNodeAttribute' | 'typeAheadQuery';
|
4
4
|
export declare const defaultSchemaConfig: SchemaConfig<DefaultSchemaNodes, DefaultSchemaMarks>;
|
5
5
|
export declare const getSchemaBasedOnStage: (stage?: string) => import("prosemirror-model").Schema<DefaultSchemaNodes, DefaultSchemaMarks>;
|
@@ -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, 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, 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';
|
@@ -38,10 +38,12 @@ export type { CaptionDefinition } from './caption';
|
|
38
38
|
export { media, copyPrivateAttributes as copyPrivateMediaAttributes, toJSON as mediaToJSON, } from './media';
|
39
39
|
export type { MediaType, MediaBaseAttributes, MediaAttributes, ExternalMediaAttributes, DisplayType as MediaDisplayType, MediaDefinition, MediaADFAttrs, } from './media';
|
40
40
|
export { mediaGroup } from './media-group';
|
41
|
+
export { mediaInline } from './media-inline';
|
42
|
+
export type { MediaInlineAttributes, MediaInlineDefinition, } from './media-inline';
|
41
43
|
export type { MediaGroupDefinition } from './media-group';
|
42
44
|
export { mediaSingle, mediaSingleWithCaption, toJSON as mediaSingleToJSON, } from './media-single';
|
43
45
|
export type { MediaSingleDefinition } from './media-single';
|
44
|
-
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';
|
45
47
|
export type { TableAttributes, CellAttributes, Layout as TableLayout, TableDefinition, TableCell as TableCellDefinition, TableHeader as TableHeaderDefinition, TableRow as TableRowDefinition, CellDomAttrs, } from './tableNodes';
|
46
48
|
export { decisionList, decisionListSelector } from './decision-list';
|
47
49
|
export type { DecisionListDefinition } from './decision-list';
|
@@ -61,8 +63,8 @@ export { date } from './date';
|
|
61
63
|
export type { DateDefinition } from './date';
|
62
64
|
export { placeholder } from './placeholder';
|
63
65
|
export type { PlaceholderDefinition } from './placeholder';
|
64
|
-
export { layoutSection } from './layout-section';
|
65
|
-
export type { LayoutSectionDefinition } from './layout-section';
|
66
|
+
export { layoutSection, layoutSectionWithSingleColumn } from './layout-section';
|
67
|
+
export type { LayoutSectionDefinition, LayoutSectionBaseDefinition, LayoutSectionFullDefinition, LayoutSectionWithSingleColumnDefinition, } from './layout-section';
|
66
68
|
export { layoutColumn } from './layout-column';
|
67
69
|
export type { LayoutColumnDefinition } from './layout-column';
|
68
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;
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import { NodeSpec } from 'prosemirror-model';
|
2
|
+
import { LinkDefinition } from '../marks/link';
|
3
|
+
import { MediaBaseAttributes } from './media';
|
4
|
+
export interface MediaInlineAttributes extends MediaBaseAttributes {
|
5
|
+
data?: object;
|
6
|
+
}
|
7
|
+
/**
|
8
|
+
* @stage 0
|
9
|
+
* @name mediaInline_node
|
10
|
+
*/
|
11
|
+
export interface MediaInlineDefinition {
|
12
|
+
type: 'mediaInline';
|
13
|
+
attrs: MediaInlineAttributes;
|
14
|
+
marks?: Array<LinkDefinition>;
|
15
|
+
}
|
16
|
+
export declare const mediaInline: NodeSpec;
|
@@ -51,7 +51,7 @@ export interface ExternalMediaAttributes {
|
|
51
51
|
}
|
52
52
|
export declare type MediaADFAttrs = MediaAttributes | ExternalMediaAttributes;
|
53
53
|
export declare const defaultAttrs: DefaultAttributes<MediaADFAttrs>;
|
54
|
-
export declare const createMediaSpec: (attributes: Partial<NodeSpec['attrs']
|
54
|
+
export declare const createMediaSpec: (attributes: Partial<NodeSpec['attrs']>, inline?: boolean) => NodeSpec;
|
55
55
|
export declare const media: NodeSpec;
|
56
56
|
export declare const camelCaseToKebabCase: (str: string) => string;
|
57
57
|
export declare const copyPrivateAttributes: (from: Record<string, any>, to: Record<string, any>, map?: ((str: string) => string) | undefined) => void;
|
@@ -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>;
|
@@ -9,6 +9,7 @@ import { StatusDefinition as Status } from '../status';
|
|
9
9
|
import { TextDefinition as Text } from '../text';
|
10
10
|
import { MarksObject } from './mark';
|
11
11
|
import { AnnotationMarkDefinition as Annotation, CodeDefinition as Code, EmDefinition as Em, LinkDefinition as Link, StrikeDefinition as Strike, StrongDefinition as Strong, SubSupDefinition as SubSup, TextColorDefinition as TextColor, UnderlineDefinition as Underline } from '../../marks';
|
12
|
+
import { MediaInlineDefinition } from '../media-inline';
|
12
13
|
/**
|
13
14
|
* @name formatted_text_inline_node
|
14
15
|
*/
|
@@ -24,7 +25,7 @@ export declare type InlineCode = Text & MarksObject<Code | Link | Annotation>;
|
|
24
25
|
/**
|
25
26
|
* @name atomic_inline_node
|
26
27
|
*/
|
27
|
-
export declare type InlineAtomic = HardBreak | Mention | Emoji | InlineExtensionWithoutMark | Date | Placeholder | InlineCard | Status;
|
28
|
+
export declare type InlineAtomic = HardBreak | Mention | Emoji | InlineExtensionWithoutMark | Date | Placeholder | InlineCard | Status | MediaInlineDefinition;
|
28
29
|
/**
|
29
30
|
* @name inline_node
|
30
31
|
*/
|
@@ -0,0 +1,35 @@
|
|
1
|
+
import { Node as PMNode } from 'prosemirror-model';
|
2
|
+
import { Mappable, ReplaceStep, Step, StepMap, StepResult } from 'prosemirror-transform';
|
3
|
+
export declare const insertTypeAheadStepType = "atlaskit-insert-type-ahead";
|
4
|
+
export declare enum InsertTypeAheadStages {
|
5
|
+
DELETING_RAW_QUERY = "DELETING_RAW_QUERY",
|
6
|
+
INSERTING_ITEM = "INSERTING_ITEM"
|
7
|
+
}
|
8
|
+
declare type Config = {
|
9
|
+
selectedIndex: number;
|
10
|
+
stage: InsertTypeAheadStages;
|
11
|
+
query: string;
|
12
|
+
trigger: string;
|
13
|
+
};
|
14
|
+
export declare class InsertTypeAheadStep extends Step {
|
15
|
+
private isInvertStep;
|
16
|
+
selectedIndex: number;
|
17
|
+
stage: InsertTypeAheadStages;
|
18
|
+
query: string;
|
19
|
+
trigger: string;
|
20
|
+
constructor({ stage, query, trigger, selectedIndex }: Config, isInvertStep?: boolean);
|
21
|
+
invert(): InsertTypeAheadStep;
|
22
|
+
apply(doc: PMNode): StepResult<any>;
|
23
|
+
merge(): null;
|
24
|
+
isInsertionStep(): boolean;
|
25
|
+
isUndoingStep(): boolean;
|
26
|
+
map(mapping: Mappable): InsertTypeAheadStep;
|
27
|
+
getMap(): StepMap;
|
28
|
+
toJSON(): {
|
29
|
+
stepType: string;
|
30
|
+
from: number;
|
31
|
+
to: number;
|
32
|
+
};
|
33
|
+
static fromJSON(): ReplaceStep<any>;
|
34
|
+
}
|
35
|
+
export {};
|
package/dist/types/steps.d.ts
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
export { SortOrder as TableSortOrder } from './steps/table/constants';
|
2
2
|
export { TableSortStep } from './steps/table/sort-column';
|
3
|
+
export { InsertTypeAheadStages, InsertTypeAheadStep } from './steps/type-ahead';
|
3
4
|
export { AddColumnStep } from './steps/table/add-column';
|
4
5
|
export { SetAttrsStep } from './steps/set-attrs';
|
5
6
|
export { AnalyticsStep } from './steps/analytics';
|