@atlaskit/adf-schema 25.10.1 → 26.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/cjs/index.js +18 -0
- package/dist/cjs/schema/default-schema.js +2 -1
- package/dist/cjs/schema/index.js +18 -0
- package/dist/cjs/schema/nodes/index.js +18 -0
- package/dist/cjs/schema/nodes/media-single.js +69 -23
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/index.js +1 -1
- package/dist/es2019/schema/create-schema.js +1 -1
- package/dist/es2019/schema/default-schema.js +3 -2
- package/dist/es2019/schema/index.js +1 -1
- package/dist/es2019/schema/nodes/index.js +1 -1
- package/dist/es2019/schema/nodes/media-single.js +69 -21
- package/dist/es2019/version.json +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/schema/create-schema.js +1 -1
- package/dist/esm/schema/default-schema.js +3 -2
- package/dist/esm/schema/index.js +1 -1
- package/dist/esm/schema/nodes/index.js +1 -1
- package/dist/esm/schema/nodes/media-single.js +65 -22
- package/dist/esm/version.json +1 -1
- package/dist/json-schema/v1/stage-0.json +60 -20
- package/dist/types/index.d.ts +2 -2
- package/dist/types/schema/default-schema.d.ts +1 -0
- package/dist/types/schema/index.d.ts +2 -2
- package/dist/types/schema/nodes/index.d.ts +2 -2
- package/dist/types/schema/nodes/media-single.d.ts +10 -4
- package/dist/types/schema/nodes/types/rich-media-common.d.ts +21 -0
- package/dist/types/steps/analytics.d.ts +2 -2
- package/dist/types/steps/link-meta-step.d.ts +2 -2
- package/dist/types/steps/set-attrs.d.ts +1 -1
- package/dist/types/steps/table/add-column.d.ts +5 -5
- package/dist/types/steps/table/sort-column.d.ts +2 -2
- package/dist/types/steps/type-ahead.d.ts +2 -2
- package/dist/types-ts4.5/index.d.ts +2 -2
- package/dist/types-ts4.5/schema/default-schema.d.ts +1 -0
- package/dist/types-ts4.5/schema/index.d.ts +2 -2
- package/dist/types-ts4.5/schema/nodes/index.d.ts +2 -2
- package/dist/types-ts4.5/schema/nodes/media-single.d.ts +10 -4
- package/dist/types-ts4.5/schema/nodes/types/rich-media-common.d.ts +21 -0
- package/dist/types-ts4.5/steps/analytics.d.ts +2 -2
- package/dist/types-ts4.5/steps/link-meta-step.d.ts +2 -2
- package/dist/types-ts4.5/steps/set-attrs.d.ts +1 -1
- package/dist/types-ts4.5/steps/table/add-column.d.ts +5 -5
- package/dist/types-ts4.5/steps/table/sort-column.d.ts +2 -2
- package/dist/types-ts4.5/steps/type-ahead.d.ts +2 -2
- package/json-schema/v1/stage-0.json +60 -20
- package/package.json +2 -5
- package/report.api.md +36 -1
- package/tmp/api-report-tmp.d.ts +31 -1
@@ -1301,28 +1301,68 @@
|
|
1301
1301
|
]
|
1302
1302
|
},
|
1303
1303
|
"attrs": {
|
1304
|
-
"
|
1305
|
-
|
1306
|
-
|
1307
|
-
"
|
1308
|
-
|
1309
|
-
|
1310
|
-
|
1311
|
-
|
1312
|
-
|
1313
|
-
"
|
1314
|
-
|
1315
|
-
|
1316
|
-
|
1317
|
-
|
1318
|
-
"
|
1319
|
-
|
1304
|
+
"anyOf": [
|
1305
|
+
{
|
1306
|
+
"type": "object",
|
1307
|
+
"properties": {
|
1308
|
+
"widthType": {
|
1309
|
+
"enum": [
|
1310
|
+
"percentage"
|
1311
|
+
]
|
1312
|
+
},
|
1313
|
+
"width": {
|
1314
|
+
"type": "number",
|
1315
|
+
"minimum": 0,
|
1316
|
+
"maximum": 100
|
1317
|
+
},
|
1318
|
+
"layout": {
|
1319
|
+
"enum": [
|
1320
|
+
"wide",
|
1321
|
+
"full-width",
|
1322
|
+
"center",
|
1323
|
+
"wrap-right",
|
1324
|
+
"wrap-left",
|
1325
|
+
"align-end",
|
1326
|
+
"align-start"
|
1327
|
+
]
|
1328
|
+
}
|
1329
|
+
},
|
1330
|
+
"additionalProperties": false,
|
1331
|
+
"required": [
|
1332
|
+
"layout"
|
1320
1333
|
]
|
1334
|
+
},
|
1335
|
+
{
|
1336
|
+
"type": "object",
|
1337
|
+
"properties": {
|
1338
|
+
"width": {
|
1339
|
+
"type": "number",
|
1340
|
+
"minimum": 0
|
1341
|
+
},
|
1342
|
+
"widthType": {
|
1343
|
+
"enum": [
|
1344
|
+
"pixel"
|
1345
|
+
]
|
1346
|
+
},
|
1347
|
+
"layout": {
|
1348
|
+
"enum": [
|
1349
|
+
"wide",
|
1350
|
+
"full-width",
|
1351
|
+
"center",
|
1352
|
+
"wrap-right",
|
1353
|
+
"wrap-left",
|
1354
|
+
"align-end",
|
1355
|
+
"align-start"
|
1356
|
+
]
|
1357
|
+
}
|
1358
|
+
},
|
1359
|
+
"required": [
|
1360
|
+
"width",
|
1361
|
+
"widthType",
|
1362
|
+
"layout"
|
1363
|
+
],
|
1364
|
+
"additionalProperties": false
|
1321
1365
|
}
|
1322
|
-
},
|
1323
|
-
"additionalProperties": false,
|
1324
|
-
"required": [
|
1325
|
-
"layout"
|
1326
1366
|
]
|
1327
1367
|
},
|
1328
1368
|
"marks": {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@atlaskit/adf-schema",
|
3
|
-
"version": "
|
3
|
+
"version": "26.0.1",
|
4
4
|
"description": "Shared package that contains the ADF-schema (json) and ProseMirror node/mark specs",
|
5
5
|
"publishConfig": {
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
@@ -58,12 +58,9 @@
|
|
58
58
|
"prosemirror-transform": "1.3.2"
|
59
59
|
},
|
60
60
|
"devDependencies": {
|
61
|
-
"@atlaskit/editor-test-helpers": "^18.
|
61
|
+
"@atlaskit/editor-test-helpers": "^18.8.0",
|
62
62
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
63
63
|
"@types/linkify-it": "^2.0.4",
|
64
|
-
"@types/prosemirror-history": "^1.0.1",
|
65
|
-
"@types/prosemirror-model": "^1.11.0",
|
66
|
-
"@types/prosemirror-state": "^1.2.0",
|
67
64
|
"prosemirror-history": "^1.1.3",
|
68
65
|
"prosemirror-state": "1.3.4",
|
69
66
|
"typescript": "~4.9.5"
|
package/report.api.md
CHANGED
@@ -495,6 +495,11 @@ export interface DecisionListDefinition {
|
|
495
495
|
// @public (undocumented)
|
496
496
|
export const decisionListSelector: string;
|
497
497
|
|
498
|
+
// @public (undocumented)
|
499
|
+
interface DefaultMediaAttributes extends RichMediaAttributes {
|
500
|
+
widthType?: 'percentage';
|
501
|
+
}
|
502
|
+
|
498
503
|
// @public (undocumented)
|
499
504
|
export const doc: NodeSpec;
|
500
505
|
|
@@ -596,6 +601,11 @@ export const expandToJSON: (node: Node_2) => {
|
|
596
601
|
type ExpandWithBreakoutDefinition = ExpandBaseDefinition &
|
597
602
|
MarksObject<BreakoutMarkDefinition>;
|
598
603
|
|
604
|
+
// @public (undocumented)
|
605
|
+
export type ExtendedMediaAttributes =
|
606
|
+
| DefaultMediaAttributes
|
607
|
+
| FixedLayoutMediaAttributes;
|
608
|
+
|
599
609
|
// @public (undocumented)
|
600
610
|
export const extension: NodeSpec;
|
601
611
|
|
@@ -648,6 +658,16 @@ export interface ExternalMediaAttributes {
|
|
648
658
|
width?: number;
|
649
659
|
}
|
650
660
|
|
661
|
+
// @public
|
662
|
+
interface FixedLayoutMediaAttributes {
|
663
|
+
// (undocumented)
|
664
|
+
layout: RichMediaLayout;
|
665
|
+
// (undocumented)
|
666
|
+
width: number;
|
667
|
+
// (undocumented)
|
668
|
+
widthType: 'pixel';
|
669
|
+
}
|
670
|
+
|
651
671
|
// @public (undocumented)
|
652
672
|
export const fragment: MarkSpec;
|
653
673
|
|
@@ -1114,7 +1134,7 @@ export const mediaSingle: NodeSpec;
|
|
1114
1134
|
// @public
|
1115
1135
|
interface MediaSingleBaseDefinition {
|
1116
1136
|
// (undocumented)
|
1117
|
-
attrs?:
|
1137
|
+
attrs?: ExtendedMediaAttributes;
|
1118
1138
|
// (undocumented)
|
1119
1139
|
marks?: Array<LinkDefinition>;
|
1120
1140
|
// (undocumented)
|
@@ -1126,6 +1146,9 @@ export type MediaSingleDefinition =
|
|
1126
1146
|
| MediaSingleFullDefinition
|
1127
1147
|
| MediaSingleWithCaptionDefinition;
|
1128
1148
|
|
1149
|
+
// @public (undocumented)
|
1150
|
+
export const mediaSingleFull: NodeSpec;
|
1151
|
+
|
1129
1152
|
// @public
|
1130
1153
|
interface MediaSingleFullContent {
|
1131
1154
|
content: Array<MediaDefinition>;
|
@@ -1135,6 +1158,15 @@ interface MediaSingleFullContent {
|
|
1135
1158
|
type MediaSingleFullDefinition = MediaSingleBaseDefinition &
|
1136
1159
|
MediaSingleFullContent;
|
1137
1160
|
|
1161
|
+
// @public (undocumented)
|
1162
|
+
export const mediaSingleSpec: ({
|
1163
|
+
withCaption,
|
1164
|
+
withExtendedWidthTypes,
|
1165
|
+
}: {
|
1166
|
+
withCaption?: boolean | undefined;
|
1167
|
+
withExtendedWidthTypes?: boolean | undefined;
|
1168
|
+
}) => NodeSpec;
|
1169
|
+
|
1138
1170
|
// @public (undocumented)
|
1139
1171
|
export const mediaSingleToJSON: (node: Node_2) => {
|
1140
1172
|
attrs: any;
|
@@ -1147,6 +1179,9 @@ export const mediaSingleWithCaption: NodeSpec;
|
|
1147
1179
|
type MediaSingleWithCaptionDefinition = MediaSingleBaseDefinition &
|
1148
1180
|
MediaCaptionContent;
|
1149
1181
|
|
1182
|
+
// @public (undocumented)
|
1183
|
+
export const mediaSingleWithWidthType: NodeSpec;
|
1184
|
+
|
1150
1185
|
// @public (undocumented)
|
1151
1186
|
export const mediaToJSON: (node: Node_2) => {
|
1152
1187
|
attrs: Record<string, any>;
|
package/tmp/api-report-tmp.d.ts
CHANGED
@@ -441,6 +441,11 @@ export interface DecisionListDefinition {
|
|
441
441
|
// @public (undocumented)
|
442
442
|
export const decisionListSelector: string;
|
443
443
|
|
444
|
+
// @public (undocumented)
|
445
|
+
interface DefaultMediaAttributes extends RichMediaAttributes {
|
446
|
+
widthType?: 'percentage';
|
447
|
+
}
|
448
|
+
|
444
449
|
// @public (undocumented)
|
445
450
|
export const doc: NodeSpec;
|
446
451
|
|
@@ -535,6 +540,9 @@ export const expandToJSON: (node: Node_2) => {
|
|
535
540
|
// @public
|
536
541
|
type ExpandWithBreakoutDefinition = ExpandBaseDefinition & MarksObject<BreakoutMarkDefinition>;
|
537
542
|
|
543
|
+
// @public (undocumented)
|
544
|
+
export type ExtendedMediaAttributes = DefaultMediaAttributes | FixedLayoutMediaAttributes;
|
545
|
+
|
538
546
|
// @public (undocumented)
|
539
547
|
export const extension: NodeSpec;
|
540
548
|
|
@@ -586,6 +594,16 @@ export interface ExternalMediaAttributes {
|
|
586
594
|
width?: number;
|
587
595
|
}
|
588
596
|
|
597
|
+
// @public
|
598
|
+
interface FixedLayoutMediaAttributes {
|
599
|
+
// (undocumented)
|
600
|
+
layout: RichMediaLayout;
|
601
|
+
// (undocumented)
|
602
|
+
width: number;
|
603
|
+
// (undocumented)
|
604
|
+
widthType: 'pixel';
|
605
|
+
}
|
606
|
+
|
589
607
|
// @public (undocumented)
|
590
608
|
export const fragment: MarkSpec;
|
591
609
|
|
@@ -1011,7 +1029,7 @@ export const mediaSingle: NodeSpec;
|
|
1011
1029
|
// @public
|
1012
1030
|
interface MediaSingleBaseDefinition {
|
1013
1031
|
// (undocumented)
|
1014
|
-
attrs?:
|
1032
|
+
attrs?: ExtendedMediaAttributes;
|
1015
1033
|
// (undocumented)
|
1016
1034
|
marks?: Array<LinkDefinition>;
|
1017
1035
|
// (undocumented)
|
@@ -1021,6 +1039,9 @@ interface MediaSingleBaseDefinition {
|
|
1021
1039
|
// @public (undocumented)
|
1022
1040
|
export type MediaSingleDefinition = MediaSingleFullDefinition | MediaSingleWithCaptionDefinition;
|
1023
1041
|
|
1042
|
+
// @public (undocumented)
|
1043
|
+
export const mediaSingleFull: NodeSpec;
|
1044
|
+
|
1024
1045
|
// @public
|
1025
1046
|
interface MediaSingleFullContent {
|
1026
1047
|
content: Array<MediaDefinition>;
|
@@ -1029,6 +1050,12 @@ interface MediaSingleFullContent {
|
|
1029
1050
|
// @public
|
1030
1051
|
type MediaSingleFullDefinition = MediaSingleBaseDefinition & MediaSingleFullContent;
|
1031
1052
|
|
1053
|
+
// @public (undocumented)
|
1054
|
+
export const mediaSingleSpec: ({ withCaption, withExtendedWidthTypes, }: {
|
1055
|
+
withCaption?: boolean | undefined;
|
1056
|
+
withExtendedWidthTypes?: boolean | undefined;
|
1057
|
+
}) => NodeSpec;
|
1058
|
+
|
1032
1059
|
// @public (undocumented)
|
1033
1060
|
export const mediaSingleToJSON: (node: Node_2) => {
|
1034
1061
|
attrs: any;
|
@@ -1040,6 +1067,9 @@ export const mediaSingleWithCaption: NodeSpec;
|
|
1040
1067
|
// @public
|
1041
1068
|
type MediaSingleWithCaptionDefinition = MediaSingleBaseDefinition & MediaCaptionContent;
|
1042
1069
|
|
1070
|
+
// @public (undocumented)
|
1071
|
+
export const mediaSingleWithWidthType: NodeSpec;
|
1072
|
+
|
1043
1073
|
// @public (undocumented)
|
1044
1074
|
export const mediaToJSON: (node: Node_2) => {
|
1045
1075
|
attrs: Record<string, any>;
|