@atlaskit/adf-schema 30.0.4 → 30.2.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/schema/create-schema.js +1 -1
- package/dist/cjs/schema/default-schema.js +1 -2
- package/dist/cjs/schema/nodes/types/rich-media-common.js +0 -1
- package/dist/es2019/schema/create-schema.js +2 -2
- package/dist/es2019/schema/default-schema.js +2 -3
- package/dist/es2019/schema/nodes/types/rich-media-common.js +0 -1
- package/dist/esm/schema/create-schema.js +2 -2
- package/dist/esm/schema/default-schema.js +2 -3
- package/dist/esm/schema/nodes/types/rich-media-common.js +0 -1
- package/dist/json-schema/v1/full.json +60 -20
- package/dist/types/schema/nodes/types/rich-media-common.d.ts +0 -2
- package/json-schema/v1/full.json +60 -20
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
@@ -24,8 +24,7 @@ var getSchemaBasedOnStage = (0, _memoizeOne.default)(function () {
|
|
24
24
|
var defaultSchemaConfig = getDefaultSchemaConfig();
|
25
25
|
if (stage === 'stage0') {
|
26
26
|
defaultSchemaConfig.customNodeSpecs = {
|
27
|
-
layoutSection: _nodes.layoutSectionWithSingleColumn
|
28
|
-
mediaSingle: _nodes.mediaSingleFull
|
27
|
+
layoutSection: _nodes.layoutSectionWithSingleColumn
|
29
28
|
};
|
30
29
|
}
|
31
30
|
return (0, _createSchema.createSchema)(defaultSchemaConfig);
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { Schema } from '@atlaskit/editor-prosemirror/model';
|
2
2
|
import { COLOR, FONT_STYLE, SEARCH_QUERY, LINK } from './groups';
|
3
3
|
import { link, em, strong, textColor, strike, subsup, underline, code, typeAheadQuery, confluenceInlineComment, breakout, alignment, indentation, annotation, unsupportedMark, unsupportedNodeAttribute, dataConsumer, fragment, border } from './marks';
|
4
|
-
import { confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, doc, paragraph, text, bulletList, orderedListWithOrder, listItem, heading, blockquote, codeBlock, panel, rule, image, mention, media, mediaInline,
|
4
|
+
import { confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, doc, paragraph, text, bulletList, orderedListWithOrder, listItem, heading, blockquote, codeBlock, panel, rule, image, mention, media, mediaInline, mediaSingleFull, mediaGroup, hardBreak, emoji, table, tableCell, tableHeader, tableRow, decisionList, decisionItem, taskList, taskItem, unknownBlock, extension, inlineExtension, bodiedExtension, date, placeholder, layoutSection, layoutColumn, inlineCard, blockCard, unsupportedBlock, unsupportedInline, status, expand, nestedExpand, embedCard, caption } from './nodes';
|
5
5
|
function addItems(builtInItems, config, customSpecs = {}) {
|
6
6
|
if (!config) {
|
7
7
|
return {};
|
@@ -99,7 +99,7 @@ const nodesInOrder = [{
|
|
99
99
|
spec: mediaGroup
|
100
100
|
}, {
|
101
101
|
name: 'mediaSingle',
|
102
|
-
spec:
|
102
|
+
spec: mediaSingleFull
|
103
103
|
}, {
|
104
104
|
name: 'mediaInline',
|
105
105
|
spec: mediaInline
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import memoizeOne from 'memoize-one';
|
2
|
-
import {
|
2
|
+
import { layoutSectionWithSingleColumn } from './nodes';
|
3
3
|
import { createSchema } from './create-schema';
|
4
4
|
const getDefaultSchemaConfig = () => {
|
5
5
|
let defaultSchemaConfig = {
|
@@ -15,8 +15,7 @@ export const getSchemaBasedOnStage = memoizeOne((stage = 'final') => {
|
|
15
15
|
const defaultSchemaConfig = getDefaultSchemaConfig();
|
16
16
|
if (stage === 'stage0') {
|
17
17
|
defaultSchemaConfig.customNodeSpecs = {
|
18
|
-
layoutSection: layoutSectionWithSingleColumn
|
19
|
-
mediaSingle: mediaSingleFull
|
18
|
+
layoutSection: layoutSectionWithSingleColumn
|
20
19
|
};
|
21
20
|
}
|
22
21
|
return createSchema(defaultSchemaConfig);
|
@@ -4,7 +4,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
4
4
|
import { Schema } from '@atlaskit/editor-prosemirror/model';
|
5
5
|
import { COLOR, FONT_STYLE, SEARCH_QUERY, LINK } from './groups';
|
6
6
|
import { link, em, strong, textColor, strike, subsup, underline, code, typeAheadQuery, confluenceInlineComment, breakout, alignment, indentation, annotation, unsupportedMark, unsupportedNodeAttribute, dataConsumer, fragment, border } from './marks';
|
7
|
-
import { confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, doc, paragraph, text, bulletList, orderedListWithOrder, listItem, heading, blockquote, codeBlock, panel, rule, image, mention, media, mediaInline,
|
7
|
+
import { confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, doc, paragraph, text, bulletList, orderedListWithOrder, listItem, heading, blockquote, codeBlock, panel, rule, image, mention, media, mediaInline, mediaSingleFull, mediaGroup, hardBreak, emoji, table, tableCell, tableHeader, tableRow, decisionList, decisionItem, taskList, taskItem, unknownBlock, extension, inlineExtension, bodiedExtension, date, placeholder, layoutSection, layoutColumn, inlineCard, blockCard, unsupportedBlock, unsupportedInline, status, expand, nestedExpand, embedCard, caption } from './nodes';
|
8
8
|
function addItems(builtInItems, config) {
|
9
9
|
var customSpecs = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
10
10
|
if (!config) {
|
@@ -104,7 +104,7 @@ var nodesInOrder = [{
|
|
104
104
|
spec: mediaGroup
|
105
105
|
}, {
|
106
106
|
name: 'mediaSingle',
|
107
|
-
spec:
|
107
|
+
spec: mediaSingleFull
|
108
108
|
}, {
|
109
109
|
name: 'mediaInline',
|
110
110
|
spec: mediaInline
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import memoizeOne from 'memoize-one';
|
2
|
-
import {
|
2
|
+
import { layoutSectionWithSingleColumn } from './nodes';
|
3
3
|
import { createSchema } from './create-schema';
|
4
4
|
var getDefaultSchemaConfig = function getDefaultSchemaConfig() {
|
5
5
|
var defaultSchemaConfig = {
|
@@ -16,8 +16,7 @@ export var getSchemaBasedOnStage = memoizeOne(function () {
|
|
16
16
|
var defaultSchemaConfig = getDefaultSchemaConfig();
|
17
17
|
if (stage === 'stage0') {
|
18
18
|
defaultSchemaConfig.customNodeSpecs = {
|
19
|
-
layoutSection: layoutSectionWithSingleColumn
|
20
|
-
mediaSingle: mediaSingleFull
|
19
|
+
layoutSection: layoutSectionWithSingleColumn
|
21
20
|
};
|
22
21
|
}
|
23
22
|
return createSchema(defaultSchemaConfig);
|
@@ -1243,28 +1243,68 @@
|
|
1243
1243
|
]
|
1244
1244
|
},
|
1245
1245
|
"attrs": {
|
1246
|
-
"
|
1247
|
-
|
1248
|
-
|
1249
|
-
"
|
1250
|
-
|
1251
|
-
|
1252
|
-
|
1253
|
-
|
1254
|
-
|
1255
|
-
"
|
1256
|
-
|
1257
|
-
|
1258
|
-
|
1259
|
-
|
1260
|
-
"
|
1261
|
-
|
1246
|
+
"anyOf": [
|
1247
|
+
{
|
1248
|
+
"type": "object",
|
1249
|
+
"properties": {
|
1250
|
+
"widthType": {
|
1251
|
+
"enum": [
|
1252
|
+
"percentage"
|
1253
|
+
]
|
1254
|
+
},
|
1255
|
+
"width": {
|
1256
|
+
"type": "number",
|
1257
|
+
"minimum": 0,
|
1258
|
+
"maximum": 100
|
1259
|
+
},
|
1260
|
+
"layout": {
|
1261
|
+
"enum": [
|
1262
|
+
"wide",
|
1263
|
+
"full-width",
|
1264
|
+
"center",
|
1265
|
+
"wrap-right",
|
1266
|
+
"wrap-left",
|
1267
|
+
"align-end",
|
1268
|
+
"align-start"
|
1269
|
+
]
|
1270
|
+
}
|
1271
|
+
},
|
1272
|
+
"additionalProperties": false,
|
1273
|
+
"required": [
|
1274
|
+
"layout"
|
1262
1275
|
]
|
1276
|
+
},
|
1277
|
+
{
|
1278
|
+
"type": "object",
|
1279
|
+
"properties": {
|
1280
|
+
"width": {
|
1281
|
+
"type": "number",
|
1282
|
+
"minimum": 0
|
1283
|
+
},
|
1284
|
+
"widthType": {
|
1285
|
+
"enum": [
|
1286
|
+
"pixel"
|
1287
|
+
]
|
1288
|
+
},
|
1289
|
+
"layout": {
|
1290
|
+
"enum": [
|
1291
|
+
"wide",
|
1292
|
+
"full-width",
|
1293
|
+
"center",
|
1294
|
+
"wrap-right",
|
1295
|
+
"wrap-left",
|
1296
|
+
"align-end",
|
1297
|
+
"align-start"
|
1298
|
+
]
|
1299
|
+
}
|
1300
|
+
},
|
1301
|
+
"required": [
|
1302
|
+
"width",
|
1303
|
+
"widthType",
|
1304
|
+
"layout"
|
1305
|
+
],
|
1306
|
+
"additionalProperties": false
|
1263
1307
|
}
|
1264
|
-
},
|
1265
|
-
"additionalProperties": false,
|
1266
|
-
"required": [
|
1267
|
-
"layout"
|
1268
1308
|
]
|
1269
1309
|
},
|
1270
1310
|
"marks": {
|
@@ -13,13 +13,11 @@ export interface OptionalRichMediaAttributes {
|
|
13
13
|
}
|
14
14
|
interface DefaultMediaAttributes extends RichMediaAttributes {
|
15
15
|
/**
|
16
|
-
* @stage 0
|
17
16
|
* @description optional widthType attribute for media with percentage layout
|
18
17
|
*/
|
19
18
|
widthType?: 'percentage';
|
20
19
|
}
|
21
20
|
/**
|
22
|
-
* @stage 0
|
23
21
|
* @description The widthType attribute is used to support fixed with media single
|
24
22
|
*/
|
25
23
|
interface FixedLayoutMediaAttributes {
|
package/json-schema/v1/full.json
CHANGED
@@ -1243,28 +1243,68 @@
|
|
1243
1243
|
]
|
1244
1244
|
},
|
1245
1245
|
"attrs": {
|
1246
|
-
"
|
1247
|
-
|
1248
|
-
|
1249
|
-
"
|
1250
|
-
|
1251
|
-
|
1252
|
-
|
1253
|
-
|
1254
|
-
|
1255
|
-
"
|
1256
|
-
|
1257
|
-
|
1258
|
-
|
1259
|
-
|
1260
|
-
"
|
1261
|
-
|
1246
|
+
"anyOf": [
|
1247
|
+
{
|
1248
|
+
"type": "object",
|
1249
|
+
"properties": {
|
1250
|
+
"widthType": {
|
1251
|
+
"enum": [
|
1252
|
+
"percentage"
|
1253
|
+
]
|
1254
|
+
},
|
1255
|
+
"width": {
|
1256
|
+
"type": "number",
|
1257
|
+
"minimum": 0,
|
1258
|
+
"maximum": 100
|
1259
|
+
},
|
1260
|
+
"layout": {
|
1261
|
+
"enum": [
|
1262
|
+
"wide",
|
1263
|
+
"full-width",
|
1264
|
+
"center",
|
1265
|
+
"wrap-right",
|
1266
|
+
"wrap-left",
|
1267
|
+
"align-end",
|
1268
|
+
"align-start"
|
1269
|
+
]
|
1270
|
+
}
|
1271
|
+
},
|
1272
|
+
"additionalProperties": false,
|
1273
|
+
"required": [
|
1274
|
+
"layout"
|
1262
1275
|
]
|
1276
|
+
},
|
1277
|
+
{
|
1278
|
+
"type": "object",
|
1279
|
+
"properties": {
|
1280
|
+
"width": {
|
1281
|
+
"type": "number",
|
1282
|
+
"minimum": 0
|
1283
|
+
},
|
1284
|
+
"widthType": {
|
1285
|
+
"enum": [
|
1286
|
+
"pixel"
|
1287
|
+
]
|
1288
|
+
},
|
1289
|
+
"layout": {
|
1290
|
+
"enum": [
|
1291
|
+
"wide",
|
1292
|
+
"full-width",
|
1293
|
+
"center",
|
1294
|
+
"wrap-right",
|
1295
|
+
"wrap-left",
|
1296
|
+
"align-end",
|
1297
|
+
"align-start"
|
1298
|
+
]
|
1299
|
+
}
|
1300
|
+
},
|
1301
|
+
"required": [
|
1302
|
+
"width",
|
1303
|
+
"widthType",
|
1304
|
+
"layout"
|
1305
|
+
],
|
1306
|
+
"additionalProperties": false
|
1263
1307
|
}
|
1264
|
-
},
|
1265
|
-
"additionalProperties": false,
|
1266
|
-
"required": [
|
1267
|
-
"layout"
|
1268
1308
|
]
|
1269
1309
|
},
|
1270
1310
|
"marks": {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@atlaskit/adf-schema",
|
3
|
-
"version": "30.0
|
3
|
+
"version": "30.2.0",
|
4
4
|
"description": "Shared package that contains the ADF-schema (json) and ProseMirror node/mark specs",
|
5
5
|
"publishConfig": {
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
@@ -40,7 +40,7 @@
|
|
40
40
|
"memoize-one": "^6.0.0"
|
41
41
|
},
|
42
42
|
"devDependencies": {
|
43
|
-
"@atlassian/adf-schema-json": "^1.0
|
43
|
+
"@atlassian/adf-schema-json": "^1.1.0",
|
44
44
|
"@babel/cli": "^7.22.9",
|
45
45
|
"@babel/core": "^7.22.9",
|
46
46
|
"@babel/plugin-proposal-class-properties": "^7.18.6",
|